Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top