LCD: MOV A,#38H ;write LCD
ACALL COMNWRT
ACALL DELAY2
MOV A,#0EH
ACALL COMNWRT
ACALL DELAY2
MOV A,#01H
ACALL COMNWRT
ACALL DELAY2
MOV A,#06H
ACALL COMNWRT
ACALL DELAY2
MOV A,#84H
ACALL COMNWRT
ACALL DELAY2
MOV A,#'X'
ACALL DATAWRT
ACALL DELAY2
MOV A,#':'
ACALL DATAWRT
ACALL DELAY2
MOV A,R3
ACALL HEX2ASCH
ACALL DATAWRT
ACALL DELAY2
MOV A,R3
ACALL HEX2ASCL
ACALL DATAWRT
ACALL DELAY2
;MOV A,#0CAH
;ACALL COMNWRT
;ACALL DELAY2
;ACALL DELAY2
MOV A,#'Y'
ACALL DATAWRT
ACALL DELAY2
MOV A,#':'
ACALL DATAWRT
ACALL DELAY2
MOV A,R2
ACALL HEX2ASCH
ACALL DATAWRT
ACALL DELAY2
MOV A,R2
ACALL HEX2ASCL
ACALL DATAWRT
ACALL DELAY2
RET
COMNWRT: MOV LCDDB,A ;for writing LCD commands
CLR RS
CLR RW
SETB E
CLR E
RET
DATAWRT: MOV LCDDB,A ;for writing LCD datas
SETB RS
CLR RW
SETB E
CLR E
RET
;READY: SETB P1.7
; CLR RS
; SETB RW
;AGAIN1: CLR E
; SETB E
; JB P1.7,AGAIN1
; RET
have a look in your lcd datasheet... and compare timing between commands in initialisation (8bits or 4bits)...
hope it helps...
LCDs require time to powerup in the real world, unlike a Proteus simulation.
Do you have a 100ms to 200ms delay before accessing the LCD at the start of your code?
Also post a schematic of your circuit, including your regulated power section.
Have you implemented the contrast control of the LCD?
BigDog
COMNWRT: MOV LCDDB,A ;for writing LCD commands
CLR RS
CLR RW
SETB E
CLR E
RET
DATAWRT: MOV LCDDB,A ;for writing LCD datas
SETB RS
CLR RW
SETB E
CLR E
RET
you are getting garbage data on lcd or none at all? Is the first like complete black?
Also post the complete practical circuit that you have implemented.....
Your PIN connections are as follow:-
RS ---> P2.0
RW ---> P2.2
EN ---> P2.1
Pls check these connection whether u have write the program considering these pins or not...
As u have not defined your pin configuration in the code given above...
Kindly Check that and report us back....
And can u upload your proteus design by zipping it..
before Doing so check connection i have told u
Hope this assist
Oh!! dear don't be angry
we are just trying to help u....
what else can be do just guessing the faults...
I am sorry... if that post of mine was redundant to u..
I was just trying to help u
and also my ANOTHER question is (i dont want open another thread) can I run two 8051 with one crystal? if yes, how?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?