Datasheet
138
7766F–AVR–11/10
ATmega16/32U4
15. 10-bit High Speed Timer/Counter4
15.1 Features
• Up to 10-Bit Accuracy
• Three Independent Output Compare Units
• Clear Timer on Compare Match (Auto Reload)
• Glitch Free, Phase and Frequency Correct Pulse Width Modulator (PWM)
• Enhanced PWM mode: one optional additional accuracy bit without effect on output frequency
• Variable PWM Period
• Independent Dead Time Generators for each PWM channels
• Synchronous update of PWM registers
• Five Independent Interrupt Sources (TOV4, OCF4A, OCF4B, OCF4D, FPF4)
• High Speed Asynchronous and Synchronous Clocking Modes
• Separate Prescaler Unit
15.2 Overview
Timer/Counter4 is a general purpose high speed Timer/Counter module, with three independent
Output Compare Units, and with enhanced PWM support.
The Timer/Counter4 features a high resolution and a high accuracy usage with the lower pres-
caling opportunities. It can also support three accurate and high speed Pulse Width Modulators
using clock speeds up to 64 MHz. In PWM mode Timer/Counter4 and the output compare regis-
ters serve as triple stand-alone PWMs with non-overlapping, non-inverted and inverted outputs.
The enhanced PWM mode allows to get one more accuracy bit while keeping the frequency
identical to normal mode (a PWM 8 bits accuracy in enhanced mode outputs the same fre-
quency that a PWM 7 bits accuracy in normal mode). Similarly, the high prescaling opportunities
make this unit useful for lower speed functions or exact timing functions with infrequent actions.
A lock feature allows user to update the PWM registers and
A simplified block diagram of the Timer/Counter4 is shown in Figure 15-1. For actual placement
of the I/O pins, refer to “Pinout ATmega16U4/ATmega32U4” on page 3. The device-specific I/O
register and bit locations are listed in the “Register Description” on page 162.