ATmega32U4 Atmel Corporation, ATmega32U4 Datasheet - Page 152

no-image

ATmega32U4

Manufacturer Part Number
ATmega32U4
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega32U4

Flash (kbytes)
32 Kbytes
Pin Count
44
Max. Operating Frequency
16 MHz
Cpu
8-bit AVR
# Of Touch Channels
14
Hardware Qtouch Acquisition
No
Max I/o Pins
26
Ext Interrupts
13
Usb Transceiver
1
Usb Speed
Full Speed
Usb Interface
Device
Spi
2
Twi (i2c)
1
Uart
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
12
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
Yes
Crypto Engine
No
Sram (kbytes)
3.3
Eeprom (bytes)
1024
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 85
I/o Supply Class
2.7 to 5.5
Operating Voltage (vcc)
2.7 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
4
Output Compare Channels
12
Input Capture Channels
2
Pwm Channels
8
32khz Rtc
No
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATmega32U4-16AU
Manufacturer:
MAXIM
Quantity:
1 000
Part Number:
ATmega32U4-AU
Manufacturer:
FREESCALE
Quantity:
125
Part Number:
ATmega32U4-AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega32U4-AU
Manufacturer:
MICROCHIP
Quantity:
200
Part Number:
ATmega32U4-AUR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega32U4-MUR
Manufacturer:
UCC
Quantity:
1 001
Part Number:
ATmega32U4RC-AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega32U4RC-AUR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega32U4RC-MU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
15.8.3
7766F–AVR–11/10
Phase and Frequency Correct PWM Mode
The Timer/Counter Overflow Flag (TOV4) is set each time the counter reaches TOP. If the inter-
rupt is enabled, the interrupt handler routine can be used for updating the compare value.4In
fast PWM mode, the compare unit allows generation of PWM waveforms on the OC4x pins. Set-
ting the COM4x1:0 bits to two will produce a non-inverted PWM and setting the COM4x1:0 to
three will produce an inverted PWM output. Setting the COM4x1:0 bits to one will enable com-
plementary Compare Output mode and produce both the non-inverted (OC4x) and inverted
output (OC4x). The actual value will only be visible on the port pin if the data direction for the
port pin is set as output. The PWM waveform is generated by setting (or clearing) the Waveform
Output (OCW4x) at the Compare Match between OCR4x and TCNT4, and clearing (or setting)
the Waveform Output at the timer clock cycle the counter is cleared (changes from TOP to
BOTTOM).
The PWM frequency for the output can be calculated by the following equation:
The N variable represents the number of steps in single-slope operation. The value of N equals
either to the TOP value.
The extreme values for the OCR4C Register represents special cases when generating a PWM
waveform output in the fast PWM mode. If the OCR4C is set equal to BOTTOM, the output will
be a narrow spike for each MAX+1 timer clock cycle. Setting the OCR4C equal to MAX will result
in a constantly high or low output (depending on the polarity of the output set by the COM4x1:0
bits.)
A frequency (with 50% duty cycle) waveform output in fast PWM mode can be achieved by set-
ting the Waveform Output (OCW4x) to toggle its logical level on each Compare Match
(COM4x1:0 = 1). The waveform generated will have a maximum frequency of f
OCR4C is set to three.
The general I/O port function is overridden by the Output Compare value (OC4x / OC4x) from
the Dead Time Generator, if either of the COM4x1:0 bits are set and the Data Direction Register
bits for the OC4X and OC4X pins are set as an output. If the COM4x1:0 bits are cleared, the
actual value from the port register will be visible on the port pin. The Output Compare Pin config-
urations are described in
Table 15-3.
The Phase and Frequency Correct PWM Mode (PWM4x = 1 and WGM40 = 1) provides a high
resolution Phase and Frequency Correct PWM waveform generation option. The Phase and
Frequency Correct PWM mode is based on a dual-slope operation. The counter counts repeat-
edly from BOTTOM to TOP (defined as OCR4C) and then from TOP to BOTTOM. In non-
inverting Compare Output Mode the Waveform Output (OCW4x) is cleared on the Compare
COM4x1
0
0
1
1
Output Compare Pin Configurations in Fast PWM Mode
COM4x0
0
1
0
1
Table
15-3.
OC4x Pin
Disconnected
OC4x
Disconnected
Disconnected
f
OCnxPWM
=
f
------------ -
clkT4
N
ATmega16/32U4
OC4x Pin
Disconnected
OC4x
OC4x
OC4x
OC4
= f
clkT4
/4 when
152

Related parts for ATmega32U4