|
这个时间是如何算出来的.
ORG 0000H
START: MOV R2,#50 ;请问这个时间显示的是多长,如何算出来的. 就看这句程序.
LOOP1: ACALL SCAN1
DJNZ R2,LOOP1
MOV R2,#50
LOOP2: MOV DPTR,#BLANK
ACALL SCAN1
DJNZ R2,LOOP2
AJMP START
SCAN1: MOV R5,#11101111B
MOV R4,#05
MOV R0,#00
LOOP: MOV A,R0
MOVC A,@A+DPTR
MOV P0,A
INC R0
MOV P2,R3
ACALL DELAY
ORL P2,#11111111B
MOV A,R5
RR A
MOV R5,A
DJNZ R4,LOOP
RET
DELAY: MOV R6,#5
DL1: MOV R7,#200
DL2: DJNZ R7,DL2
DJNZ R6,DL1
RET
TABLE: DB 0C0H
DB 0F9H
DB 0A4H
DB 0B0H
DB 99H
DB 92h
DB 82H
BLANK: DB 0FFH
DB 0FFH
DB 0FFH
DB 0FFH
DB 0FFH
END
|
|