Arduino

Buy | Download | Getting Started | Learning | Reference | Hardware | FAQ

Blog » | Forum » | Playground »

Reference Language | Libraries | Comparison | Changes

## SPI library

This library allows you to communicate with SPI devices, with the Arduino as the master device. On the Arduino Duemilanove and other ATmega168 / 328-based boards, the SPI bus includes pins 10 (SS), 11 (MOSI), 12 (MISO), and 13 (SCK). On the Arduino Mega, this is 50 (MISO), 51 (MOSI), 52 (SCK), and 53 (SS). Note that even if you're not using the SS pin, it must remain set as an output; otherwise, the SPI interface can be put into slave mode, rendering the library inoperative.

#### Functions

- begin()
- end()
- setBitOrder()
- setClockDivider()
- setDataMode()
- transfer()

#### Examples

#### See also

- shiftOut()

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Share|
Edit Page | Page History | Printable View | All Recent Site Changes