基于單片機(jī)的動(dòng)態(tài)數(shù)碼顯示電路設(shè)計(jì)
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
評(píng)論