12.07.2015 Views

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ATmega32A</strong>When the SPI is enabled, the data direction of the MOSI, MISO, SCK, and SS pins is overriddenaccording to Table 18-1. For more details on automatic port overrides, refer to “Alternate PortFunctions” on page 55.Table 18-1.SPI Pin OverridesPin Direction, Master SPI Direction, Slave SPIMOSI User Defined InputMISO Input User DefinedSCK User Defined InputSS User Defined InputNote: See “Alternate Functions of Port B” on page 59 for a detailed description of how to define thedirection of the user defined SPI pins.The following code examples show how to initialize the SPI as a master and how to perform asimple transmission. DDR_SPI in the examples must be replaced by the actual Data DirectionRegister controlling the SPI pins. DD_MOSI, DD_MISO and DD_SCK must be replaced by theactual data direction bits for these pins. For example if MOSI is placed on pin PB5, replaceDD_MOSI with DDB5 and DDR_SPI with DDRB.8155C–AVR–02/11140

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!