If you are talking about the MPLAB C18 LCD libraries, I had a tough time getting them to work, but finally I managed it. After you make your changes to the xlcd.h (not xlcd.c) you need to run the makeonep.bat like this: makeonep 18f452 =DDf in fact you are using 18f452. One thing to note that, the output might give errors like unknown filename and so on when the bat file is run. The workaround I found for this is to uninstall mplab c18. Then reinstall in a root directory like: C:\MPLAB18 (no more than 8 characters). And say yes to everything it asks after the setup (puts the install directory to path). After this you will need to make sure that there are no errors so try the following: makeonep 18f452 > c:\cmpout.txt Which will put the output of the batch file to the specified file. After it is done, open the file and look for any errors. If there is (e.g. I had to put the c:\progra~1\mplab to the path myself, it was not in the path, therefore, the compiliation did not work successfully) you need to fix it. Also, after you compile, check the p18f452.lib file in the lib directory to see if the size is similar to the original file. If the compile was not complete then the library seems to be smaller in size. After recompiling my p18f452.lib is 464KB. Also make sure that the DelayFor18TCY function is correctly written according to your clock speed. I also found some errors (I think) in the openxlcd function so without chaning that I added one more function to my software which you can find below. In the main program all I do is set the tris' correctly and then call the InitializeLCD function which is below. The commands sent to the lcd is for 4bit mode! I hope this helps, this is everthing I did to get the LCD library to work. void InitializeLCD(void) { char data[] =3D "Testing LCD function"; char data2[] =3D " I hope it works "; =09 ADCON1 =3D 0x06; PORTA =3D TRISA =3D 0; PORTB =3D TRISB =3D 0; PORTC =3D TRISC =3D 0; OpenXLCD(FOUR_BIT & LINES_5X7); // configure external LCD // Set data interface width, # lines, font while(BusyXLCD()); // Wait if LCD busy WriteCmdXLCD(0x20); // Function set cmd // Turn the display on then off while(BusyXLCD()); // Wait if LCD busy WriteCmdXLCD(DOFF&CURSOR_OFF&BLINK_OFF); // Display OFF/Blink OFF while(BusyXLCD()); // Wait if LCD busy WriteCmdXLCD(DON&CURSOR_OFF&BLINK_OFF); // Display ON/Blink ON // Clear display while(BusyXLCD()); // Wait if LCD busy WriteCmdXLCD(0x01); // Clear display // Set entry mode inc, no shift while(BusyXLCD()); // Wait if LCD busy WriteCmdXLCD(0x06); // Entry Mode // Set DD Ram address to 0 while(BusyXLCD()); // Wait if LCD busy SetDDRamAddr(0x80); // Set Display data ram address to 0 while(BusyXLCD()); putsXLCD(data); while(BusyXLCD()); SetDDRamAddr(0x80); while(BusyXLCD()); putsXLCD(data); while(BusyXLCD()); SetDDRamAddr(0x94); while(BusyXLCD()); putsXLCD(data2); while(BusyXLCD()); // Wait if LCD busy WriteCmdXLCD(DON&CURSOR_OFF&BLINK_OFF); // Display ON/Blink ON return; } =D6mer YALHI oyalhi@teksan.com.tr http://www.teksan.com.tr Tel : +90 212 613 22 00 Fax: +90 212 544 70 35 -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Jim Main Sent: Thursday, January 03, 1980 9:27 AM To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]: PIC C18 LCD libraries and PICDEM 2 Plus board Has anyone managed to get the LCD to work on the Picdem 2 plus board, using the C18 library functions? I can't get it to work so far. I've changed the relevant port pins and recompiled the xlcd.c file, but to no avail... Jim -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.