eblc1388 said:
williB said:
I think that you have to get the data sheet for the LCD , and see what codes it is expecting to recieve for a given character..
It has nothing to do with the LCD.
For example, if you want to display a byte value of 0x68 on the LCD, then you have to send 0x36 and 0x38 to the LCD. These are the ASCII value of "6" and "8" repectively. The first would display as 6 on the display while the last byte would display as 8. So you get 68 displayed.
Another example: to display 0xCD, you need to send 0x43 and then 0x44.
To display a single character "C", just send 0x43 to LCD.
Search for ASCII table on the net.
Hey eblc1338
actually , i wrote your program, and it didn't work!!!
i really don't know why ?
i bought another LCD to test on it , it gave me another anonymous character!
i am pretty sure the lcd is working well, and all the connections are right,
it displays the characters so well when i sent it ,
i thought the problem was from the MC RAM so i tried another MC, the same result too !
here is the program for your example, see it yourself
ORG 0H ;
Mov A, #38 H ; Init LCD 2 lines, 5*7 Matrix
LCALL Command ; Issue command
Mov A, #0E H ; LCD on, cursor on
LCALL Command ; issue command
Mov A, #01 H ; Clear LCD command
LCALL Command ; issue command
Mov A, #06 H ; Shift cursor right
LCALL Command ; issue command
Mov A, #80 H ; Force cursor at the beginning of the 1st
LCALL Command ; issue command
Mov A, # 36H
Mov 30H, A
Mov A, # 38H
Mov 31H,A
Mov R0, 30H ; RAM pointer
Mov A,@R0
ACALL Romeo
INC R0
Mov A,@R0
ACALL Romeo
SJMP End
Command: ACALL Ready
Mov P1, A
CLR P2.5
CLR P2.6
SETB P2.7
CLR P2.7
RET
Romeo: ACALL Ready
Mov P1, A
SETB P2.5
CLR P2.6
SETB P2.7
CLR P2.7
RET
Ready: SETB P1.7
CLR P2.5
SETB P2.6
Back: CLR P2.7
SETB P2.7
JB P1.7, Back
RET
End:sjmp End