buffalo101
Newbie level 5
Hello,
I am supposed to play a little with a HD44780U (LCD-II) display and this platform:
A template for the C program is included here:
I can't understand certain things about interfacing the LCD display. For instance, the *ports* are defined like this:
Then, I would address these ports with the XBYTE keyword.
From the LCD documentation:
**broken link removed**
A short example is given:
My question is this: how do I include the RS, R/W# in a 8bit instruction?! or how precisely do I form the instructions?
And also, how do I read the BusyFlag? I think I should first set RS=0, R/W#=1 and then check for Bit7 on the DR_RD (data_register read?) port.
Thanks in advance!
I am supposed to play a little with a HD44780U (LCD-II) display and this platform:
Code:
http://www.cs.ucv.ro/~lemeni/Downloads/Sistem%20de%20dezvoltare.pdf
A template for the C program is included here:
Code:
http://www.cs.ucv.ro/~lemeni/labmicro/Lab45.zip
I can't understand certain things about interfacing the LCD display. For instance, the *ports* are defined like this:
Code:
#define IR_WR 0x100
#define STAT_RD 0x102
#define DR_WR 0x101
#define DR_RD 0x103
Then, I would address these ports with the XBYTE keyword.
Code:
XBYTE[IR_WR]=0x00;
From the LCD documentation:
**broken link removed**
A short example is given:
For the "Clear display command", RS=0, R/W#=0 and DB(7:0)=0000_0001b=01h. To send this instruction, we use:
Code:XBYTE[IR_WR]=1;
My question is this: how do I include the RS, R/W# in a 8bit instruction?! or how precisely do I form the instructions?
And also, how do I read the BusyFlag? I think I should first set RS=0, R/W#=1 and then check for Bit7 on the DR_RD (data_register read?) port.
Thanks in advance!