.include "1200def.inc" .def A=r16 .def B=r17 .def C=r18 .def CNT=r19 .def PWMCNT=r20 .def PWMA=r21 .def PWMB=r22 .def PWMC=r23 rjmp RESET ; reti rjmp TIM ; reti ;₯₯₯₯₯‰Šϊ‰» RESET: ;₯IOέ’θ ldi A,0b00000000 out PORTB,A ldi A,0b11111111 out DDRB,A ;₯ƒ^ƒCƒ}έ’θ ldi A,0b00000001 out TCCR0,A ldi A,0b00000010 out TIMSK,A sei ldi PWMA,0xff ldi PWMB,0x00 ldi PWMC,0x00 main: ;₯Fέ’θ dec CNT cpi CNT,0 brne M3 ldi CNT,5 cpi PWMA,0xff brne M4 cpi PWMB,0x00 brne M4 inc PWMC M4: cpi PWMC,0xff brne M5 cpi PWMB,0x00 brne M5 dec PWMA M5: cpi PWMC,0xff brne M6 cpi PWMA,0x00 brne M6 inc PWMB M6: cpi PWMB,0xff brne M7 cpi PWMA,0x00 brne M7 dec PWMC M7: cpi PWMB,0xff brne M8 cpi PWMC,0x00 brne M8 inc PWMA M8: cpi PWMA,0xff brne M9 cpi PWMC,0x00 brne M9 dec PWMB M9: M3: ldi A,0xff M10: dec A nop cpi A,0 brne M10 rjmp main TIM: ;₯₯₯ƒ\ƒtƒgƒEƒFƒAPWM ldi C,220 out TCNT0,C in C,SREG subi PWMCNT,1 cpi PWMCNT,0xff brne PWM1 cbi PORTB,0 cbi PORTB,1 cbi PORTB,2 PWM1: cp PWMCNT,PWMA brne PWM2A sbi PORTB,0 PWM2A: cp PWMCNT,PWMB brne PWM2B sbi PORTB,1 PWM2B: cp PWMCNT,PWMC brne PWM2C sbi PORTB,2 PWM2C: out SREG,C reti