CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

HD44780 LCD Problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
deltatech



Joined: 22 Apr 2006
Posts: 87

View user's profile Send private message

HD44780 LCD Problem
PostPosted: Fri May 05, 2006 4:39 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri May 05, 2006 4:44 pm     Reply with quote

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

View user's profile Send private message

LCD is ok...
PostPosted: Mon May 08, 2006 11:16 am     Reply with quote

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. Idea
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group