Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/17/03 08:16
Read: times


 
#41679 - 16 x 2 LCD display
Can anyone check my program.My program cannot display character on LCD screen.What is the assress of line 1 and line 2 of 16 x 2 LCD.

.include "8051.H"
;Lcd equ 3002h
EN equ P1.1
RS equ P1.0

ORG 0
sjmp Start

D0: mov DPH,#030h
mov DPL,#002h
ret

Write_Text:
setb EN
setb RS
movx @dptr,a
clr EN
lcall Delay
ret

lcdsetup:
setb EN
clr RS
lcall D0
mov a,#038h
movx @dptr,a
clr EN
lcall Delay
setb EN
clr RS
lcall D0
mov a,#0Eh
movx @dptr,a
clr EN
lcall Delay
setb EN
clr RS
lcall D0
mov a,#06h
movx @dptr,a
clr EN
lcall Delay
ret

clearlcd:
setb EN
clr RS
lcall D0
mov a,#01h
movx @dptr,a
;mov Lcd,#01h
clr EN
lcall Delay
ret

Delay:
mov r7,#00h
loop:
inc r7
mov a,r7
cjne a,#0ffh,loop
ret

Start:
lcall lcdsetup
lcall clearlcd
setb EN
clr RS
lcall D0
mov a,#05h ;Start cursor at location
movx @dptr,a ;no.5
;mov Lcd,#85h
clr EN
lcall Delay
lcall D0
mov a,#'E'
lcall Write_Text
;mov Lcd,# 'E'
lcall D0
mov a,#'R'
lcall Write_Text
lcall D0
mov a,#'R'
lcall Write_Text
lcall D0
mov a,#'O'
lcall Write_Text
lcall D0
mov a,#'R'
lcall Write_Text
lcall D0
mov a,#' '
lcall Write_Text
lcall D0
mov a,#'O'
lcall Write_Text
lcall D0
mov a,#'C'
lcall Write_Text
lcall D0
mov a,#'C'
lcall Write_Text
lcall D0
mov a,#'O'
lcall Write_Text
lcall D0
mov a,#'R'
lcall Write_Text
END



List of 26 messages in thread
TopicAuthorDate
16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
      RE: 16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
      RE: 16 x 2 LCD display            01/01/70 00:00      
         RE: 16 x 2 LCD display            01/01/70 00:00      
            RE: 16 x 2 LCD display            01/01/70 00:00      
            Felix, just kidding... :-)            01/01/70 00:00      
            RE: 16 x 2 LCD display            01/01/70 00:00      
               RE: 16 x 2 LCD display            01/01/70 00:00      
                  RE: 16 x 2 LCD display            01/01/70 00:00      
                     RE: 16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
      RE: 16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
      RE: 16 x 2 LCD display            01/01/70 00:00      
         RE: 16 x 2 LCD display, Alan            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
      RE: 16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
      RE: 16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      
   RE: 16 x 2 LCD display            01/01/70 00:00      

Back to Subject List