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 support@ccsinfo.com

Flexible LCD driver

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



Joined: 05 Aug 2010
Posts: 89

View user's profile Send private message

Flexible LCD driver
PostPosted: Fri Jul 29, 2011 12:21 am     Reply with quote

Hello,
If i use the parallel connect the LCD 1602, how to use the flexible LCD driver ?
Can you give me a example for parallel connection?

And how to use the CCS's LCD.C in program? I don't understand it ,
if you use it, pls give me a example by using LCD.c driver (parallel connection).


Thank you very much!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jul 29, 2011 8:50 pm     Reply with quote

Here's a schematic:
http://www.oocities.org/nazlen_2000/graphics/lcd2.gif
It shows pins B6 and B7 connected to the LCD. I would recommend
that you use two other pins. The reason is that B6 and B7 are used
by the debugger (ICD2, IC3, Pickit2, Pickit3, ICD-U40, ICD-U64, etc).
You didn't say what PIC you are using. But if you have a 40-pin PIC,
it's better use Port D for the LCD connections. Just change all the
connections shown in the schematic to use PortD instead of PortB.

After you make the hardware connections between the PIC and the LCD,
you must edit the list of #define statements at the top of the Flex driver
to match those connections.


Also, if you have a board that you bought from some company,
you should post the manufacturer and model number of the board.
leevise



Joined: 05 Aug 2010
Posts: 89

View user's profile Send private message

PostPosted: Sun Jul 31, 2011 10:23 pm     Reply with quote

PCM programmer wrote:
Here's a schematic:
http://www.oocities.org/nazlen_2000/graphics/lcd2.gif
It shows pins B6 and B7 connected to the LCD. I would recommend
that you use two other pins. The reason is that B6 and B7 are used
by the debugger (ICD2, IC3, Pickit2, Pickit3, ICD-U40, ICD-U64, etc).
You didn't say what PIC you are using. But if you have a 40-pin PIC,
it's better use Port D for the LCD connections. Just change all the
connections shown in the schematic to use PortD instead of PortB.

After you make the hardware connections between the PIC and the LCD,
you must edit the list of #define statements at the top of the Flex driver
to match those connections.


Also, if you have a board that you bought from some company,
you should post the manufacturer and model number of the board.

I used the 40pin PIC 18F452, The data used the PortD, the command used the PortA. The detail as follow:

#define LCD_ENABLE_PIN PIN_A5 ////
#define LCD_RS_PIN PIN_A2 ////
#define LCD_RW_PIN PIN_A3 ////
#define LCD_DATA_PORT getenv("SFR:PORTD")

pls can you give me a sample used your driver?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Aug 01, 2011 1:03 pm     Reply with quote

You didn't say which pins of PortD are used to connect to the LCD upper
data bits, so I'll assume it's pins D4-D7 on the PIC. If so, these are
the #define statements for the Flex_lcd.c driver:
Code:

#define LCD_E        PIN_A5 
#define LCD_RS     PIN_A2 
#define LCD_RW    PIN_A3 

#define LCD_DB4   PIN_D4
#define LCD_DB5   PIN_D5
#define LCD_DB6   PIN_D6
#define LCD_DB7   PIN_D7
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