基于单片机的动态数码显示电路设计
5. 程序框图
6. 汇编源程序
ORG 00H
START: JB P1.7,DIR1
MOV DPTR,#TABLE1
SJMP DIR
DIR1: MOV DPTR,#TABLE2
DIR: MOV R0,#00H
MOV R1,#01H
NEXT: MOV A,R0
MOVC A,@A+DPTR
MOV P0,A
MOV A,R1
MOV P2,A
LCALL DAY
INC R0
RL A
MOV R1,A
CJNE R1,#0DFH,NEXT
SJMP START
DAY: MOV R6,#4
D1: MOV R7,#248
DJNZ R7,$
DJNZ R6,D1
RET
TABLE1: DB 06H,5BH,4FH,66H,6DH
TABLE2: DB 78H,79H,38H,38H,3FH
END
评论