View previous topic :: View next topic |
Author |
Message |
takumi
Joined: 07 Mar 2009 Posts: 14
|
Custom LCD driver |
Posted: Mon May 17, 2010 11:44 pm |
|
|
Hello, hi all!
I try to used customize pin for 16x2 lcd but fail to use the different pin configuration.
Anyone can help please!
my code as follow:
Code: |
/#define LCD_ENABLE_PIN PIN_B5
#define LCD_RS_PIN PIN_B6
#define LCD_RW_PIN PIN_B7
//#define LCD_DATA4 PIN_D0
//#define LCD_DATA5 PIN_D1
//#define LCD_DATA6 PIN_D2
//#define LCD_DATA7 PIN_D3
#define LCD_DATA_PORT D0_D1_D2_D3 // produce by wizard
#include <lcd.c>
void main()
{
lcd_init(); // Always call this first.
while(1)
{
lcd_gotoxy(1,1);
printf(lcd_putc,"Hello you");
lcd_gotoxy(1,2);
printf(lcd_putc,"PIC16F877A");
}
} |
|
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue May 18, 2010 1:22 pm |
|
|
Start by using the Flex lcd driver in the Code Library forum:
http://www.ccsinfo.com/forum/viewtopic.php?t=24661
It's easy to use, and it works for 99% of all people.
Once you have it working, then you can try to configure the CCS
driver with the Wizard, etc., if you still want to use it. |
|
![](templates/subSilver/images/spacer.gif) |
takumi
Joined: 07 Mar 2009 Posts: 14
|
|
Posted: Tue May 18, 2010 8:11 pm |
|
|
tq it work |
|
![](templates/subSilver/images/spacer.gif) |
|