- Back to Home »
- LCD Interfacing , LCD Interfacing with 8051 »
- moving message display program
Moving message on lcd:
org 00h
rs equ p1.0
rw equ p1.1
en equ p1.2
lcd equ p2
mov lcd,#38h
acall cmd
acall delay
mov lcd,#0ch
acall cmd
acall delay
mov lcd,#01h
acall cmd
acall delay
mov lcd,#06h
acall cmd
acall delay
mov lcd,#80h
acall cmd
acall delay
mov lcd,#'V'
acall disp
mov lcd,#'I'
acall disp
mov lcd,#'V'
acall disp
mov lcd,#'E'
acall disp
mov lcd,#'K'
acall disp
mov lcd,#' '
acall disp
mov lcd,#'K'
acall disp
mov lcd,#'U'
acall disp
mov lcd,#'M'
acall disp
mov lcd,#'A'
acall disp
mov lcd,#'R'
acall disp
mov lcd,#' '
acall disp
mov lcd,#'E'
acall disp
mov lcd,#'C'
acall disp
mov lcd,#'E'
acall disp
mov r2,#5
here: mov lcd,#1ch
acall cmd
acall delay
djnz r2,here
sjmp here
delay: mov r0,#0ffh
l2: mov r1,#0ffh
l1: djnz r1,l1
djnz r2,l2
ret
cmd: clr rs
clr rw
setb en
acall delay
clr en
ret
disp: setb rs
clr rw
setb en
acall delay
clr en
ret
end