LCD Interfacing
LCD Interfacing
LCD Interfacing
PIN
NAME FUNCTION
NO
1 VSS Ground pin
5 R/W for reading the data R/W pin should be high (R/W=1)
to write the data to LCD R/W pin should be low (R/W=0)
Interfacing 16×2 LCD with 8051
PIN
NAME FUNCTION
NO
Command:
COMMAND FUNCTION
0F For switching on LCD, blinking the cursor.
2 Return home.
4 Decrement cursor
6 Increment cursor
COMMAND FUNCTION
Sample Code:
ORG 00H;INITIALIZATION
MOV SP, #07H
MOV PSW, #00H
MOV P1,#0FFH
SJMP EXIT
EXIT:
END