On 13 Dec 2006 at 14:53, dr_bitbucket wrote: > I'm writing some assembly code for an ATtiny24 for a new project. I > need to use timer1 to PWM output PA5 (OC1B) (pin 8, I believe) at > close to 38 kHz and 50% PW, it's for an IR LED being sensed by an > IS1U60. I am using timer0 for PWM motor control (which works just > fine), and I would prefer to use timer1 for this application as it > offers a phase and frequency correct PWM mode, and I think that's > snazzy. > You don't need PWM mode for 38kHz @50% duty cycle. Just use the Timer1 in CTC mode and adjust COM0/1. See the datasheet Table 14.4 mode 4. Mark Jordan
Message
Re: [AVR-Chat] Timer 1 Troubles
2006-12-13 by Mark Jordan