ATMEGA16U2-AU Atmel, ATMEGA16U2-AU Datasheet - Page 142
![MCU AVR 16K FLASH USB 32TQFP](/photos/6/91/69154/313-32-tqfp_sml.jpg)
ATMEGA16U2-AU
Manufacturer Part Number
ATMEGA16U2-AU
Description
MCU AVR 16K FLASH USB 32TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Specifications of ATMEGA16U2-AU
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
Processor Series
ATMEGA16x
Core
AVR8
Data Bus Width
8 bit
Data Ram Size
1.25 KB
Interface Type
SPI, UART
Maximum Clock Frequency
16 MHz
Number Of Programmable I/os
22
Number Of Timers
2
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
3rd Party Development Tools
EWAVR, EWAVR-BL
Development Tools By Supplier
ATAVRDRAGON, ATSTK500, ATSTK600, ATAVRISP2, ATAVRONEKIT, AT90USBKEY, ATEVK525
Minimum Operating Temperature
- 40 C
For Use With
ATSTK600 - DEV KIT FOR AVR/AVR32ATSTK500 - PROGRAMMER AVR STARTER KIT
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Data Converters
-
Lead Free Status / Rohs Status
Details
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 142 of 309
- Download datasheet (6Mb)
17.3
17.3.1
7799D–AVR–11/10
SS Pin Functionality
Slave Mode
The following code examples show how to initialize the SPI as a Slave and how to perform a
simple reception.
Note:
When the SPI is configured as a Slave, the Slave Select (SS) pin is always input. When SS is
held low, the SPI is activated, and MISO becomes an output if configured so by the user. All
other pins are inputs. When SS is driven high, all pins are inputs, and the SPI is passive, which
Assembly Code Example
C Code Example
SPI_SlaveInit:
SPI_SlaveReceive:
void SPI_SlaveInit(void)
{
}
char SPI_SlaveReceive(void)
{
}
; Set MISO output, all others input
ldi
out
; Enable SPI
ldi
out
ret
; Wait for reception complete
sbis SPSR,SPIF
rjmp SPI_SlaveReceive
; Read received data and return
in
ret
/* Set MISO output, all others input */
DDR_SPI = (1<<DD_MISO);
/* Enable SPI */
SPCR = (1<<SPE);
/* Wait for reception complete */
while(!(SPSR & (1<<SPIF)))
/* Return Data Register */
return SPDR;
1. See “Code Examples” on page 6.
;
r17,(1<<DD_MISO)
DDR_SPI,r17
r17,(1<<SPE)
SPCR,r17
r16,SPDR
(1)
(1)
ATmega8U2/16U2/32U2
142
Related parts for ATMEGA16U2-AU
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ATmega16](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
![ATMEGA16-16AU](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ 5V 44TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16MU](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ 5V 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16PU](/photos/6/70/67049/453-40-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ 5V 40DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16MQ](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
MCU AVR 16K FLASH 16MHZ 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16PC](/photos/6/70/67049/453-40-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ COM 40-DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16MC](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ COM 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16PI](/photos/6/70/67049/453-40-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ IND 40-DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16MI](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ IND 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16AI](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ IND 44-TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16AU SL383](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC MCU 8BIT 16KB FLASH 44TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16AQ](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
MCU AVR 16K FLASH 16MHZ 44-TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16AC](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ COM 44-TQFP
Manufacturer:
Atmel
Datasheet: