vead
Full Member level 5
Hello ,
I am making small project on software
Microcontroller 8051
language assembly
assembler- 8051 IDE
can someone tell me why message are not scrolling continuously on LCD. whats wrong with code ?
I am making small project on software
Microcontroller 8051
language assembly
assembler- 8051 IDE
Code ASM - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 ORG 0H MOV A,#38H ; command ACALL COMNWRT ;call command ACALL DELAY ;give LCD some time MOV A,#0EH ;display on, cursor on ACALL COMNWRT ;call command MOV A,#01 ;clear LCD ACALL COMNWRT ;call command ACALL DELAY ;give LCD some time MOV A,#06H ;shift cursor right ACALL COMNWRT ;call command subroutine ACALL DELAY ;give LCD some time MOV A,#84H ACALL COMNWRT ;call command ACALL DELAY ;give LCD some time MOV A,#'V' ;display letter J ACALL DATAWRT ;call display ACALL DELAY ;give LCD some time MOV A,#'E' ;display letter J ACALL DATAWRT ;call display ACALL DELAY ;give LCD some time MOV A,#'A' ;display letter J ACALL DATAWRT ;call display ACALL DELAY ;give LCD some time MOV A,#'D' ;display letter D ACALL DATAWRT ;call display AGAIN: SJMP AGAIN ;stay here COMNWRT: ;send command to LCD MOV P1,A ;copy reg A to port 1 CLR P2.0 ;RS=0 for command CLR P2.1 ;R/W=0 for write SETB P2.2 ;E=1 for high pulse ACALL DELAY ;give LCD some time CLR P2.2 ;E=0 for H-to-L pulse RET DATAWRT: ;write data to LCD MOV P1,A ;copy reg A to port 1 SETB P2.0 ;RS=1 for data CLR P2.1 ;R/W=0 for write SETB P2.2 ;E=1 for high pulse ACALL DELAY ;give LCD some time CLR P2.2 RET DELAY: MOV R3,#50 HERE2: MOV R4,#255 HERE: DJNZ R4,HERE DJNZ R3,HERE2 RET END
can someone tell me why message are not scrolling continuously on LCD. whats wrong with code ?