Код: Выделить всё
Timer1FastPWM_ON:
ldi XL, low(1599)
ldi XH, high(1599)
out ICR1H, XH
out ICR1L, XL
sbiw X, 2
out OCR1AH, XH
out OCR1AL, XL
ldi temp0, (1<<COM1A1)|(1<<COM1A0)|(1<<WGM11)
out TCCR1A, temp0
; Fast PWM mode (TOP = ICR1), делитель 1:1
ldi temp0, (1<<WGM13)|(1<<WGM12)|(1<<CS10)
out TCCR1B, temp0
in temp0, TIMSK
sbr temp0, (1<<TOIE1)
out TIMSK, temp0 ;TOIE1 = 1
ret


