- •Features
- •Disclaimer
- •Overview
- •Block Diagram
- •Pin Descriptions
- •Port A (PA7..PA0)
- •Port B (PB7..PB0)
- •Port C (PC7..PC0)
- •Port D (PD7..PD0)
- •RESET
- •XTAL1
- •XTAL2
- •AVCC
- •AREF
- •Resources
- •Data Retention
- •AVR CPU Core
- •Introduction
- •Status Register
- •Stack Pointer
- •I/O Memory
- •Clock Systems and their Distribution
- •Clock Sources
- •Crystal Oscillator
- •External Clock
- •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
- •Watchdog Timer
- •Interrupts
- •I/O Ports
- •Introduction
- •Configuring the Pin
- •Reading the Pin Value
- •Unconnected pins
- •Alternate Port Functions
- •Register Description for I/O Ports
- •8-bit Timer/Counter0 with PWM
- •Overview
- •Registers
- •Definitions
- •Counter Unit
- •Normal Mode
- •Fast PWM Mode
- •8-bit Timer/Counter Register Description
- •Timer/Counter0 and Timer/Counter1 Prescalers
- •Internal Clock Source
- •Prescaler Reset
- •External Clock Source
- •16-bit Timer/Counter1
- •Overview
- •Registers
- •Definitions
- •Compatibility
- •Counter Unit
- •Input Capture Unit
- •Noise Canceler
- •Force Output Compare
- •Normal Mode
- •Fast PWM Mode
- •16-bit Timer/Counter Register Description
- •8-bit Timer/Counter2 with PWM and Asynchronous Operation
- •Overview
- •Registers
- •Definitions
- •Counter Unit
- •Normal Mode
- •Fast PWM Mode
- •8-bit Timer/Counter Register Description
- •Slave Mode
- •Master Mode
- •Data Modes
- •USART
- •Overview
- •Clock Generation
- •External Clock
- •Frame Formats
- •Parity Bit Calculation
- •Parity Generator
- •Receiver Error Flags
- •Parity Checker
- •Disabling the Receiver
- •Using MPCM
- •Write Access
- •Read Access
- •Features
- •TWI Terminology
- •Transferring Bits
- •Address Packet Format
- •Data Packet Format
- •Overview of the TWI Module
- •SCL and SDA Pins
- •Bus Interface Unit
- •Address Match Unit
- •Control Unit
- •Using the TWI
- •Master Receiver Mode
- •Slave Receiver Mode
- •Miscellaneous States
- •Analog Comparator Multiplexed Input
- •Analog to Digital Converter
- •Features
- •Operation
- •Changing Channel or Reference Selection
- •ADC Input Channels
- •Analog Input Circuitry
- •Features
- •Overview
- •TAP Controller
- •PRIVATE0; $8
- •PRIVATE1; $9
- •PRIVATE2; $A
- •PRIVATE3; $B
- •Bibliography
- •IEEE 1149.1 (JTAG) Boundary-scan
- •Features
- •System Overview
- •Data Registers
- •Bypass Register
- •Reset Register
- •EXTEST; $0
- •IDCODE; $1
- •AVR_RESET; $C
- •BYPASS; $F
- •Scanning the ADC
- •ATmega16 Boundary-scan Order
- •Features
- •Application Section
- •Read-While-Write and no Read- While-Write Flash Sections
- •Prevent Reading the RWW Section during Self-Programming
- •Simple Assembly Code Example for a Boot Loader
- •Fuse Bits
- •Latching of Fuses
- •Signature Bytes
- •Calibration Byte
- •Page Size
- •Signal Names
- •Chip Erase
- •Reading the Flash
- •Reading the EEPROM
- •Data Polling Flash
- •Data Polling EEPROM
- •AVR_RESET ($C)
- •PROG_ENABLE ($4)
- •Data Registers
- •Reset Register
- •Programming Enable Register
- •Programming Command Register
- •Virtual Flash Page Read Register
- •Performing Chip Erase
- •Reading the Flash
- •Reading the EEPROM
- •Electrical Characteristics
- •Absolute Maximum Ratings*
- •DC Characteristics
- •External Clock Drive Waveforms
- •External Clock Drive
- •Two-wire Serial Interface Characteristics
- •ADC Characteristics
- •Idle Supply Current
- •Pin Pullup
- •Pin Driver Strength
- •Register Summary
- •Instruction Set Summary
- •Ordering Information
- •Packaging Information
- •Errata
ATmega16(L)
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 ................................-0.5V to VCC+0.5V |
operational sections of this specification is not |
||||
Voltage on |
|
with respect to Ground......-0.5V to +13.0V |
implied. Exposure to absolute maximum rating |
||
RESET |
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.0mA PDIP and |
|
||||
400.0mA TQFP/MLF |
|
||||
|
|
|
|
|
|
DC Characteristics
TA = -40°C to 85°C, VCC = 2.7V to 5.5V (Unless Otherwise Noted)
Symbol |
|
Parameter |
Condition |
|
Min |
|
Typ |
Max |
Units |
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
Input Low Voltage except |
|
|
|
|
|
|
|
|
(1) |
|
|||
VIL |
|
XTAL1 and |
|
pins |
VCC=2.7 - 5.5 |
|
-0.5 |
|
|
0.2 VCC |
V |
||||
RESET |
|
|
|
||||||||||||
VIH |
|
Input High Voltage except |
VCC=2.7 - 5.5 |
|
0.6 VCC |
(2) |
|
VCC |
+0.5 |
V |
|||||
|
XTAL1 and |
RESET |
pins |
|
|
|
|||||||||
VIH1 |
|
Input High Voltage |
VCC=2.7 - 5.5 |
|
0.7 VCC |
(2) |
|
VCC |
+0.5 |
V |
|||||
|
|
|
|
|
|
|
|||||||||
|
XTAL1 pin |
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
VIL1 |
|
Input Low Voltage |
VCC=2.7 - 5.5 |
|
-0.5 |
|
|
|
(1) |
V |
|||||
|
XTAL1 pin |
|
|
|
0.1 VCC |
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
VIH2 |
|
Input High Voltage |
VCC=2.7 - 5.5 |
|
0.9 VCC |
(2) |
|
VCC |
+0.5 |
V |
|||||
|
|
|
|
|
|
|
|||||||||
|
RESET pin |
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
VIL2 |
|
Input Low Voltage |
VCC=2.7 - 5.5 |
|
-0.5 |
|
|
0.2 VCC |
V |
||||||
|
|
|
|
|
|
|
|
||||||||
RESET pin |
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
Output Low Voltage(3) |
I |
OL |
= 20 mA, V |
= 5V |
|
|
|
0.7 |
V |
||||
VOL |
|
|
|
|
|
|
|
CC |
|
|
|
|
|
|
|
|
(Ports A,B,C,D) |
IOL = 10 mA, VCC = 3V |
|
|
|
0.5 |
V |
||||||||
|
|
|
|
|
|||||||||||
VOH |
|
Output High Voltage(4) |
IOH = -20 mA, VCC = 5V |
4.2 |
|
|
|
|
V |
||||||
|
(Ports A,B,C,D) |
IOH = -10 mA, VCC = 3V |
2.2 |
|
|
|
|
V |
|||||||
|
|
|
|
|
|
||||||||||
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Ω |
291
2466P–AVR–08/07
TA = -40°C to 85°C, VCC = 2.7V to 5.5V (Unless Otherwise Noted) (Continued)
Symbol |
Parameter |
Condition |
|
Min |
Typ |
Max |
Units |
|
|
|
|
|
|
|
|
|
|
Active 1 MHz, VCC |
= 3V |
|
1.1 |
|
mA |
|
|
(ATmega16L) |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Active 4 MHz, VCC |
= 3V |
|
3.8 |
5 |
mA |
|
|
(ATmega16L) |
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Active 8 MHz, VCC |
= 5V |
|
12 |
15 |
mA |
|
|
(ATmega16) |
|
|
|||
|
Power Supply Current |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ICC |
Idle 1 MHz, VCC = 3V |
|
0.35 |
|
mA |
||
|
|
|
|||||
|
(ATmega16L) |
|
|
|
|||
|
|
|
|
|
|
||
|
|
Idle 4 MHz, VCC = 3V |
|
1.2 |
2 |
mA |
|
|
|
(ATmega16L) |
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Idle 8 MHz, VCC = 5V |
|
5.5 |
7 |
mA |
|
|
|
(ATmega16) |
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Power-down Mode(5) |
WDT enabled, VCC = 3V |
|
<8 |
15 |
µA |
|
|
WDT disabled, VCC = 3V |
|
< 1 |
4 |
µA |
||
|
|
|
|||||
VACIO |
Analog Comparator |
VCC = 5V |
|
|
|
40 |
mV |
Input Offset Voltage |
Vin = VCC/2 |
|
|
|
|||
|
|
|
|
|
|
||
IACLK |
Analog Comparator |
VCC = 5V |
|
-50 |
|
50 |
nA |
Input Leakage Current |
Vin = VCC/2 |
|
|
||||
|
|
|
|
|
|
||
tACPD |
Analog Comparator |
VCC = 2.7V |
|
|
750 |
|
ns |
Propagation Delay |
VCC = 4.0V |
|
|
500 |
|
||
|
|
|
|
|
Notes: 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 (20 mA at Vcc = 5V, 10 mA at Vcc = 3V) under steady state conditions (non-transient), the following must be observed:
PDIP Package:
1] The sum of all IOL, for all ports, should not exceed 200 mA.
2] The sum of all IOL, for port A0 - A7, should not exceed 100 mA.
3] The sum of all IOL, for ports B0 - B7,C0 - C7, D0 - D7 and XTAL2, should not exceed 100 mA. TQFP and QFN/MLF Package:
1] The sum of all IOL, for all ports, should not exceed 400 mA.
2] The sum of all IOL, for ports A0 - A7, should not exceed 100 mA. 3] The sum of all IOL, for ports B0 - B4, should not exceed 100 mA.
4] The sum of all IOL, for ports B3 - B7, XTAL2, D0 - D2, should not exceed 100 mA. 5] The sum of all IOL, for ports D3 - D7, should not exceed 100 mA.
6] The sum of all IOL, for ports C0 - C7, 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 (20 mA at Vcc = 5V, 10 mA at Vcc = 3V) under steady state conditions (non-transient), the following must be observed:
PDIP Package:
1] The sum of all IOH, for all ports, should not exceed 200 mA.
2] The sum of all IOH, for port A0 - A7, should not exceed 100 mA.
3] The sum of all IOH, for ports B0 - B7,C0 - C7, D0 - D7 and XTAL2, should not exceed 100 mA. TQFP and QFN/MLF Package:
1] The sum of all IOH, for all ports, should not exceed 400 mA.
2] The sum of all IOH, for ports A0 - A7, should not exceed 100 mA. 3] The sum of all IOH, for ports B0 - B4, should not exceed 100 mA.
4] The sum of all IOH, for ports B3 - B7, XTAL2, D0 - D2, should not exceed 100 mA.
292 ATmega16(L)
2466P–AVR–08/07
ATmega16(L)
5] The sum of all IOH, for ports D3 - D7, should not exceed 100 mA.
6] The sum of all IOH, for ports C0 - C7, 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. Minimum VCC for Power-down is 2.5V.
External Clock
Drive Waveforms
Figure 145. External Clock Drive Waveforms
External Clock
Drive
VIH1
VIL1
Table 118. External Clock Drive(1)
|
|
VCC = 2.7V to 5.5V |
VCC = 4.5V to 5.5V |
|
|
|||
Symbol |
Parameter |
Min |
|
Max |
Min |
Max |
|
Units |
|
|
|
|
|
|
|
|
|
1/tCLCL |
Oscillator Frequency |
0 |
|
8 |
0 |
16 |
|
MHz |
tCLCL |
Clock Period |
125 |
|
|
62.5 |
|
|
ns |
tCHCX |
High Time |
50 |
|
|
25 |
|
|
ns |
tCLCX |
Low Time |
50 |
|
|
25 |
|
|
ns |
tCLCH |
Rise Time |
|
|
1.6 |
|
0.5 |
|
μs |
tCHCL |
Fall Time |
|
|
1.6 |
|
0.5 |
|
μs |
|
Change in period from |
|
|
|
|
|
|
|
|
one clock cycle to the |
|
|
2 |
|
2 |
|
% |
tCLCL |
next |
|
|
|
|
|
|
|
Note: 1. |
Refer to “External Clock” on page 31 for details. |
|
|
|
|
|||
Table 119. External RC Oscillator, Typical Frequencies (VCC = 5) |
|
|
|
|||||
|
R [kΩ](1) |
|
C [pF] |
|
f(2) |
|
||
|
33 |
|
22 |
|
650 kHz |
|
||
|
|
|
|
|
|
|
||
|
10 |
|
22 |
|
2.0 MHz |
|
Notes: 1. R should be in the range 3 kΩ - 100 kΩ, and C should be at least 20 pF. 2. The frequency will vary with package type and board layout.
293
2466P–AVR–08/07
Two-wire Serial Interface Characteristics
Table 120 describes the requirements for devices connected to the Two-wire Serial Bus. The ATmega16 Two-wire Serial Interface meets or exceeds these requirements under the noted conditions.
Timing symbols refer to Figure 146.
Table 120. Two-wire Serial Bus Requirements
Symbol |
Parameter |
|
|
|
Condition |
Min |
|
Max |
Units |
||
|
|
|
|
|
|
|
|
|
|
||
VIL |
Input Low-voltage |
|
|
|
|
-0.5 |
|
0.3 VCC |
V |
||
VIH |
Input High-voltage |
|
|
|
|
0.7 VCC |
VCC + 0.5 |
V |
|||
|
|
(1) |
Hysteresis of Schmitt Trigger Inputs |
|
|
|
|
(2) |
– |
V |
|
Vhys |
|
|
|
0.05 VCC |
|||||||
V |
(1) |
Output Low-voltage |
|
|
|
3 mA sink current |
0 |
|
0.4 |
V |
|
|
OL |
|
|
|
|
|
|
|
|
|
|
t |
(1) |
Rise Time for both SDA and SCL |
|
|
|
20 + 0.1C |
(3)(2) |
300 |
ns |
||
|
r |
|
|
|
|
|
|
|
b |
|
|
t |
of |
(1) |
Output Fall Time from V |
to V |
|
|
10 pF < C < 400 pF(3) |
20 + 0.1C |
(3)(2) |
250 |
ns |
|
|
IHmin |
ILmax |
|
|
b |
|
b |
|
|
|
tSP(1) |
Spikes Suppressed by Input Filter |
|
|
|
0 |
|
50(2) |
ns |
|||
Ii |
|
Input Current each I/O Pin |
|
|
|
0.1VCC < Vi < 0.9VCC |
-10 |
|
10 |
µA |
|
|
|
|
|
|
|
|
|
|
|
||
C |
(1) |
Capacitance for each I/O Pin |
|
|
|
– |
|
10 |
pF |
||
|
i |
|
|
|
|
|
|
|
|
|
|
f |
SCL |
SCL Clock Frequency |
|
f |
CK |
(4) > max(16f , 250kHz)(5) |
0 |
|
400 |
kHz |
|
|
|
|
|
SCL |
|
|
|
|
|||
|
|
|
|
|
|
|
fSCL ≤ 100 kHz |
VCC – 0,4V |
1000ns |
Ω |
|
|
|
|
|
|
|
|
|
---------------------------- |
------------------- |
||
Rp |
Value of Pull-up resistor |
|
|
|
|
3mA |
|
Cb |
|
||
|
|
|
fSCL > 100 kHz |
VCC – 0,4V |
300ns |
Ω |
|||||
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
---------------------------- |
--------------- |
||
|
|
|
|
|
|
|
|
3mA |
|
Cb |
|
tHD;STA |
Hold Time (repeated) START Condition |
|
|
fSCL ≤ 100 kHz |
4.0 |
|
– |
µs |
|||
|
|
|
|
|
|
|
|||||
|
|
fSCL > 100 kHz |
0.6 |
|
– |
µs |
|||||
|
|
|
|
|
|
|
|
||||
tLOW |
Low Period of the SCL Clock |
|
|
f ≤ 100 kHz(6) |
4.7 |
|
– |
µs |
|||
|
|
SCL |
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fSCL > 100 kHz(7) |
1.3 |
|
– |
µs |
tHIGH |
High period of the SCL clock |
|
|
|
fSCL ≤ 100 kHz |
4.0 |
|
– |
µs |
||
|
|
|
fSCL > 100 kHz |
0.6 |
|
– |
µs |
||||
|
|
|
|
|
|
|
|
||||
tSU;STA |
|
|
|
|
fSCL ≤ 100 kHz |
4.7 |
|
– |
µs |
||
|
|
|
|
|
|
|
|
|
|||
Set-up time for a repeated START condition |
|
|
fSCL > 100 kHz |
0.6 |
|
– |
µs |
||||
|
|
|
|
|
|
||||||
tHD;DAT |
Data hold time |
|
|
|
fSCL ≤ 100 kHz |
0 |
|
3.45 |
µs |
||
|
|
|
fSCL > 100 kHz |
0 |
|
0.9 |
µs |
||||
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
tSU;DAT |
Data setup time |
|
|
|
fSCL ≤ 100 kHz |
250 |
|
– |
ns |
||
|
|
|
fSCL > 100 kHz |
100 |
|
– |
ns |
||||
|
|
|
|
|
|
|
|
||||
tSU;STO |
Setup time for STOP condition |
|
|
fSCL ≤ 100 kHz |
4.0 |
|
– |
µs |
|||
|
|
|
|
|
|
|
|||||
|
|
fSCL > 100 kHz |
0.6 |
|
– |
µs |
|||||
|
|
|
|
|
|
|
|
||||
tBUF |
Bus free time between a STOP and START |
|
|
fSCL ≤ 100 kHz |
4.7 |
|
– |
µs |
|||
|
|
|
|
|
|
|
|||||
|
|
|
condition |
|
|
|
fSCL > 100 kHz |
1.3 |
|
– |
µs |
Notes: 1. |
In ATmega16, this parameter is characterized |
and not 100% tested. |
|
|
|
|
2.Required only for fSCL > 100 kHz.
3.Cb = capacitance of one bus line in pF.
4.fCK = CPU clock frequency
294 ATmega16(L)
2466P–AVR–08/07
ATmega16(L)
SPI Timing
Characteristics
5.This requirement applies to all ATmega16 Two-wire Serial Interface operation. Other devices connected to the Two-wire Serial Bus need only obey the general fSCL requirement.
6.The actual low period generated by the ATmega16 Two-wire Serial Interface is (1/fSCL - 2/fCK), thus fCK must be greater than 6 MHz for the low time requirement to be strictly met at fSCL = 100 kHz.
7.The actual low period generated by the ATmega16 Two-wire Serial Interface is (1/fSCL - 2/fCK), thus the low time requirement will not be strictly met for fSCL > 308 kHz when fCK = 8 MHz. Still, ATmega16 devices connected to the bus may communicate at full speed (400 kHz) with other ATmega16 devices, as well as any other device with a proper tLOW acceptance margin.
Figure 146. Two-wire Serial Bus Timing
|
|
|
|
|
|
|
|
|
|
|
|
tof |
|
|
tHIGH |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tr |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||
SCL |
|
|
|
|
|
|
|
|
|
|
|
tLOW |
|
|
|
|
tLOW |
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tSU;STA |
|
|
|
|
|
|
|
|
|
tHD;STA |
|
tHD;DAT |
|
|
|
|
|
|
t |
|
|
|
|
|
|
|
||||||||
SDA |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SU;DAT |
|
|
|
|
tSU;STO |
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tBUF
See Figure 147 and Figure 148 for details.
Table 121. 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 |
|
3.6 |
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
4 |
|
|
|
|
|
|
Setup |
Master |
|
10 |
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
5 |
|
|
|
|
|
|
Hold |
Master |
|
10 |
|
|
||
|
|
|
|
|
|
|
|
|
|
ns |
||||
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 |
|
|
|
|||||||||
10 |
|
|
|
|
SCK period |
Slave |
4 • tSCK |
|
|
|
||||
11 |
|
|
SCK high/low |
Slave |
2 • tSCK |
|
|
|
||||||
12 |
|
|
Rise/Fall time |
Slave |
|
|
1.6 |
µs |
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
13 |
|
|
|
|
|
|
Setup |
Slave |
10 |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
14 |
|
|
|
|
|
|
Hold |
Slave |
10 |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
||||
15 |
|
|
|
|
SCK to out |
Slave |
|
15 |
|
ns |
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
SCK to |
|
high |
Slave |
20 |
|
|
||||||
|
SS |
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|
|||||
17 |
|
|
|
|
high to tri-state |
Slave |
|
10 |
|
|
||||
SS |
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|||||
18 |
|
|
|
|
|
low to SCK |
Slave |
2 • tSCK |
|
|
|
|||
|
SS |
|
|
|
295
2466P–AVR–08/07
Figure 147. 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) |
||||
|
|
|
Figure 148. SPI Interface Timing Requirements (Slave Mode)
18 |
|
|
|
|
|
SS |
|
|
|
|
|
9 |
|
|
10 |
16 |
|
|
|
|
|
||
SCK |
|
|
|
|
|
(CPOL = 0) |
|
|
|
|
|
|
|
11 |
11 |
|
|
SCK |
|
|
|
|
|
(CPOL = 1) |
|
|
|
|
|
13 |
14 |
|
|
12 |
|
MOSI |
MSB |
... |
LSB |
|
|
(Data Input) |
|
||||
|
|
|
|
||
|
|
15 |
|
17 |
|
MISO |
MSB |
... |
LSB |
X |
|
(Data Output) |
|||||
|
|
|
|
296 ATmega16(L)
2466P–AVR–08/07