PWM (Pulse Width Modulation) General Discussion on Using an 8-Bit Timer Create a PWM

The 8-bit timer for the AVR can create a PWM using OCR (Output Compare Register). The OCR can be used as an overflow for the timer (CTC - Clear on Timer compare), or start the pulse on the OCR. If the former is used, the OCR can create the period. If the latter is used, the OCR creates the start of the pulse and the period is always at the 255 count (the overflow for the 8-bit timer).



Back to blog

Leave a comment

Please note, comments need to be approved before they are published.