org 0000h
ajmp main
org 0030h
main: mov R0,#60
Loop: mov A,R0
mov B,#10
DIV AB
Display: SETB P2.6
mov DPTR,#TAB
movc A,@A+DPTR
mov P1,A ;十位显示
SETB P2.7
mov A,B
mov DPTR,#TAB
movc A,@A+DPTR
mov P1,A ;个位显示
acall del1
INT: DEC R0
DJNZ R0,Loop
sjmp main
del1: mov R1,#20
mov TMOD,#01h
mov TH0,#3ch
mov TL0,#0b0h
SETB TR0
JNB TF0,$
clr TF0
DJNZ R1,del1
sjmp INT
ret
TAB: DB 0c0h,0f9h,0a4h,0b0h,99h
DB 92h,82h,0f8h,80h,90h
end
求教各位大侠帮小弟看看,程序为什么没办法实现60s倒计时?
虚心求教 |