最終更新:2012-08-21 (火) 07:39:08 (4260d)
Arduino/SPI
SPI Library
This library provides functions for transferring information using the Serial Peripheral Interface (SPI). The SPI interface is automatically initialized when the Spi library is included in a sketch. It sets the following digital I/O pins:
pin 13 | SCK | SPI clock |
pin 12 | MISO | SPI master in, slave out |
pin 11 | MOSI | SPI master out, slave in |
pin 10 | SS | SPI slave select |
The default SPI configuation is as follows:
- SPI Master enabled
- MSB of the data byte transmitted first
- SPI mode 0 (CPOL = 0, CPHA = 0)
- SPI clock frequency = system clock / 4