AVR®: Using PWM to Dim an LED
In this video:
- Introduce Pulse Width Modulation (PWM) and the importance of high frequency and resolution.
- Set a prescalar of 1 to get maximum PWM frequency.
- Set up two output compare IRQ’s: one to control the period, the other to control the duty cycle.