proteus仿真图见附件,我运行以下程序,示波器出不来波形,哪位高人帮我解决一下,谢谢!
ORG 000H
LJMP MAIN
ORG 0BH
AJMP
tiM0
ORG 1BH
AJMP TIM1
ORG 30H
MAIN:MOV TMOD,#11H
MOV TH1,#0
MOV TL1,#0
MOV TH0,#08H
MOV TL0,#00H
SETB ET0
SETB ET1
SETB EA
MOV 20H,#0
MOV R1,#1
MOV R2,#08H
MOV R3,#00H
KEY0:JB P1.0,KEY1
ACALL DL10MS
B P1.0,KEY1
JNB P1.0,$
CPL 00H
JNB 00H,KEY00
SETB TR1
SETB TR0
AJMP KEY1
KEY00:CLR TR0
CLR TR1
KEY1: JB P1.1,KEY2
ACALL DL10MS
JB P1.1,KEY2
JNB P1.1,$
INC R1
CJNE R1,#31,KEY2
MOV R1,#30
KEY2: JB P1.2,KEY3
ACALL DL10MS
JB P1.2,KEY3
JNB P1.2,$
DEC R1
CJNE R1,#0,KEY3
MOV R1,#1
KEY3:AJMP KEY0
DL10MS:MOV R5,#30
DL10:MOV R4,#0F0H
DJNZ R4,$
DJNZ R5,DL10
RET
TIM0:SETB P1.5
MOV A,R3
MOV B,R1
MUL AB
MOV R6,A
PUSH B
MOV A,R2
MOV B,R1
MUL AB
POP B
ADD A,B
MOV TH1,A
MOV TL1,R3
RETI
TIM1:CLR P1.5
MOV TH1,#0
MOV TL1,#0
SETB TR1
SETB TR0
RETI
END
-
一周热门 更多>