ATMEGA16U2-16AU Atmel, ATMEGA16U2-16AU Datasheet - Page 28

no-image

ATMEGA16U2-16AU

Manufacturer Part Number
ATMEGA16U2-16AU
Description
8-bit Microcontrollers - MCU 16K Flash
Manufacturer
Atmel
Datasheet

Specifications of ATMEGA16U2-16AU

Product Category
8-bit Microcontrollers - MCU
Rohs
yes
Core
AVR
Data Bus Width
8 bit
Program Memory Size
16 KB
Data Ram Size
1.25 KB
Data Rom Size
512 B
Program Memory Type
Flash
Factory Pack Quantity
1250
8.2.2
8.2.2.1
8.2.2.2
7799D–AVR–11/10
USB
CPU Clock
External
Oscillator
RC oscillator
Clock switch Algorythm
Swith from external clock to RC clock
Switch from RC clock to external clock
non-Idle
Figure 8-3.
if (Usb_suspend_detected())
{
}
if (Usb_wake_up_detected())
{
}
Usb_ack_suspend();
Usb_freeze_clock();
Disable_pll();
Enable_RC_clock();
while (!RC_clock_ready());
Select_RC_clock();
Disable_external_clock();
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();
Ext
3ms
Idle
Example of clock switching with wake-up from Device
Watchdog wake-up
from power-down
(Suspend)
2 Upstream Resume from device
RC
// if (UDINT.SUSPI == 1)
// UDINT.SUSPI = 0;
// USBCON.FRZCLK = 1;
// PLLCSR.PLLE = 0;
// CLKSEL0.RCE = 1;
// while (CLKSTA.RCON != 1);
// CLKSEL0.CLKS = 0;
// CLKSEL0.EXTE = 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;
ATmega8U2/16U2/32U2
upstream-resume
2
non-Idle
Ext
28

Related parts for ATMEGA16U2-16AU