Hi, I like to ask how is the procedure like to program a 16x2 LCD (RT1602C) using 4-bits transmission and MCC-18 and PIC18F4520.
I had th"ESE" code which I found from the internet. However, I had tried all of them but still could not show anything on the LCD. There are times where it flashed some black box on the LCD but there are really rare and when I just amend some lines, there are no boxes anymore. Hence I could not find out what is the mistake.
I am using RT1602C. where the pins are as followed:
Code:
1---------------------GND
2---------------------VDD (This is the supply voltage for Logic)
3 ----------------V0 (Contrast) Connect to 1k resistor then to GND [color="#ff0000"]
[/color]4 ----------------RS
5 ----------------R/W
6 ---------------E (Enable)
7 ---------------DB0 (ignore as I am using 4 bits)
8 ---------------DB1 (ignore as I am using 4 bits)
9 ---------------DB2 (ignore as I am using 4 bits)
10 ---------------DB3 (ignore as I am using 4 bits)
11 -------------DB4 (Connected to Microchip RD0)
12 -------------DB5 (Connected to Microchip RD1)
13 -------------DB6 (Connected to Microchip RD2)
14 -------------DB7 (Connected to Microchip RD3)
15 -------------BL1 (connected straight to +5V)
16 -------------BL2 (connected straight to GND)
After initializing the port as output, these are the program:
I had these code from "some" website, but realising the need to set x03 and x02 in the begining. But I am still not know what is wrong with the program.
To make sure your LCD is up and running, look here - it explains the basic initialization to see a blinking cursor (this verifies your hardware and timing).
After you get that running, check the driver from my site (see sig).