; ; The main tick rate is 60 khz, PWM divides that by 10 ; .equ TICKRATE = 60000 ; 60 khz ; ; Interrupt latency: 4 cycles + 2 for rjmp at handler + 1 for ldi + 1 for out. ; We add a fudge of 3-4 on our counter to take into account roundoff in the .set ; equation, above (based upon emperical measurements) ; .set TCCR0_INIT = CLK .set TCNT0_INIT = 256 - CPUCLK/TICKRATE + 5 ; See note, below .set TIMSK_INIT = (1<