Update 2013-03-25:
I've updated this example code to work with the latest Microchip XC8 compiler. The code is working perfectly with a PIC18F14K50, but can be very easily modified for use with any PIC.
Download: https://github.com/veegee/pic18-lcd
Hi. I'm playing with one of those displays and sometimes due to electrical reasons, my displays completely hangs up (display goes off and ignores all my messages). How could I detect this hang up? I've tried to check the busy flag but this does not help me.
ReplyDeleteI've also tried to compare the value stored in first slot in DDRAM with its theorical value but also seems to not work. I have no more ideas.
This code attempts to call on the 'delays.h' header file. Can you post this file code? Thanks!
ReplyDeletedelays.h is included with Microchip C18
ReplyDeletehow can we get this code to show a floating variable?
ReplyDeleteSomehow if you do a printf with a float variable, the variable won't appear on the LCD.
But you printf with a int variable, it works.
Thanks for your advice in advance
Hmm, printing anything should work. It's just a normal printf. Whatever printf prints will be displayed on the LCD via the LCD putc. I don't know why it wouldn't work.
ReplyDeletehmm compiled this in c18 and ran in pic18 simulator and all i get is one garbage character...
ReplyDeletehi.. i cant put floating var into the sentence.. hope to seek some reply..
ReplyDeleteIt`s a perfect running code!
ReplyDeleteThanks a lot!
A #DEVICE required before this line
ReplyDelete1 Errors, 0 Warnings.
Halting build on first failure as requested.
Just updated this example for the latest xc8 compiler: https://github.com/veegee/pic18-lcd
ReplyDeleteEverything is working, tested on a PIC18F14k50.
can use LCD with pic18f4685?
ReplyDeleteMPLAB C18 compiler
Can you do upload again?