i can display characters on a 16*2 lcd with AT89c51 but i m unable to send a string plz see code and modify it
MOV A,#38H
ACALL COMNWRT
ACALL DELAY
MOV A,#0EH
ACALL COMNWRT
ACALL DELAY
MOV A,#01H
ACALL COMNWRT
ACALL DELAY
MOV A,#06H
ACALL COMNWRT
ACALL DELAY
MOV A,#80H
ACALL COMNWRT
ACALL DELAY
ACALL LOOP
ACALL DELAY
MSG: DB "WELCOME",00H
MOV DPTR,#MSG
LOOP:
CLR A
MOVC A,@A+DPTR
JZ EXIT
ACALL DATAWRT
INC DPTR
SJMP LOOP
EXIT:RET
SJMP $
COMNWRT:
MOV P1,A
CLR P2.0
CLR P2.1
SETB P2.2
CLR P2.2
RET
DATAWRT:
MOV P1,A
SETB P2.0
CLR P2.1
SETB P2.2
CLR P2.2
RET
DELAY: MOV R3,#100
HERE2:
MOV R4,#255H
HERE:
DJNZ R4,HERE
DJNZ R3,HERE2
RET
END
MOV A,#38H
ACALL COMNWRT
ACALL DELAY
MOV A,#0EH
ACALL COMNWRT
ACALL DELAY
MOV A,#01H
ACALL COMNWRT
ACALL DELAY
MOV A,#06H
ACALL COMNWRT
ACALL DELAY
MOV A,#80H
ACALL COMNWRT
ACALL DELAY
ACALL LOOP
ACALL DELAY
MSG: DB "WELCOME",00H
MOV DPTR,#MSG
LOOP:
CLR A
MOVC A,@A+DPTR
JZ EXIT
ACALL DATAWRT
INC DPTR
SJMP LOOP
EXIT:RET
SJMP $
COMNWRT:
MOV P1,A
CLR P2.0
CLR P2.1
SETB P2.2
CLR P2.2
RET
DATAWRT:
MOV P1,A
SETB P2.0
CLR P2.1
SETB P2.2
CLR P2.2
RET
DELAY: MOV R3,#100
HERE2:
MOV R4,#255H
HERE:
DJNZ R4,HERE
DJNZ R3,HERE2
RET
END