Serial Peripheral Interface (SPI) is a full-duplex serial protocol for communicating with high-speed peripherals.
The SPI Master on Raspberry Pi™ hardware can drive two SPI peripheral device. The SPI Master has four pins:
GPIO 11 (SPI0_SCLK) outputs a serial clock signal to synchronize communications.
GPIO 10 (SPI0_MOSI) outputs data to the SPI peripheral device.
GPIO 9 (SPI0_MISO) receives data from the SPI peripheral device.
GPIO 8 (SPI0_CE0) enables one SPI peripheral device.
GPIO 7 (SPI0_CE1) enables the other SPI peripheral device.
You can connect two SPI devices, such as displays, sensors, and flash storage to the SPI pins on the Raspberry Pi hardware. Connect both devices to the SCLK, MOSI, and MISO pins. Connect each device to one of the CE pins.
SPI on Raspberry Pi hardware supports:
Modes 0, 1, 2 or 3
8 bits per word
Data speeds: 500000, 1000000, 2000000, 4000000, 8000000, 16000000, 32000000
For more information, see: