Serial Peripheral Interface
Serial Peripheral Interface (SPI) is a de facto standard (with many variants) for synchronous serial communication, used primarily in embedded systems for short-distance wired communication between integrated circuits.
Type | Serial communication bus | ||
---|---|---|---|
Production history | |||
Designer | Motorola | ||
Designed | Around early 1980s | ||
Manufacturer | various | ||
Daisy chain | Depends on devices | ||
Connector | Unspecified | ||
Electrical | |||
Max. voltage | Unspecified | ||
Max. current | Unspecified | ||
Data | |||
Width | 1 bit (bidirectional) | ||
Max. devices | Multidrop limited by chip selects. Daisy chaining unlimited. | ||
Protocol | Full-duplex serial | ||
Pinout | |||
MOSI | MasterOut Slave In | ||
MISO | Master In Slave Out | ||
SCLK | Serial Clock | ||
CS | Chip Select (one or more) | ||
(pins may have alternative names) |
SPI uses a master–slave architecture, described here with the terms "main" and "sub", where one main device orchestrates communication with some number of peripheral (sub) devices by driving the clock signal and chip select signal(s).
Motorola's original specification (early 1980s) uses four wires to perform full duplex communication. It is sometimes called a four-wire serial bus to contrast with three-wire variants which are half duplex, and with the two-wire I²C and 1-Wire serial buses.
Typical applications include interfacing microcontrollers with peripheral chips for Secure Digital cards, liquid crystal displays, analog-to-digital and digital-to-analog converters, flash and EEPROM memory, and various communication chips.
SPI may be accurately described as a synchronous serial interface, but it is different from the Synchronous Serial Interface (SSI) protocol.