本文包含原理图、PCB、源代码、封装库、中英文PDF等资源
您需要 登录 才可以下载或查看,没有账号?注册会员
×
?ORG 0000H
LJMP MAIN
ORG ? 0003H
LJMP BREAK0
? ORG ? 000BH
? LJMP CLOCK
ORG ? 0013H
LJMP ? BREAK1
ORG 0050H
MAIN: MOV A, #03H
MOV DPTR, #8000H
MOVX ? @DPTR, A
MOV ? SP, #5AH
MOV ? 2BH, #60H
MOV ? 2CH, #60H
MOV ? 2DH, #24H
MOV ? TMOD, #01H
MOV ? TH0, #3CH
MOV ? TL0, #0B0H
MOV ? IE, #87H
? SETB ? TR0
LOOP: LCALL ? DISP
LJMP LOOP
BREAK0:CLR EX0
? JNB ? P3.2, $
? INC ? 28H
? MOV ? A, 28H
? ADD ? A, #00H
? DA ? A
? MOV ? 28H, A
? SUBB ?A, #60H
? JC NEXT1
? MOV ? 28H, #00H
NEXT1: LCALL DISP
? SETB EX0
? RETI
BREAKl: ?CLR EXl
JNB P3.3, $
INC 29H
MOV ? A, 29H
ADD ? A, #00H
DA ? A
MOV ? 29H, A
SUBB ?A, #24H
JC ? NEXT2
MOV ? 29H, #00H
NEXT2: LCALL DISP
SETB ? EXl
RETI
DISP:MOV ? R0, #4FH
MOV A, 27H
ACALL ? PUTT
MOV A, 28H
ACALL ? PUTT
MOV A, 29H
ACALL ? PUTT
MOV R0, #4AH
MOV R2, #0DFH
DISP1: MOV DPTR, #8002H
MOV A, #00H
MOVX ?@DPTR, A
MOV A, @R0
MOV DPTR, #SEGTAB
MOVC ? A, @A+DPTR
MOV DPTR, ?#8002H
MOVX ? @DPTR, A
MOV A, R2
MOV DPTR, #8001H
MOVX @DPTR, A
MOV R3, #00H
DISP2: DJNZ ? R3, DISP2
INC R0
RR A
MOV R2, A
JB ACC.7, DISPl
RET
PUTT: MOV ?Rl, A
ACALL ?PUTTl
MOV A, R1
SWAP ? A
PUTT1: ANL ? A, #0FH
MOV @R0, A
DEC R0
RET
CLOCK: PUSH ? ?PSW
PUSH ? ?ACC
SETB ?RS0
MOV ? TH0, #3CH
MOV ? TL0, #0BDH
INC ? 26H
MOV ? A, 26H
CJNE ? A, #0AH, DONE1
MOV ? 26H, #00H
MOV ? R0, #27H
MOV R1, #2BH
MOV ? R3, #03H
CLOCK1: MOV ? A, @R0
ADD ? A, #01H
DA ? ? A
MOV ? @R0, A
MOV ? 3BH, @Rl
CJNE ? A, 3BH, NEXT3
MOV ? @R0, #00H
INC ? ? R0
INC ? ? R1
DJNZ ? R3, CLOCK1
NEXT3: ACALL ? CTRL
DONE1: POP ACC
POP ? PSW
RETI
CTRL: MOV ?DPTR, #100CH
MOV ? 2EH, DPL
CTRL1: MOV ? DPL, 2EH
MOV ? R3, #04H
CTRL2: INC ? DPTR
DJNZ ?R3, CTRL2
MOV ? 2EH, DPL
MOV ? R3, #03H
CLR A
MOVC ? A, @A+DPTR
JZ ? DONE2
MOV ? 3AH, A
MOV ? R1, #2AH
CTRL3: INC DPTR
DEC ? R1
CLR ? A
MOVC ? A, @A+DPTR
MOV ? 3CH, A
MOV ? A, @R1
CJNE ? A, 3CH, CTRL1
DJNZ ? R3, CTRL3
MOV ? A, 3AH
MOV ? P1, A
DONE2: RET
SEGTAB: DB ? 3FH, 06H, 5BH, 4FH, 66H, 6DH, 7DH
? ? DB ? 07H, 7FH, 6FH
? ? ORG 1010H
DB 0FEH, 06H, 20H, 00H, 0FFH, 06H, 20H, 15H
DB 0EFH, 06H, 25H, 00H, 0FFH, 06H, 40H, 00H
DB 0FEH, 07H, 20H, 00H, 0FFH, 07H, 20H, 10H
DB 0FEH, 07H, 40H, 00H, 0FFH, 07H, 40H, 15H
DB 0FEH, 07H, 50H, 00H, 0FFH, 07H, 50H, 10H
DB 0FEH, 08H, 35H, 00H, 0FFH, 08H, 35H, 10H
DB 0FEH, 08H, 45H, 00H, 0FFH, 08H, 45H, 10H
DB 0FEH, 09H, 30H, 00H, 0FFH, 09H, 30H, 10H
DB 0EFH, 09H, 35H, 00H, 0FFH, 09H, 40H, 00H
? ? DB 0EFH, 09H, 35H, 00H, 0FFH, 09H, 40H, 00H
DB 0FEH, 09H, 45H, 00H, 0FFH, 09H, 45H, 15H
DB 0FEH, 09H, 50H, 00H, 0FFH, 09H, 50H, 10H
DB 0FEH, 10H, 35H, 00H, 0FFH, 10H, 35H, 10H
DB 0FEH, 10H, 45H, 00H, 0FFH, 10H, 45H, 10H
DB 0FEH, 11H, 30H, 00H, 0FFH, 11H, 30H, 10H
DB 0FEH, 14H, 15H, 00H, 0FFH, 14H, 15H, 15H
DB 0EFH, 14H, 16H, 00H, 0FFH, 14H, 20H, 00H
DB 0FEH, 14H, 25H, 00H, 0FFH, 14H, 25H, 15H
DB 0FEH, 14H, 30H, 00H, 0FFH, 14H, 30H, 10H
DB 0FEH, 15H, 15H, 00H, 0FFH, 15H, 15H, 10H
? ? DB 0FEH, 15H, 15H, 00H, 0FFH, 15H, 15H, 10H
DB 0FEH, 15H, 25H, 00H, 0FFH, 15H, 25H, 10H
DB 0FEH, 16H, 10H, 00H, 0FFH, 16H, 10H, 10H
DB 0FEH, 16H, 20H, 00H, 0FFH, 16H, 20H, 10H
DB 0FEH, 17H, 05H, 00H, 0FFH, 17H, 05H, 10H
DB 0EFH, 17H, 15H, 00H, 0FFH, 17H, 15H, 10H
DB 0FEH, 18H, 00H, 00H, 0FFH, 18H, 00H, 10H
DB 0FEH, 19H, 20H, 00H, 0FFH, 19H, 20H, 15H
DB 0FEH, 19H, 30H, 00H, 0FFH, 19H, 30H, 10H
DB 0FEH, 21H, 30H, 00H, 0FFH, 21H, 30H, 10H
DB 0FEH, 23H, 00H, 00H, 0FFH, 23H, 00H, 15H
? ? DB 00H
END |