;
ORG 0000H
JMP MAIN
ORG 000BH
JMP TC0S
ORG 001BH
JMP TC1S
MAIN:
MOV TMOD, #61H
MOV TH1, #0F6H
MOV TL1, #0F6H
SETB TR1
SETB ET1
SETB ET0
SETB EA
CLR P1.7
SJMP $
;
TC1S: ;收到了10个脉冲,发生T1计数中断
MOV TH0, #3CH
MOV TL0, #0B0H
SETB TR0 ;令T0定时50ms
SETB P1.7
RETI
TC0S: ;到了50ms
CLR P1.7
CLR TR0
RETI
END