atmega32u4-16mu ATMEL Corporation, atmega32u4-16mu Datasheet - Page 158

no-image

atmega32u4-16mu

Manufacturer Part Number
atmega32u4-16mu
Description
Atmega32u4 8-bit Avr Microcontroller With 32k Bytes Of Isp Flash And Usb Controller
Manufacturer
ATMEL Corporation
Datasheet
16.2.1
16.2.2
158
ATmega32U4
Speed
Accuracy
Figure 16-1. Timer/Counter4 Block Diagram
The maximum speed of the Timer/Counter4 is 64 MHz. However, if a supply voltage below 4
volts is used, it is recommended to decrease the input frequency, because the Timer/Counter4
is not running fast enough on low voltage levels.
The Timer/Counter4 is a 10-bit Timer/Counter module that can alternatively be used as an 8-bit
Timer/Counter. The Timer/Counter4 registers are basically 8-bit registers, but on top of that
there is a 2-bit High Byte Register (TC4H) that can be used as a common temporary buffer to
access the two MSBs of the 10-bit Timer/Counter4 registers by the AVR CPU via the 8-bit data
bus, if the 10-bit accuracy is used. Whereas, if the two MSBs of the 10-bit registers are written to
zero the Timer/Counter4 is working as an 8-bit Timer/Counter. When reading the low byte of any
8-bit register the two MSBs are written to the TC4H register, and when writing the low byte of
any 8-bit register the two MSBs are written from the TC4H register. Special procedures must be
followed when accessing the 10-bit Timer/Counter4 values via the 8-bit data bus. These proce-
dures are described in the section
The Enhanced PWM mode allows to add a resolution bit to each Compare register A/B/D, while
the output frequency remains identical to a Normal PWM mode. That means that the TC4H reg-
ister contains one more bit that will be the MSB in a 11-bits enhanced PWM operation. See the
section
use it.
REGISTER (TIMSK4)
TOV4
T/C INT. MASK
TIMER/COUNTER4
(TCNT4)
8-BIT OUTPUT COMPARE
COMPARE REGISTER A
REGISTER A (OCR4A)
10-BIT COMPARATOR
“Enhanced Compare/PWM mode” on page 167
10-BIT OUTPUT
OCF4A
OCF4B
T/C INT. FLAG
REGISTER (TIFR4)
CLK
COUNT
CLEAR
DIRECTION
OCF4D
8-BIT OUTPUT COMPARE
REGISTER B (OCR4B)
COMPARE REGISTER B
10-BIT COMPARATOR
10-BIT OUTPUT
DEAD TIME GENERATOR
OC4A
REGISTER A (TCCR4A)
“Accessing 10-Bit Registers” on page
T/C CONTROL
8-BIT DATABUS
OC4A
8-BIT OUTPUT COMPARE
REGISTER C (OCR4C)
COMPARE REGISTER C
10-BIT COMPARATOR
10-BIT OUTPUT
DEAD TIME GENERATOR
T/C CONTROL
OC4B
REGISTER B (TCCR4B)
TIMER/COUNTER4 CONTROL LOGIC
for details about this feature and how to
OC4B
8-BIT OUTPUT COMPARE
COMPARE REGISTER D
REGISTER D (OCR4D)
10-BIT OUTPUT
10-BIT COMPARATOR
T/C CONTROL
REGISTER C (TCCR4C)
DEAD TIME GENERATOR
OC4D
178.
OC4D
2-BIT HIGH BYTE
REGISTER (TC4H)
T/C CONTROL
T/C CONTROL
REGISTER C (TCCR4D)
REGISTER D (TCCR4E)
7766A–AVR–03/08
FAULT_PROTECTION

Related parts for atmega32u4-16mu