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).
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.