AJMP MAIN ORG 0003H ; AJMP LOOP ORG 000BH AJMP LOOP1 ORG 001BH AJMP LOOP2 LOOP: SETB P1.6 ;¹ mov r5,#15 dly1:mov r6,#100 dly2:mov r7,#100 djnz r7,$ djnz r6,dly2 djnz r5,dly1 CLR P1.6 ;¿ dly11:mov r6,#100 dly22:mov r7,#100 djnz r7,$ djnz r6,dly22 djnz r5,dly11 SETB P1.5 ;µç mov r5,#60 ; dly3:mov r6,#100 dly4:mov r7,#100 djnz r7,$ djnz r6,dly4 djnz r5,dly3 CLR P1.5 ; RETI LOOP1:CPL P1.1 ;²²¨ mov r5,#15 ; dly7:mov r6,#100 dly8:mov r7,#100 djnz r7,$ djnz r6,dly8 djnz r5,dly7 SETB ET1 ;¿ MOV TH0,#3CH ;¸µ MOV TL0,#0AFH CLR ET0 ;¹Ê±Æ÷0 RETI ;Ø LOOP2:CPL P1.1 ;²½ mov r5,#50 ;± dly9:mov r6,#100 dly0:mov r7,#100 djnz r7,$ djnz r6,dly0 djnz r5,dly9 SETB ET0 ;¿ªÆô¶¨Ê±Æ÷0 MOV TH1,#3CH ;¸øT1ÖØи½³õÖµ MOV TL1,#0AFH CLR ET1 ;¹Ø±Õ¶¨Ê±Æ÷1 RETI ;ÖжϷµ»Ø MAIN:MOV TMOD,#11 ;²ÉÓö¨Ê±Æ÷0Óë1,·½Ê½1 MOV TH0,#3CH MOV TL0,#0AFH MOV TH1,#3CH MOV TL1,#0AFH SETB EA ;¿ª×ÜÖÐ¶Ï SETB ET0 ;ÆôÓÃT0ÖÐ¶Ï SETB EX0 ;ÆôÓÃÍⲿÖжÏ0 SETB IT0 ;ÍⲿÖжÏ0¸ºÌø±äÓÐЧ SETB PX0 ;ÍⲿÖжÏ0ÖжÏÓÅÏÈ CLR P1.6 ;¿ªÆôµçԴָʾµÆ SETB P1.1 ;ĬÈÏ·½²¨ÆðʼΪ¸ßµçƽ SETB TR0 ;¶¨Ê±Æ÷0¿ªÊ¼ SETB TR1 ;¶¨Ê±Æ÷1¿ªÊ¼ SJMP $ END |