.equ lcdrs, p2.5 ;Port pin for LCD RS pin
.equ lcdrw, p2.6 ;Port pin for LCD R/W pin
.equ lcden, p2.7 ;Port pin for LCD Enable pin
mov a,#3ch
acall comd
mov a,#0eh
acall comd
mov a,#06h
acall comd
mov a,#01h
acall comd
mov a,#87h
acall comd
mov a,#'h'
acall disp
mov a,#'e'
acall disp
mov a,#'l'
acall disp
mov a,#'l'
acall disp
mov a,#'o'
acall disp
here:sjmp here
comd:
acall ready
mov p1,a
clr lcdrs
clr lcdrw
setb lcden
clr lcden
ret
disp:
acall ready
mov p1,a
setb lcdrs
clr lcdrw
setb p3.4
clr lcden
ret
ready:
clr lcden
mov p1,#0ffh
clr lcdrs
setb lcdrw
wait:
clr lcden
setb lcden
jb p1.7,wait
clr lcden
ret
.end