单时钟完成多点分别计时的实现和应用
CJNE A,#20,DE3
CLR 2CH.1
LCALL OUT01
MOV 51H,#00H
LJMP DE3
DEAL3: JNB 2CH.2,DE4
INC 52H
MOV A,52H
CJNE A,#20,DE4
CLR 2CH.2
LCALL OUT01
MOV 52H,#00H
LJMP DE4
DEAL4: JNB 2CH.3,DE5I
INC 53H
MOV A,53H
CJNE A,#20,DE5I
CLR 2CH.3
LCALL OUT01
MOV 53H,#00H
DE5I: LJMP DE5
DEAL5: JNB 2CH.4,DE6I
INC 54H
MOV A,54H
CJNE A,#20,DE6I
CLR 2CH.4
MOV 54H,#00H
LCALL OUT01
DE6I: LJMP DE6
DEAL6: JNB 2CH.5,DE7I
INC 55H
MOV A,55H
CJNE A,#20,DE7I
CLR 2CH.5
LCALL OUT01
MOV 55H,#00H
DE7I: LJMP DE7
DEAL7: JNB 2CH.6,DE8I
INC 56H
MOV A,56H
CJNE A,#20,DE8I
CLR 2CH.6
LCALL OUT01
MOV 56H,#00H
DE8I: LJMP DE8
DEAL8: JNB 2CH.7,FINISH
INC 57H
MOV A,57H
CJNE A,#20,FINISH
CLR 2CH.7
LCALL OUT01
MOV 57H,#00H
FINISH: MOV A,2CH
CJNE A,#00H,TUI
SETB TR0;SETB TR0
POP ACC
POP PSW
RETI
TUI: SETB TR0;开定时器
POP ACC
POP PSW
RETI
OUT01: MOV A,2CH
MOV P2,A
CLR G0
LCALL DELAY
CLR CLOCK
LCALL DELAY
SETB CLOCK
NOP
CLR CLOCK
SETB G0
LCALL DELAY
RET