This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to program lcd 20x2

hello,

i want to ask anyone who's know about lcd program,
when i use lcd 16x2 with this routine program its appear in lcd. this is a routine for 16x2:
-----------------------------------------------

startup: mov a,#38h

acall comnwrt

acall delay

mov a,#0eh

acall comnwrt

acall delay

mov a,#01h

acall comnwrt

acall delay

ret

comnwrt: mov output,a

clr rs

clr rw

setb e

acall delay

clr e

ret

datawrt: mov p1,a

setb rs

clr rw

setb e

acall delay

clr e

ret

---------------------------------------------------

anyone who's know how to change this program to lcd 20x2, because i use 20x2 lcd, i can do the 16x2 lcd program but not 20x2..

or maybe the program its same? because my problem, the character doesn't appear in a second line..

what can i do?
please help me..

Parents
  • The code isn't posted as code, but as text.

    The code does not contain any comments.

    The code calls a function that ends with a delay - and the caller then does one more delay. Why always two calls to delay? Because the code isn't documented, so you didn't notice the first call?

    The posted code is not compilete. No code shows where the first 'ret' will return to.

    The posted code has a label 'datawrt' that is never referenced. Where is the text you are trying to send to the display?

Reply
  • The code isn't posted as code, but as text.

    The code does not contain any comments.

    The code calls a function that ends with a delay - and the caller then does one more delay. Why always two calls to delay? Because the code isn't documented, so you didn't notice the first call?

    The posted code is not compilete. No code shows where the first 'ret' will return to.

    The posted code has a label 'datawrt' that is never referenced. Where is the text you are trying to send to the display?

Children
No data