View previous topic :: View next topic |
Author |
Message |
deltatech
Joined: 22 Apr 2006 Posts: 87
|
HD44780 LCD Problem |
Posted: Fri May 05, 2006 4:39 pm |
|
|
Hi i have tried to compile these examples .http://www.ccsinfo.com/forum/viewtopic.php?t=24661
http://www.ccsinfo.com/forum/viewtopic.php?t=20182
They are said to be 44780 Drivers . But when i wired up the LCD it has 8 Data lines 0-7 and RS RW E . But these examples only have 4 datal ines as below
Am i missing something here or have i got the wrong LCD?
Please Help
#define LCD_DB4 PIN_D0
#define LCD_DB5 PIN_D1
#define LCD_DB6 PIN_D2
#define LCD_DB7 PIN_D3
#define LCD_E PIN_A1
#define LCD_RS PIN_A3
#define LCD_RW PIN_A2 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri May 05, 2006 4:44 pm |
|
|
The standard procedure in embedded design is to use the lowest
possible number of i/o pins to interface to peripheral chips
(while keeping acceptable performance levels).
For this reason, most people use the optional 4-bit interface mode
of the HD44780 compatible LCD modules. Most drivers are written
to use this mode. |
|
|
akmalfadzil
Joined: 06 May 2006 Posts: 1
|
LCD is ok... |
Posted: Mon May 08, 2006 11:16 am |
|
|
The LCD you bought is ok, it is just that we use the lowest possible number of connections if possible, in this case the examples given usually only connect the 4 upper bits of port D4 until D7, D0 is used to control the enable, D1 for RS and D2 for RW. Therefore, we can use only 7 bits to control the LCD using the pic instead of 11 bits.
You can refer to the swapping nibble technique, swapping the lower nibble and upper nibble. You can use the include file #include<lcd.c> to be use for your lcd program, you can open the include file via th drivers folder. |
|
|
|