I´m working in a 8051 microcontroler and I have a device (a LCD)
placed in a specific address. I need to determine it´s address in
the program. I tryed to do that
sfr at 0x4000 LCD;
But it seens not to work. Running the S51 simulator, I realised that
every byte that I tryed to write to the LCD was writen to the
address 0x00 of the internal memory.
So I tryed this:
#define LCD (*(char*) 0x4000)
It works fine, but I get the message:
warning *** LITERAL value being cast to '_generic' pointer
How can I avoid this? There´s a better way to do that?
Log in to post a comment.