|
|
View previous topic :: View next topic |
Author |
Message |
leevise
Joined: 05 Aug 2010 Posts: 89
|
Flexible LCD driver |
Posted: Fri Jul 29, 2011 12:21 am |
|
|
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
|
|
Posted: Fri Jul 29, 2011 8:50 pm |
|
|
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
|
|
Posted: Sun Jul 31, 2011 10:23 pm |
|
|
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
|
|
Posted: Mon Aug 01, 2011 1:03 pm |
|
|
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
|
|
|
|
|
|
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
|