atmega32u4-16mu ATMEL Corporation, atmega32u4-16mu Datasheet - Page 198

no-image

atmega32u4-16mu

Manufacturer Part Number
atmega32u4-16mu
Description
Atmega32u4 8-bit Avr Microcontroller With 32k Bytes Of Isp Flash And Usb Controller
Manufacturer
ATMEL Corporation
Datasheet
198
ATmega32U4
When the SPI is enabled, the data direction of the MOSI, MISO, SCK, and SS pins is overridden
according to
Functions” on page
Table 18-1.
Note:
The following code examples show how to initialize the SPI as a Master and how to perform a
simple transmission. DDR_SPI in the examples must be replaced by the actual Data Direction
Register controlling the SPI pins. DD_MOSI, DD_MISO and DD_SCK must be replaced by the
actual data direction bits for these pins. E.g. if MOSI is placed on pin PB5, replace DD_MOSI
with DDB5 and DDR_SPI with DDRB.
MOSI
MISO
SCK
Pin
SS
1. See
direction of the user defined SPI pins.
Table
Direction, Master SPI
User Defined
Input
User Defined
User Defined
SPI Pin Overrides
“Alternate Functions of Port B” on page 70
18-1. For more details on automatic port overrides, refer to
68.
(1)
Direction, Slave SPI
Input
User Defined
Input
Input
for a detailed description of how to define the
“Alternate Port
7766A–AVR–03/08

Related parts for atmega32u4-16mu