Simple LCD PIC project.
PORTB 0-3 Data Lines
PORTA 2 RS
PORTA 3 E(nable)
PORTA 1 Up
PORTA 0 Down
There’s a ton of information on the internet about LCDs and PIC interfacing, go find them.
What was most annoying was the lack of data on 2 parts:
1. Initializing the display had conflicting information.
I'm guessing because there are different manufacturers of the LCDs
The easiest way to initialize it was to send it two bytes, 0x03 and 0x02 in 8 bit mode.
But it's not really necessary to specifically write those commands out.
The LCD won't recognize the difference.
What I am proposing is sending 0x32 in 4 byte mode instead of 0x03 then
0x02 in 8 bit mode. Not much difference there, but it's cleaner and shorter than the alternative.
2. Setting the Interface Length.
1 DL N F * *, N is 1 for 4 line LCDs as well
note: Text was taken from a wikipedia article about Fate/Stay Night.