ATMEGA16U2-AUR Atmel, ATMEGA16U2-AUR Datasheet - Page 55

MCU AVR 8K FLASH 16MHZ 32TQFP

ATMEGA16U2-AUR

Manufacturer Part Number
ATMEGA16U2-AUR
Description
MCU AVR 8K FLASH 16MHZ 32TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA16U2-AUR

Core Processor
AVR
Core Size
8-Bit
Speed
16MHz
Connectivity
SPI, UART/USART, USB
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
22
Program Memory Size
16KB (8K x 16)
Program Memory Type
FLASH
Eeprom Size
512 x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
2.7 V ~ 5.5 V
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
32-TQFP, 32-VQFP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Data Converters
-
10.5
10.5.1
7799D–AVR–11/10
Register Description
MCUSR – MCU Status Register
Note:
Note: The Watchdog Timer should be reset before any change of the WDP bits, since a change
in the WDP bits can result in a time-out when switching to a shorter time-out period.
The MCU Status Register provides information on which reset source caused an MCU reset.
• Bit 7:6 – Res: Reserved Bit
These bits are reserved and will always read as zero.
Bit
0x34 (0x54)
Read/Write
Initial Value
Assembly Code Example
C Code Example
WDT_Prescaler_Change:
void WDT_Prescaler_Change(void)
{
}
; Turn off global interrupt
cli
; Reset Watchdog Timer
wdr
; Start timed sequence
in
ori
out
; --
; Set new prescaler(time-out) value = 64K cycles (~0.5 s)
ldi
out
; --
; Turn on global interrupt
sei
ret
__disable_interrupt();
__watchdog_reset();
/* Start timed
WDTCSR |= (1<<WDCE) | (1<<WDE);
/* Set new prescaler(time-out) value = 64K cycles (~0.5 s) */
WDTCSR
__enable_interrupt();
1. The example code assumes that the part specific header file is included.
r16, WDTCSR
r16, (1<<WDCE) | (1<<WDE)
WDTCSR, r16
Got four cycles to set the new values from here -
r16, (1<<WDE) | (1<<WDP2) | (1<<WDP0)
WDTCSR, r16
Finished setting new values, used 2 cycles -
= (1<<WDE) | (1<<WDP2) | (1<<WDP0);
R
7
0
(1)
(1)
R
6
0
equence */
USBRF
R
5
0
R/W
4
ATmega8U2/16U2/32U2
WDRF
R/W
3
See Bit Description
BORF
R/W
2
EXTRF
R/W
1
PORF
R/W
0
MCUSR
55

Related parts for ATMEGA16U2-AUR