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

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.8.2
170
ATmega32U4
Fast PWM Mode
The Output Compare Pin configurations in Normal Mode are described in
Table 16-2.
The fast Pulse Width Modulation or fast PWM mode (PWM4x = 1 and WGM40 = 0) provides a
high frequency PWM waveform generation option. The fast PWM differs from the other PWM
option by its single-slope operation. The counter counts from BOTTOM to TOP (defined as
OCR4C) then restarts from BOTTOM. In non-inverting Compare Output mode the Waveform
Output (OCW4x) is cleared on the Compare Match between TCNT4 and OCR4x and set at
BOTTOM. In inverting Compare Output mode, the Waveform Output is set on Compare Match
and cleared at BOTTOM. In complementary Compare Output mode the Waveform Output is
cleared on the Compare Match and set at BOTTOM.
Due to the single-slope operation, the operating frequency of the fast PWM mode can be twice
as high as the Phase and Frequency Correct PWM mode that use dual-slope operation. This
high frequency makes the fast PWM mode well suited for power regulation, rectification, and
DAC applications. High frequency allows physically small sized external components (coils,
capacitors), and therefore reduces total system cost.
The timing diagram for the fast PWM mode is shown in
mented until the counter value matches the TOP value. The counter is then cleared at the
following timer clock cycle. The TCNT4 value is in the timing diagram shown as a histogram for
illustrating the single-slope operation. The diagram includes the Waveform Output in non-
inverted and inverted Compare Output modes. The small horizontal line marks on the TCNT4
slopes represent Compare Matches between OCR4x and TCNT4.
Figure 16-13. Fast PWM Mode, Timing Diagram
COM4x1
0
0
1
1
TCNTn
OCWnx
(COMnx1:0 = 2)
OCWnx
(COMnx1:0 = 3)
Period
Output Compare Pin Configurations in Normal Mode
1
COM4x0
0
1
0
1
2
3
OC4x Pin
Disconnected
Disconnected
Disconnected
Disconnected
4
5
6
Figure
7
16-13. The counter is incre-
OC4x Pin
Disconnected
OC4x
OC4x
OC4x
OCRnx Interrupt Flag Set
OCRnx Update and
TOVn Interrupt Flag Set
Table
16-2.
7766A–AVR–03/08

Related parts for atmega32u4-16mu