ORG 1000H
MAIN:MOV R1,#0
HOR: MOV R2,#0
LOOP:MOV DPTR,#TAB ;段选
MOV A,R1
MOVC A,@A+DPTR
MOV P0,A
MOV DPTR,#YLCX ;位选
MOV A,R2
MOVC A,@A+DPTR
MOV P2,A
LCALL DEL300ms
INC R2
CJNE R2,#8,NEXTI
duan:MOV R2,#0
NEXTI:INC R1
CJNE R1,#11,LOOP
wei:MOV R1,#0
LJMP LOOP
TAB:DB 77H,67H,7FH,07H,7DH,6DH,66H,4FH,5BH,06H,3FH;
YLCX:DB 0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH;
DEL300ms:MOV R5,#30
DEL10ms:MOV R6,#20
DEL1: MOV R7,#249
DJNZ R7,$
DJNZ R6,DEL1
DJNZ R5,DEL10ms
RET
END
数码管300ms左到右A-0
最新推荐文章于 2024-08-17 21:26:54 发布