App note: Using the AVR’s High-speed PWM

appn

Atmel’s app note on using the AVR’s High-speed PWM (PDF!):

This application note is an introduction to the use of the high-speed Pulse Width Modulator (PWM) available in some AVR microcontrollers. The assembly code example provided shows how to use the fast PWM in the ATtiny26. The ATtiny15 also features a high-speed PWM timer.
The fast PWM is used to generate a pulse train with varying duty-cycle on the OC1A output pin (PB1). An analog filter can be used to shape the digital PWM output to obtain an analog signal such as a sine wave.
The advantage of high-speed PWM is the increased bandwidth of the analog output signal and that the high frequency allows for smaller and less expensive filter components used to shape the signal.

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.