- Back to Home »
- LCD Interfacing with 8051 »
- program for lcd interfacing
Lcd interfacing:
org 00h
lcd equ p1
Rs equ p2.0
En equ p2.2
rw equ p2.1
mov lcd,#38h
acall cmd
acall delay
mov lcd,#08h
acall cmd
acall delay
mov lcd,#01h
acall cmd
acall delay
mov lcd,#0eh
acall cmd
acall delay
mov lcd,#80h
acall cmd
acall delay
mov dptr,#100h
abc: clr a
movc a,@a+dptr
jz b2
mov lcd,a
acall disp
acall delay
inc dptr
sjmp abc
b2: mov r7,#05
abc5: mov lcd,#1ch
acall cmd
acall delay
djnz r7,abc5
disp: setb Rs
clr rw
setb En
nop
clr En
ret
cmd: clr Rs
clr rw
setb En
nop
clr En
ret
delay: mov r1,#0feh
l2: mov r2,#0ffh
l1: djnz r2,l1
djnz r1,l2
ret
org 100h
db 'Vivek Kumar',0
end