;sfr BYTE PCATH EQU 0F9H PCATL EQU 0E9H PCACMOD EQU 0D9H T2CON EQU 0C8H RCAP2L EQU 0CAH RCAP2H EQU 0CBH TL2 EQU 0CCH TH2 EQU 0CDH
;BIT PCACR EQU 0DEH PCACF EQU 0DFH PPC EQU 0BEH EC EQU 0AEH TCLK EQU 0CCH RCLK EQU 0CDH ET2 EQU 0ADH TR2 EQU 0CAH
CWDT EQU P0.7 LED0 EQU P0.0 LED1 EQU P0.1 LED2 EQU P0.2 LED3 EQU P0.3
ORG 0000H LJMP A08E8 ORG 0023H LJMP F084C ORG 0033H LJMP F060E
A0036: CLR 10H CLR 11H CLR 12H CLR 13H CLR 14H CLR 15H CLR 16H CLR 17H CLR 18H SETB 19H CLR A MOV 55H,A MOV 56H,A MOV 57H,A MOV R1,A MOV 58H,A MOV 59H,A MOV 5AH,#18H MOV 5BH,#0CH MOV 62H,#03H MOV 63H,#0E8H MOV 64H,A MOV 65H,A CLR EA MOV P1,#0FFH JB P2.1,A0071 MOV 31H,#08H A0071: JB P2.2,A007A MOV A,#04H ADD A,31H MOV 31H,A A007A: JB P2.3,A0081 INC 31H INC 31H A0081: MOV A,31H JNZ A0088 MOV 31H,#02H A0088: MOV C,P2.7 CPL C MOV 18H,C JNB P2.0,A00A3 MOV 62H,#17H MOV 63H,#70H MOV 34H,#03H CLR 00H MOV 5AH,#10H MOV 5BH,#08H SJMP A00B4 A00A3: MOV 62H,#2EH MOV 63H,#0E0H MOV 34H,#05H SETB 00H MOV 5AH,#18H MOV 5BH,#0CH A00B4: JB P2.5,A00BC MOV 3BH,#0AH SJMP A00BF A00BC: MOV 3BH,#0FH A00BF: LCALL F0A40 CLR A MOV TCON,A MOV TMOD,#55H MOV TH0,A MOV TL0,A MOV TH1,A MOV TL1,A MOV T2CON,A SETB TCLK SETB RCLK MOV RCAP2H,#0FFH MOV RCAP2L,#0DCH MOV TH2,#0FFH MOV TL2,#0DCH SETB ET2 MOV SCON,#40H SETB ES SETB REN SETB PPC SETB EC MOV PCACMOD,#01H MOV PCATH,#3CH MOV PCATL,#0B0H SETB EA SETB TR2 SETB PCACR SETB TR0 SETB TR1
A0102: JNB 04H,A0102 MOV A,34H JNZ A0102 JNB 19H,A0124 MOV A,52H ADD A,#05H MOV 5DH,A CLR A ADDC A,51H MOV 5CH,A MOV A,54H ADD A,#05H MOV 5FH,A CLR A ADDC A,53H MOV 5EH,A CLR 19H A0124: CLR C MOV A,52H SUBB A,63H MOV A,51H SUBB A,62H JNC A0135 CLR 0AH MOV C,0AH MOV LED0,C A0135: CLR C MOV A,54H SUBB A,63H MOV A,53H SUBB A,62H JNC A0146 CLR 0BH MOV C,0BH MOV LED2,C A0146: SETB C MOV A,52H SUBB A,63H MOV A,51H SUBB A,62H JC A016A JB 0AH,A016A JNB 10H,A016A CLR 10H SETB 0AH MOV A,52H ADD A,#0AH MOV 5DH,A CLR A ADDC A,51H MOV 5CH,A CLR 02H SJMP A0181 A016A: SETB C MOV A,52H SUBB A,63H MOV A,51H SUBB A,62H JC A017F JB 0AH,A017F JB 10H,A017F SETB 10H SJMP A0181 A017F: CLR 10H A0181: SETB C MOV A,54H SUBB A,63H MOV A,53H SUBB A,62H JC A01A5 JB 0BH,A01A5 JNB 11H,A01A5 CLR 11H SETB 0BH MOV A,54H ADD A,#0AH MOV 5FH,A CLR A ADDC A,53H MOV 5EH,A CLR 03H SJMP A01BC A01A5: SETB C MOV A,54H SUBB A,63H MOV A,53H SUBB A,62H JC A01BA JB 0BH,A01BA JB 11H,A01BA SETB 11H SJMP A01BC A01BA: CLR 11H A01BC: JB 0AH,A01C2 LJMP A03A0 A01C2: CLR 0EH CLR 0FH CLR A MOV 60H,A MOV 61H,A INC 2FH MOV A,2FH CJNE A,#0CH,A01DA CLR A MOV 2FH,A MOV C,LED0 CPL C MOV LED0,C A01DA: MOV C,02H CPL C MOV LED1,C SETB C MOV A,52H SUBB A,5DH MOV A,51H SUBB A,5CH JC A01F8 SETB 0EH MOV A,52H SUBB A,5DH MOV 61H,A MOV A,51H SUBB A,5CH MOV 60H,A A01F8: SETB C MOV A,52H SUBB A,5DH MOV A,51H SUBB A,5CH JNC A0212 SETB 0FH CLR C MOV A,5DH SUBB A,52H MOV 61H,A MOV A,5CH SUBB A,51H MOV 60H,A A0212: JNB 0EH,A022C CLR C MOV A,61H SUBB A,31H MOV A,60H SUBB A,#00H JC A022C JB 02H,A022C JNB 12H,A022C CLR 12H SETB 02H SJMP A0248 A022C: JNB 0EH,A0246 CLR C MOV A,61H SUBB A,31H MOV A,60H SUBB A,#00H JC A0246 JB 02H,A0246 JB 12H,A0246 SETB 12H CLR LED1 SJMP A0248 A0246: CLR 12H A0248: JB P2.4,A0281 JB 0FH,A0259 SETB C MOV A,61H SUBB A,#01H MOV A,60H SUBB A,#00H JNC A0265 A0259: JNB 02H,A0265 JNB 13H,A0265 CLR 13H CLR 02H SJMP A0281 A0265: JB 0FH,A0273 SETB C MOV A,61H SUBB A,#01H MOV A,60H SUBB A,#00H JNC A027F A0273: JNB 02H,A027F JB 13H,A027F SETB 13H SETB LED1 SJMP A0281 A027F: CLR 13H A0281: JNB P2.4,A02C2 JB 0FH,A0292 SETB C MOV A,61H SUBB A,#02H MOV A,60H SUBB A,#00H JNC A02A6 A0292: JNB 02H,A02A6 JNB 13H,A02A6 CLR 13H CLR 02H INC 5DH MOV A,5DH JNZ A02C2 INC 5CH SJMP A02C2 A02A6: JB 0FH,A02B4 SETB C MOV A,61H SUBB A,#02H MOV A,60H SUBB A,#00H JNC A02C0 A02B4: JNB 02H,A02C0 JB 13H,A02C0 SETB 13H SETB LED1 SJMP A02C2 A02C0: CLR 13H A02C2: JB 02H,A0320 JNB 0FH,A02D7 CLR C MOV A,61H SUBB A,#01H MOV A,60H SUBB A,#00H JC A02D7 INC 57H SJMP A02E0 A02D7: MOV A,57H SETB C SUBB A,#00H JC A02E0 DEC 57H A02E0: MOV A,3BH CLR C RRC A MOV R7,A MOV A,57H CLR C SUBB A,R7 JC A02F6 MOV A,5DH DEC 5DH JNZ A02F3 DEC 5CH A02F3: CLR A MOV 57H,A A02F6: JNB 0EH,A0305 MOV A,61H XRL A,#01H ORL A,60H JNZ A0305 INC 55H SJMP A030E A0305: MOV A,55H SETB C SUBB A,#00H JC A030E DEC 55H A030E: MOV A,55H CLR C SUBB A,3BH JC A0320 INC 5DH MOV A,5DH JNZ A031D INC 5CH A031D: CLR A MOV 55H,A A0320: JNB 0EH,A0333 SETB C MOV A,61H SUBB A,5AH MOV A,60H SUBB A,#00H JC A0333 JNB 02H,A0333 SETB 16H A0333: JNB 0EH,A034B SETB C MOV A,61H SUBB A,5BH MOV A,60H SUBB A,#00H JNC A034B JNB 02H,A034B JNB 16H,A034B CLR 16H INC 58H A034B: MOV A,58H CJNE A,#03H,A035E JNB 02H,A035E CLR A MOV 58H,A CLR 02H MOV 5CH,51H MOV 5DH,52H A035E: JB 02H,A038D CLR A MOV 58H,A CLR 16H JNB P2.6,A0370 JB 03H,A0370 SETB P1.4 SETB P1.0 A0370: JB P2.6,A0377 SETB P1.4 SETB P1.0 A0377: SETB P1.1 SETB LED1 JNB 06H,A038D CLR 06H JB 0DH,A0388 JB 07H,A0388 CLR 0CH A0388: JB 09H,A038D SETB 09H A038D: JNB 02H,A03A0 CLR P1.4 CLR P1.0 CLR P1.1 JNB 0DH,A039B CLR 0DH A039B: JB 06H,A03A0 SETB 06H A03A0: JB 0BH,A03A6 LJMP A0575 A03A6: CLR 0EH CLR 0FH CLR A MOV 60H,A MOV 61H,A INC 30H MOV A,30H CJNE A,#0CH,A03BE CLR A MOV 30H,A MOV C,LED2 CPL C MOV LED2,C A03BE: MOV C,03H CPL C MOV LED3,C SETB C MOV A,54H SUBB A,5FH MOV A,53H SUBB A,5EH JC A03DC SETB 0EH MOV A,54H SUBB A,5FH MOV 61H,A MOV A,53H SUBB A,5EH MOV 60H,A A03DC: SETB C MOV A,54H SUBB A,5FH MOV A,53H SUBB A,5EH JNC A03F6 SETB 0FH CLR C MOV A,5FH SUBB A,54H MOV 61H,A MOV A,5EH SUBB A,53H MOV 60H,A A03F6: JNB 0EH,A0410 CLR C MOV A,61H SUBB A,31H MOV A,60H SUBB A,#00H JC A0410 JB 03H,A0410 JNB 14H,A0410 CLR 14H SETB 03H SJMP A042C A0410: JNB 0EH,A042A CLR C MOV A,61H SUBB A,31H MOV A,60H SUBB A,#00H JC A042A JB 03H,A042A JB 14H,A042A SETB 14H CLR LED3 SJMP A042C A042A: CLR 14H A042C: JB P2.4,A0465 JB 0FH,A043D SETB C MOV A,61H SUBB A,#01H MOV A,60H SUBB A,#00H JNC A0449 A043D: JNB 03H,A0449 JNB 15H,A0449 CLR 15H CLR 03H SJMP A0465 A0449: JB 0FH,A0457 SETB C MOV A,61H SUBB A,#01H MOV A,60H SUBB A,#00H JNC A0463 A0457: JNB 03H,A0463 JB 15H,A0463 SETB 15H SETB LED3 SJMP A0465 A0463: CLR 15H A0465: JNB P2.4,A04A6 JB 0FH,A0476 SETB C MOV A,61H SUBB A,#02H MOV A,60H SUBB A,#00H JNC A048A A0476: JNB 03H,A048A JNB 15H,A048A CLR 15H CLR 03H INC 5FH MOV A,5FH JNZ A04A6 INC 5EH SJMP A04A6 A048A: JB 0FH,A0498 SETB C MOV A,61H SUBB A,#02H MOV A,60H SUBB A,#00H JNC A04A4 A0498: JNB 03H,A04A4 JB 15H,A04A4 SETB 15H SETB LED3 SJMP A04A6 A04A4: CLR 15H A04A6: JB 03H,A04FF JNB 0FH,A04BA CLR C MOV A,61H SUBB A,#01H MOV A,60H SUBB A,#00H JC A04BA INC R1 SJMP A04C1 A04BA: MOV A,R1 SETB C SUBB A,#00H JC A04C1 DEC R1 A04C1: MOV A,3BH CLR C RRC A MOV R7,A MOV A,R1 CLR C SUBB A,R7 JC A04D5 MOV A,5FH DEC 5FH JNZ A04D3 DEC 5EH A04D3: CLR A MOV R1,A A04D5: JNB 0EH,A04E4 MOV A,61H XRL A,#01H ORL A,60H JNZ A04E4 INC 56H SJMP A04ED A04E4: MOV A,56H SETB C SUBB A,#00H JC A04ED DEC 56H A04ED: MOV A,56H CLR C SUBB A,3BH JC A04FF INC 5FH MOV A,5FH JNZ A04FC INC 5EH A04FC: CLR A MOV 56H,A A04FF: JNB 0EH,A0512 SETB C MOV A,61H SUBB A,5AH MOV A,60H SUBB A,#00H JC A0512 JNB 03H,A0512 SETB 17H A0512: JNB 0EH,A052A SETB C MOV A,61H SUBB A,5BH MOV A,60H SUBB A,#00H JNC A052A JNB 03H,A052A JNB 17H,A052A CLR 17H INC 59H A052A: MOV A,59H CJNE A,#03H,A053D JNB 03H,A053D CLR A MOV 59H,A CLR 03H MOV 5EH,53H MOV 5FH,54H A053D: JB 03H,A0554 CLR A MOV 59H,A CLR 17H SETB P1.6 SETB P1.2 SETB P1.7 SETB P1.3 SETB LED3 JNB 07H,A0554 CLR 07H A0554: JNB 03H,A0575 CLR P1.6 CLR P1.2 CLR P1.7 CLR P1.3 JB 0DH,A0575 JB 07H,A0575 SETB 0DH SETB 07H JB 06H,A0575 CLR A MOV 29H,A MOV 28H,A MOV 2EH,A SETB 0CH A0575: JB 01H,A05AC JB 08H,A05AC JNB 02H,A0583 CLR A MOV 43H,A SJMP A0586 A0583: MOV 43H,#0FFH A0586: MOV A,51H MOV 42H,A MOV A,52H MOV 41H,A JNB 09H,A05A7 CLR 09H MOV 42H,2EH MOV A,28H ADD A,29H MOV 61H,A CLR A RLC A MOV 60H,A CLR C RRC A MOV A,61H RRC A MOV 41H,A A05A7: MOV 4EH,#03H SETB TI A05AC: JNB 01H,A05EF JB 08H,A05EF JNB 02H,A05B8 ORL 49H,#0F0H A05B8: JNB 03H,A05BE ORL 49H,#0FH A05BE: JB 02H,A05C4 ANL 49H,#0FH A05C4: JB 03H,A05CA ANL 49H,#0F0H A05CA: MOV A,51H MOV 48H,A MOV A,52H MOV 47H,A MOV A,5CH MOV 46H,A MOV A,5DH MOV 45H,A MOV A,53H MOV 44H,A MOV A,54H MOV 43H,A MOV A,5EH MOV 42H,A MOV A,5FH MOV 41H,A MOV 4EH,#09H SETB TI A05EF: JNB 18H,A0600 JB 02H,A05F8 JNB 03H,A05FC A05F8: CLR P1.5 SJMP A0609 A05FC: SETB P1.5 SJMP A0609 A0600: JNB 02,A0607 CLR P1.5 SJMP A0609 A0607: SETB P1.5 A0609: CLR 04H LJMP A0102
F060E: PUSH ACC PUSH PSW MOV PSW,#10H CLR PCACF CLR PCACR MOV PCATH,#3CH MOV PCATL,#0B0H SETB PCACR MOV 4FH,TH0 MOV 32H,TL0 MOV 39H,TH0 MOV 50H,TH1 MOV 33H,TL1 MOV 3AH,TH1 MOV A,39H XRL A,4FH JZ A0643 MOV A,32H SETB C SUBB A,#80H JC A0643 MOV 39H,4FH A0643: MOV A,3AH XRL A,50H JZ A0653 MOV A,33H SETB C SUBB A,#80H JC A0653 MOV 3AH,50H A0653: MOV 3DH,#00H MOV 3EH,39H MOV A,3EH MOV 3EH,#00H MOV 3DH,A MOV A,32H ORL 3EH,A CLR A MOV 3FH,A MOV 40H,3AH MOV A,40H MOV 40H,#00H MOV 3FH,A MOV A,33H ORL 40H,A CLR A JNB 00H,A067C LJMP A0728 A067C: MOV A,34H XRL A,#01H JZ A0686 MOV A,34H JNZ A06F9 A0686: SETB C MOV A,3EH SUBB A,36H MOV A,3DH SUBB A,35H JC A069F MOV&nb |