最終更新:2012-08-21 (火) 07:39:08 (4260d)  

Arduino/SPI
Top / 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 13SCKSPI clock
pin 12MISOSPI master in, slave out
pin 11MOSISPI master out, slave in
pin 10SSSPI 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

参考