. . . .
MOV A,29H
CJNE A,#05H,ETI1 ;0.3秒时间到,用来闪烁延时 MOV 29H,#00H MOV A,R2
CJNE A,#01H,LOOP1 ;R2为01秒闪烁 MOV 3EH,#0FDH ;使时位选能够正常扫描 MOV 3FH,#0FEH
XRL 3AH,#20H ;使秒原来正常扫描的位选关闭,原来关闭的能够正常扫描 XRL 3BH,#10H AJMP ETI1
LOOP1: CJNE A,#02H,LOOP2 ;R2为02分闪烁 MOV 3AH,#0DFH ;使秒位选能够正常扫描 MOV 3BH,#0EFH
XRL 3CH,#08H ;使分原来正常扫描的位选关闭,原来关闭的能够正常扫描 XRL 3DH,#04H AJMP ETI1
LOOP2: CJNE A,#03H,ETI1 ;R2为03时闪烁 MOV 3CH,#0F7H ;使分位选能够正常扫描 MOV 3DH,#0FBH
XRL 3EH,#02H ;使时原来正常扫描的位选关闭,原来关闭的能够正常扫描 XRL 3FH,#01H ETI1: POP PSW POP ACC RETI
w. . .v
. . . .
原理图
w. . .v