
- •Features
- •Disclaimer
- •Overview
- •Block Diagram
- •Pin Descriptions
- •Port B (PB7..PB0)
- •Port C (PC7..PC0)
- •Port D (PD7..PD0)
- •D-/SDATA
- •UGND
- •UVCC
- •UCAP
- •RESET/PC1/dW
- •XTAL1
- •XTAL2/PC0
- •AVR CPU Core
- •Introduction
- •Status Register
- •Stack Pointer
- •TABLE 1.
- •TABLE 2.
- •AVR AT90USB82/162 Memories
- •I/O Memory
- •Clock Systems and their Distribution
- •Clock Switch
- •Exemple of use
- •Swith from external clock to RC clock
- •Switch from RC clock to external clock
- •Clock Sources
- •Default Clock Source
- •External Clock
- •Internal PLL for USB interface
- •Idle Mode
- •Power-down Mode
- •Power-save Mode
- •Standby Mode
- •Analog Comparator
- •Brown-out Detector
- •Watchdog Timer
- •Port Pins
- •Resetting the AVR
- •Reset Sources
- •Power-on Reset
- •External Reset
- •Watchdog Reset
- •USB Reset
- •Watchdog Timer
- •TABLE 2.
- •TABLE 2.
- •Interrupts
- •TABLE 2.
- •Introduction
- •Configuring the Pin
- •Toggling the Pin
- •Reading the Pin Value
- •TABLE 3.
- •Unconnected Pins
- •Alternate Port Functions
- •Register Description for I/O-Ports
- •Timer/Counter0 and Timer/Counter1 Prescalers
- •Internal Clock Source
- •Prescaler Reset
- •External Clock Source
- •8-bit Timer/Counter0 with PWM
- •Overview
- •Registers
- •Definitions
- •Counter Unit
- •Normal Mode
- •Fast PWM Mode
- •8-bit Timer/Counter Register Description
- •Overview
- •Registers
- •Definitions
- •Counter Unit
- •Input Capture Unit
- •Noise Canceler
- •Force Output Compare
- •Normal Mode
- •Fast PWM Mode
- •16-bit Timer/Counter Register Description
- •TABLE 2.
- •TABLE 2.
- •Slave Mode
- •Master Mode
- •Data Modes
- •USART
- •Overview
- •Clock Generation
- •External Clock
- •Frame Formats
- •Parity Bit Calculation
- •TABLE 2.
- •TABLE 3.
- •TABLE 4.
- •Parity Generator
- •TABLE 3.
- •TABLE 2.
- •Receiver Error Flags
- •Parity Checker
- •Disabling the Receiver
- •TABLE 2.
- •Using MPCMn
- •Receiver Flow Control
- •Overview
- •Clock Generation
- •Frame Formats
- •TABLE 2.
- •Data Transfer
- •TABLE 3.
- •USB controller
- •Features
- •Block Diagram
- •Typical Application Implementation
- •Device mode
- •Bus Powered device
- •Introduction
- •Interrupts
- •Power modes
- •Idle mode
- •Power down
- •Freeze clock
- •Memory access capability
- •Memory management
- •PAD suspend
- •D+/D- Read/write
- •Registers description
- •USB general registers
- •USB Software Operating modes
- •USB Device Operating modes
- •Introduction
- •Power-on and reset
- •Endpoint reset
- •USB reset
- •Endpoint selection
- •Endpoint activation
- •Address Setup
- •Detach
- •Remote Wake-up
- •STALL request
- •Special consideration for Control Endpoints
- •STALL handshake and Retry mechanism
- •CONTROL endpoint management
- •Control Write
- •Control Read
- •Overview
- •“Manual” mode
- •Detailed description
- •IN endpoint management
- •“Manual” mode
- •Detailed description
- •Abort
- •Isochronous mode
- •Underflow
- •CRC Error
- •Overflow
- •Interrupts
- •Registers
- •USB device general registers
- •USB device endpoint registers
- •Characteristics
- •Analog Comparator
- •Application Section
- •Boot Reset Fuse
- •Simple Assembly Code Example for a Boot Loader
- •debugWIRE On-chip Debug System
- •Features
- •Overview
- •Physical Interface
- •Software Break Points
- •Limitations of debugWIRE
- •debugWIRE Related Register in I/O Memory
- •Fuse Bits
- •Latching of Fuses
- •Signature Bytes
- •Calibration Byte
- •Signal Names
- •Chip Erase
- •Reading the Flash
- •Reading the EEPROM
- •Electrical Characteristics
- •Absolute Maximum Ratings*
- •DC Characteristics
- •External Clock Drive Waveforms
- •External Clock Drive
- •Maximum speed vs. VCC
- •Supply Current of IO modules
- •Example 1
- •Example 2
- •Example 3
- •Instruction Set Summary
- •Packaging Information
- •TQFP32

Electrical Characteristics
Absolute Maximum Ratings*
Operating Temperature.................................. -55°C to +125°C |
*NOTICE: Stresses beyond those listed under “Absolute |
||||
|
|
|
|
|
Maximum Ratings” may cause permanent dam- |
Storage Temperature ..................................... -65°C to +150°C |
age to the device. This is a stress rating only and |
||||
|
|
|
|
|
functional operation of the device at these or |
Voltage on any Pin except |
RESET |
|
other conditions beyond those indicated in the |
||
with respect to Ground(7) .............................-0.5V to VCC+0.5V |
operational sections of this specification is not |
||||
|
|
|
|
|
implied. Exposure to absolute maximum rating |
Voltage on |
RESET |
with respect to Ground......-0.5V to +13.0V |
conditions for extended periods may affect |
||
Maximum Operating Voltage ............................................ 6.0V |
device reliability. |
||||
|
|||||
DC Current per I/O Pin ............................................... 40.0 mA |
|
||||
DC Current VCC and GND Pins................................ 200.0 mA |
|
||||
|
|
|
|
|
|
DC Characteristics
TA = -40°C to 85°C, VCC = 1.8V to 5.5V (unless otherwise noted)
Symbol |
Parameter |
Condition |
Min.(5) |
Typ. |
Max.(5) |
Units |
|||||||
VIL |
Input Low Voltage,Except |
VCC = 1.8V - 2.4V |
-0.5 |
|
|
0.2VCC(1) |
V |
||||||
XTAL1 and Reset pin |
VCC = 2.4V - 5.5V |
-0.5 |
|
|
0.3VCC(1) |
||||||||
V |
IL1 |
Input Low Voltage, |
V |
|
= 1.8V - 5.5V |
-0.5 |
|
|
0.1V |
(1) |
V |
||
XTAL1 pin |
CC |
|
|
||||||||||
|
|
|
|
|
|
|
|
CC |
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
V |
IL2 |
Input Low Voltage, |
V |
CC |
= 1.8V - 5.5V |
-0.5 |
|
|
0.1V |
(1) |
V |
||
RESET pin |
|
|
|||||||||||
|
|
|
|
|
|
|
|
CC |
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Input High Voltage, |
VCC = 1.8V - 2.4V |
0.7VCC(2) |
|
VCC + 0.5 |
|
||||||
VIH |
Except XTAL1 and |
|
V |
||||||||||
VCC = 2.4V - 5.5V |
0.6VCC(2) |
|
VCC + 0.5 |
||||||||||
|
|
RESET pins |
|
|
|
|
|
|
|
|
|
|
|
VIH1 |
Input High Voltage, |
VCC = 1.8V - 2.4V |
0.8VCC(2) |
|
VCC + 0.5 |
V |
|||||||
XTAL1 pin |
VCC = 2.4V - 5.5V |
0.7VCC(2) |
|
VCC + 0.5 |
|||||||||
V |
IH2 |
Input High Voltage, |
V |
|
= 1.8V - 5.5V |
0.9V |
(2) |
|
V |
|
+ 0.5 |
V |
|
RESET pin |
CC |
|
CC |
||||||||||
|
|
|
CC |
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|||
VOL |
(3) |
IOL = 10mA, VCC = 5V |
|
|
|
|
0.7 |
|
V |
||||
Output Low Voltage , |
IOL = 5mA, VCC = 3V |
|
|
|
|
0.5 |
|
||||||
|
|
|
|
|
|
|
|
|
|||||
V |
OH |
Output High Voltage(4), |
IOH = -20mA, VCC = 5V |
4.2 |
|
|
|
|
|
|
V |
||
|
|
IOH = -10mA, VCC = 3V |
2.3 |
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
||||
IIL |
Input Leakage |
VCC = 5.5V, pin low |
|
|
|
|
|
1 |
|
µA |
|||
Current I/O Pin |
(absolute value) |
|
|
|
|
|
|
||||||
IIH |
Input Leakage |
VCC = 5.5V, pin high |
|
|
|
|
|
1 |
|
µA |
|||
Current I/O Pin |
(absolute value) |
|
|
|
|
|
|
||||||
RRST |
Reset Pull-up Resistor |
|
|
|
30 |
|
|
|
60 |
|
kΩ |
||
RPU |
I/O Pin Pull-up Resistor |
|
|
|
20 |
|
|
|
50 |
|
kΩ |
253
7707A–AVR–01/07

TA = -40°C to 85°C, VCC = 1.8V to 5.5V (unless otherwise noted) |
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
||||
|
(Continued) |
|
|
|
|||||||
Symbol |
Parameter |
Condition |
|
|
|
Min.(5) |
|
Typ. |
Max.(5) |
Units |
|
|
|
Active 1MHz, VCC = 2V |
|
|
|
|
|
|
|
0.8 |
mA |
|
|
(AT90USB82/162V) |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Active 4MHz, VCC = 3V |
|
|
|
|
|
|
|
5 |
mA |
|
|
(AT90USB82/162L) |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Active 8MHz, VCC = 5V |
|
|
|
|
|
|
|
18 |
mA |
|
|
(AT90USB82/162) |
|
|
|
|
|
|
|
||
|
Power Supply Current(6) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ICC |
Idle 1MHz, VCC = 2V |
|
|
|
|
|
|
0.4 |
0.75 |
mA |
|
|
|
|
|
|
|
|
|||||
|
(AT90USB82/162V) |
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
||
|
|
Idle 4MHz, VCC = 3V |
|
|
|
|
|
|
|
2.2 |
mA |
|
|
(AT90USB82/162L) |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Idle 8MHz, VCC = 5V |
|
|
|
|
|
|
|
8 |
mA |
|
|
(AT90USB82/162) |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Power-down mode |
WDT enabled, VCC = 3V |
|
|
|
|
|
|
<10 |
20 |
µA |
|
WDT disabled, VCC = 3V |
|
|
|
|
|
|
<1 |
3 |
µA |
|
|
|
|
|
|
|
|
|
||||
AVCC |
Analog Supply Voltage |
|
|
|
VCC - 0.3 |
|
|
VCC + 0.3 |
V |
||
|
|
|
|
|
|
|
|
|
|
|
|
VACIO |
Analog Comparator |
VCC = 5V |
|
|
|
|
|
|
<10 |
40 |
mV |
Input Offset Voltage |
Vin = VCC/2 |
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
||
IACLK |
Analog Comparator |
VCC = 5V |
|
-50 |
|
|
|
50 |
nA |
||
Input Leakage Current |
Vin = VCC/2 |
|
|
|
|
||||||
|
|
|
|
|
|
|
|
|
|
||
tACID |
Analog Comparator |
VCC = 2.7V |
|
|
|
|
|
|
750 |
|
ns |
Propagation Delay |
VCC = 4.0V |
|
|
|
|
|
|
500 |
|
||
|
|
|
|
|
|
|
|
|
|||
Rusb |
USB Serial resistor |
|
|
|
|
|
|
|
22 |
|
Ω |
|
|
|
|
|
|
|
|
|
|
|
|
Cusb |
Ucap capacitor |
|
|
|
|
|
|
|
1 |
|
µF |
|
|
|
|
|
|
|
|
||||
Note: 1. |
"Max" means the highest value where the pin is guaranteed to be read as low |
|
|
|
2."Min" means the lowest value where the pin is guaranteed to be read as high
3.Although each I/O port can sink more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
AT90USB82/162:
1.)The sum of all IOL, for ports A0-A7, G2, C4-C7 should not exceed 100 mA. 2.)The sum of all IOL, for ports C0-C3, G0-G1, D0-D7 should not exceed 100 mA. 3.)The sum of all IOL, for ports G3-G5, B0-B7, E0-E7 should not exceed 100 mA. 4.)The sum of all IOL, for ports F0-F7 should not exceed 100 mA.
ATmega2560:
1.)The sum of all IOL, for ports J0-J7, A0-A7, G2 should not exceed 200 mA.
2.)The sum of all IOL, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200 mA. 3.)The sum of all IOL, for ports G3-G4, B0-B7, H0-B7 should not exceed 200 mA. 4.)The sum of all IOL, for ports E0-E7, G5 should not exceed 100 mA.
5.)The sum of all IOL, for ports F0-F7, K0-K7 should not exceed 100 mA.
If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test condition.
4.Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
AT90USB82/162:
1)The sum of all IOH, for ports A0-A7, G2, C4-C7 should not exceed 100 mA. 2)The sum of all IOH, for ports C0-C3, G0-G1, D0-D7 should not exceed 100 mA. 3)The sum of all IOH, for ports G3-G5, B0-B7, E0-E7 should not exceed 100 mA.
254
7707A–AVR–01/07

4)The sum of all IOH, for ports F0-F7 should not exceed 100 mA. ATmega2560:
1)The sum of all IOH, for ports J0-J7, G2, A0-A7 should not exceed 200 mA.
2)The sum of all IOH, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200 mA. 3)The sum of all IOH, for ports G3-G4, B0-B7, H0-H7 should not exceed 200 mA.
4)The sum of all IOH, for ports E0-E7, G5 should not exceed 100 mA. 5)The sum of all IOH, for ports F0-F7, K0-K7 should not exceed 100 mA.
If IOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition.
5.All DC Characteristics contained in this datasheet are based on simulation and characterization of other AVR microcontrollers manufactured in the same process technology. These values are preliminary values representing design targets, and will be updated after characterization of actual silicon
6.Values with “Power Reduction Register 1 - PRR1” disabled (0x00).
7.As specified on the USB Electrical chapter, the D+/D- pads can withstand voltages down to -1V applied through a 39 Ohms resistor in series with a 2Ω resistor.
External Clock
Drive Waveforms
Figure 106. External Clock Drive Waveforms
VIH1
VIL1
External Clock Drive
Table 48. External Clock Drive
|
|
VCC=1.8-5.5V |
VCC=2.7-5.5V |
VCC=4.5-5.5V |
|
|||
Symbol |
Parameter |
Min. |
Max. |
Min. |
Max. |
Min. |
Max. |
Units |
|
|
|
|
|
|
|
|
|
1/tCLCL |
Oscillator |
0 |
2 |
0 |
8 |
0 |
16 |
MHz |
Frequency |
||||||||
tCLCL |
Clock Period |
500 |
|
125 |
|
62.5 |
|
ns |
tCHCX |
High Time |
200 |
|
50 |
|
25 |
|
ns |
tCLCX |
Low Time |
200 |
|
50 |
|
25 |
|
ns |
tCLCH |
Rise Time |
|
2.0 |
|
1.6 |
|
0.5 |
μs |
tCHCL |
Fall Time |
|
2.0 |
|
1.6 |
|
0.5 |
μs |
|
Change in period |
|
|
|
|
|
|
|
tCLCL |
from one clock |
|
2 |
|
2 |
|
2 |
% |
|
cycle to the next |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: All DC Characteristics contained in this datasheet are based on simulation and characterization of other AVR microcontrollers manufactured in the same process technology. These values are preliminary values representing design targets, and will be updated after characterization of actual silicon.
255
7707A–AVR–01/07

Maximum speed vs. VCC
Maximum frequency is depending on VCC. As shown in Figure 107 and Figure 108, the Maximum Frequency vs. VCC curve is linear between 1.8V < VCC < 2.7V and between 2.7V < VCC < 4.5V.
Figure 107. Maximum Frequency vs. VCC, AT90USB82/162
8 MHz |
|
|
4 MHz |
Safe Operating Area |
|
1.8V |
2.7V |
5.5V |
Figure 108. Maximum Frequency vs. VCC, AT90USB82/162
16 MHz
8 MHz
Safe Operating Area
2.7V |
4.5V |
5.5V |
256
7707A–AVR–01/07

SPI Timing
Characteristics
See Figure 109 and Figure 110 for details.
Table 49. SPI Timing Parameters
|
|
|
|
|
Description |
Mode |
Min |
Typ |
Max |
|
||||
|
|
|
|
|
|
|
|
|
|
|
||||
1 |
|
|
|
|
SCK period |
Master |
|
See Table 58 |
|
|
||||
|
|
|
|
|
|
|
|
|
||||||
2 |
|
|
SCK high/low |
Master |
|
50% duty cycle |
|
|
||||||
|
|
|
|
|
|
|
|
|
||||||
3 |
|
|
Rise/Fall time |
Master |
|
TBD |
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
4 |
|
|
|
|
|
|
Setup |
Master |
|
10 |
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
5 |
|
|
|
|
|
|
Hold |
Master |
|
10 |
|
|
||
|
|
|
|
|
|
|
|
|
|
|
||||
6 |
|
|
|
|
Out to SCK |
Master |
|
0.5 • tsck |
|
|
||||
7 |
|
|
|
|
SCK to out |
Master |
|
10 |
|
|
||||
|
|
|
|
|
|
|
|
|||||||
8 |
|
SCK to out high |
Master |
|
10 |
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
|
|
|
|
|
low to out |
Slave |
|
15 |
|
|
||
|
|
|
SS |
|
|
ns |
||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
|
|
|
SCK period |
Slave |
4 • tck |
|
|
|||||
|
|
|
|
|
|
|
||||||||
11 |
|
SCK high/low(1) |
Slave |
2 • t |
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
ck |
|
|
|
12 |
|
|
Rise/Fall time |
Slave |
|
TBD |
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
13 |
|
|
|
|
|
|
Setup |
Slave |
10 |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
14 |
|
|
|
|
|
|
Hold |
Slave |
tck |
|
|
|
||
15 |
|
|
|
|
SCK to out |
Slave |
|
15 |
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
||||
16 |
|
SCK to |
|
high |
Slave |
20 |
|
|
|
|||||
|
SS |
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
||||||
17 |
|
|
|
|
high to tri-state |
Slave |
|
10 |
|
|
||||
|
SS |
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
||||||
18 |
|
|
|
|
|
low to SCK |
Slave |
20 |
|
|
|
|||
|
|
SS |
|
|
|
|||||||||
Note: |
1. In SPI Programming mode the minimum SCK high/low period is: |
|
|
-2 tCLCL for fCK < 12 MHz
-3 tCLCL for fCK > 12 MHz
Figure 109. SPI Interface Timing Requirements (Master Mode)
SS
6 |
|
1 |
SCK |
|
|
|
|
(CPOL = 0) |
|
|
|
|
|
|
2 |
2 |
|
SCK |
|
|
|
|
(CPOL = 1) |
|
|
|
|
4 |
5 |
|
3 |
|
MISO |
MSB |
... |
LSB |
|
(Data Input) |
||||
|
|
|
||
|
|
7 |
8 |
|
MOSI |
MSB |
... |
LSB |
|
(Data Output) |
||||
|
|
|
257
7707A–AVR–01/07

Figure 110. SPI Interface Timing Requirements (Slave Mode)
SS
SCK (CPOL = 0)
SCK (CPOL = 1)
MOSI
(Data Input)
MISO
(Data Output)
9
13
10 |
16 |
||
|
|
|
|
11 11
14 |
|
|
12 |
MSB |
... |
LSB |
|
|
15 |
|
17 |
MSB |
... |
LSB |
X |
Hardware Boot |
Figure 111. Hardware Boot Timing Requirements |
|
|
|
|
|
|
|||||||||||||||||
EntranceTiming |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RESET |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||
Characteristics |
|
|
|
|
|
|
|
|
|
|
||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
tSHRH |
|
|
|
tHHRH |
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ALE/HWB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 50. Hardware Boot Timings
Symbol |
Parameter |
Min |
Max |
|
|
|
|
tSHRH |
HWB low Setup before Reset High |
0 |
|
|
|
|
|
|
HWB low Hold after Reset High |
StartUpTime(SUT) + |
|
tHHRH |
Time Out |
|
|
|
|
Delay(TOUT) |
|
|
|
|
|
258
7707A–AVR–01/07