和数码管相似,每显示一行数据后要进行消隐处理。
ORG 0000H
LJMP main
ORG 0080H
main:
MOV R1,#00H
MOV R2,#08H
MOV R7,#0feH
LABEL:
MOV DPTR,#TABA
MOV A,R1
MOVC A,@A+DPTR
MOV P0,A
nop
MOV A,R7
MOV P2,A
RL A
MOV R7,A
nop
INC R1
Mov P0,#00h
DJNZ R2,LABEL
Lcall DL
JMP main
DL: MOV R4,#02H
DL1:MOV R3,#01FH
DL2: DJNZ R3,DL2
DJNZ R4,DL1
ret
TABA: DB 00H,08H,08H,038H,08H,08H,0FFH,00H
END
|