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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/29/04 07:02
Read: times


 
#75070 - LCD User`s Manual.
Responding to: ???'s previous message

I have LCD user`s manual which saya
There are two types of 16x1 displays. The ones with 1:8 mux and those with 1:16 mux. The former are like the 1 line display. However for the 1:16 mux, the display has to be treated as a two line unit.

And the one have is 16x1 type but I have to treat it as two line display but I am not getting how to implement the code in my code. Please suggest me or give some hints.

My Code

$MOD51

;LCD Module testing programe
;D7 - D0 on P1
;RS on P3.0
;R/W on P3.1
;E on P3.2



ORG 0000H

MOV A, #38H ;2 LINE, 5*7 CHAR
ACALL COMNWRT
ACALL DELAY
MOV A, #0EH ;Display ON, Cursor OFF
ACALL COMNWRT
ACALL DELAY
MOV A, #01H ;Cleasr display screen
ACALL COMNWRT
ACALL DELAY


MOV DPTR, #0FFFH
BACK: CLR A
MOVC A, @A+DPTR
JZ ENDD
ACALL DATAWRT
ACALL DELAY
INC DPTR
SJMP BACK
ENDD: SJMP ENDD



COMNWRT:
MOV P1, A
CLR P3.0 ;RS = 0
NOP
NOP
CLR P3.1 ;R/W = 0
NOP
NOP
SETB P3.2 ;E = 1
NOP
NOP
CLR P3.2 ;E = 0
RET


DATAWRT:
MOV P1, A
SETB P3.0 ;RS = 1
NOP
NOP
CLR P3.1 ;R/W = 0
NOP
NOP
SETB P3.2 ;E = 1
NOP
NOP
CLR P3.2 ;E = 0
RET


DELAY: MOV R3, #50H
HERE2: MOV R4, #255H
HERE: DJNZ R4, HERE
DJNZ R3, HERE2
RET

ORG 0FFFH
DB 'Testing LCD Work',0
END


List of 10 messages in thread
TopicAuthorDate
LCD Problem.            01/01/70 00:00      
   RE: LCD Problem.            01/01/70 00:00      
      RE: LCD Problem.            01/01/70 00:00      
   RE: LCD Problem.            01/01/70 00:00      
      RE: LCD Problem.            01/01/70 00:00      
         LCD User`s Manual.            01/01/70 00:00      
            RE: LCD User`s Manual.            01/01/70 00:00      
   RE: LCD Problem.            01/01/70 00:00      
      Thanks Mr. Charles            01/01/70 00:00      
         Yes now my LCD module is working.            01/01/70 00:00      

Back to Subject List