Problem interfaceing PIC18F2550 with 2x16 character LCD

Status
Not open for further replies.

hkBattousai

Member
This is the datasheet of the LCD:
**broken link removed**

I'm using XLCD library which comes with C18 compiler.

The code below is suppose to work, isn't it?

Code:
OpenXLCD(EIGHT_BIT | LINES_5X7);
while(BusyXLCD());
SetDDRamAddr(0x00);	// Switch to line #1
while(BusyXLCD());
putsXLCD((const rom char *) "This is line 1");
while(BusyXLCD());
SetDDRamAddr(0x40);	// Switch to line #2
while(BusyXLCD());
putsXLCD((const rom char *) "This is line 2");
while(BusyXLCD());
while (1);

Am I doing something wrong, or missing something?
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…