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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/28/04 20:31
Read: times


 
Msg Score: -1
 -1 Didn't Search First
#75050 - LCD Problem.
I have writen small programe for testing LCD module 16*1 type. It is not working properly. It only shows first 8 charecter. I have tested two LCD module of 16*1 char. type but still it shows only first 8 char. Please help.

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, #30H ;1 LINE, 5*7 CHAR
ACALL COMNWRT
ACALL DELAY
MOV A, #0CH ;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