XLCD with PIC18f452

Status
Not open for further replies.
Well, the problem is that I can only write on the first line. The second line is missing.
Even when I change the contrast to maximum, only the first row shows black rectangles, the second line is missing.
Initially I thought the problem should be the display but it works fine with an Arduino Uno, and I also tried other display and no luck.
Any ideas what could be the problem?
 
The problem is with this line

OpenXLCD(FOUR_BIT & LINES_5X7);

The defines are not correct, and you cannot include the cursor defines... You are using no function set as the parameters equate to 0x08... which isn't correct....
 
Hi,
I don't mean to hijack this thread...
I used this thread to get Oshonsoft PIC18 simulator to run the code posted and it worked well, thank you!

How do I send data (eg. output of analog pin ADC conversion 0-1023) to the LCD to be displayed?
I can display strings, but not other data types (eg. unsigned int)

I have tried using itoa(), snprintf() with no luck. I can't seem to find the function prototypes in order to figure out what arguments I need to provide them.
 
Last edited:
I don't mean to hijack this thread...

You just did!!! The code on here was in C, not basic!!! did you convert it? Oshonsoft has the ability to print values to the LCD screen..

If you are using C however! Look into the sprintf() function...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…