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

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
15. 8-bit Timer/Counter2 with PWM
15.1
15.1.1
138
Overview
ATmega32U4
Registers
Timer/Counter2 is a general purpose, single channel, 8-bit Timer/Counter module. The main
features are:
A simplified block diagram of the 8-bit Timer/Counter is shown in Figure 15-1.. For the actual
placement of I/O pins, see
ing I/O bits and I/O pins, are shown in bold. The device-specific I/O Register and bit locations
are listed in the
The Power Reduction Timer/Counter2 bit, PRTIM2, in
page 43
Figure 15-1. 8-bit Timer/Counter Block Diagram
The Timer/Counter (TCNT2) and Output Compare Register (OCR2A and OCR2B) are 8-bit reg-
isters. Interrupt request (abbreviated to Int.Req.) signals are all visible in the Timer Interrupt Flag
Register (TIFR2). All interrupts are individually masked with the Timer Interrupt Mask Register
(TIMSK2). TIFR2 and TIMSK2 are not shown in the figure.
Single Channel Counter
Clear Timer on Compare Match (Auto Reload)
Glitch-free, Phase Correct Pulse Width Modulator (PWM)
Frequency Generator
10-bit Clock Prescaler
Overflow and Compare Match Interrupt Sources (TOV2, OCF2A and OCF2B)
must be written to zero to enable Timer/Counter2 module.
“8-bit Timer/Counter Register Description” on page
T imer /C ounter
TCCR n A
OCR n A
TCNT n
OCR n B
=
=
“Pin Configurations” on page
D irection
C ount
C lear
C ontrol L ogic
TOP
=
TCCR n B
V alue
BOTTOM
F ixed
TOP
clk
=
T n
0
“Power Reduction Register 0 - PRR0” on
3. CPU accessible I/O Registers, includ-
P rescaler
OC n A
(I nt .R eq .)
OC n B
(I nt .R eq .)
G eneration
G eneration
W aveform
W aveform
149.
clk
TOV n
(I nt .R eq .)
OC n A
OC n B
I/O
7766A–AVR–03/08

Related parts for atmega32u4-16mu