ATmega32U4 Atmel Corporation, ATmega32U4 Datasheet - Page 36

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
6.8.2
6.8.3
6.8.4
7766F–AVR–11/10
Switch from RC clock to external clock
CLKSEL0 – Clock Selection Register 0
CLKSEL1 – Clock Selection Register 1
• Bit 7-6 – RCSUT[1:0]: SUT for RC oscillator
These 2 bits are the SUT value for the RC Oscillator. If the RC oscillator is selected by fuse bits,
the SUT fuse are copied into these bits. A firmware change will not have any effect because this
additional start-up time is only used after a reset and not after a clock switch.
• Bit 5-4 – EXSUT[1:0]: SUT for External Clock/ Low Power Crystal Oscillator
These 2 bits are the SUT value for the External Clock / Low Power Crystal Oscillator. If the
External Clock / Low Power Crystal Oscillator is selected by fuse bits, the SUT fuses are copied
into these bits. The firmware can modify these bits by writing a new value. This value will be
used at the next start of the External Clock / Low Power Crystal Oscillator.
• Bit 3 – RCE: Enable RC Oscillator
The RCE bit must be written to logic one to enable the RC Oscillator. The RCE bit must be writ-
ten to logic zero to disable the RC Oscillator.
• Bit 2 – EXTE: Enable External Clock / Low Power Crystal Oscillator
The OSCE bit must be written to logic one to enable External Clock / Low Power Crystal Oscilla-
tor. The OSCE bit must be written to logic zero to disable the External Clock / Low Power Crystal
Oscillator.
• Bit 0 – CLKS: Clock Selector
The CLKS bit must be written to logic one to select the External Clock / Low Power Crystal Oscil-
lator as CPU clock. The CLKS bit must be written to logic zero to select the RC Oscillator as
CPU clock. After a reset, the CLKS bit is set by hardware if the External Clock / Low Power Crys-
tal Oscillator is selected by the fuse bits configuration.
The firmware has to check if the clock is correctly started before selected it.
Bit
Read/Write
Initial Value
Bit
Read/Write
Initial Value
if (Usb_wake_up_detected())
{
}
Usb_ack_wake_up();
Enable_external_clock();
while (!External_clock_ready()); // while (CLKSTA.EXTON != 1);
Select_external_clock();
Enable_pll();
Disable_RC_clock();
while (!Pll_ready());
Usb_unfreeze_clock();
7
RCSUT1
R/W
0
7
RCCKS
EL3
R/W
0
6
RCCKS
EL2
R/W
0
6
RCSUT0
R/W
0
5
RCCKS
EL1
R/W
1
5
EXSUT1
R/W
0
4
RCCKS
EL0
0
R/W
4
EXSUT0
R/W
0
3
EXCKS
EL3
R/W
0
// if (UDINT.WAKEUPI == 1)
// UDINT.WAKEUPI = 0;
// CKSEL0.EXTE = 1;
// CLKSEL0.CLKS = 1;
// PLLCSR.PLLE = 1;
// CLKSEL0.RCE = 0;
// while (PLLCSR.PLOCK != 1);
// USBCON.FRZCLK = 0;
3
RCE
R/W
See Bit Description
2
EXCKS
EL2
R/W
0
2
EXTE
R/W
0
1
EXCKS
EL1
R/W
ATmega16/32U4
-
1
R
0
EXCKS
EL0
R/W
0
0
CLKS
R/W
CLKSEL1
CLKSEL0
36

Related parts for ATmega32U4