Lab Manual of Microcontroller & Interfacing Page 52
MOV A,@R0
MOV B,#6
MUL AB
DEC R0
DEC R0
ADD A,@R0
MOV @R0,A
INC R0
INC R0
MOV A,@R0
MOV B,#5
MUL AB
DEC R0
ADD A,@R0
MOV @R0,A
INC R0
MOV A,@R0
RL A ; Mply with 2
MOV @R0,A
RET
DECADJ:
MOV A,@R0
DECLOP:
MOV B,#10
DIV AB
MOV @R0,B
INC R0
ADD A,@R0
MOV @R0,A
CJNE R0,#37h,DECLOP
RET
COMMAND:
PUSH DPH
PUSH DPL
MOV P1,A
ACALL DELAY ;Write when when display not busy
CLR P3.0 ;Select command register
CLR P3.2 ;Write Enable
SETB P3.1 ;Set Enable terminal of LCD
NOP
NOP
CLR P3.1
POP DPL
POP DPH
RET
DISP_DATA:
PUSH DPH
PUSH DPL
Comments to this Manuals