# Serial Peripheral Interface (SPI)

> A fast link where one chip picks a part with its own wire, then swaps data.

**Field:** Software Development  
**Category:** Embedded & IoT  
**Also known as:** SPI Bus, SPI Protocol

## Think of it like

It is like a teacher who taps one kid on the arm. Then she talks to just that kid.

## Definition

SPI is a fast way for one main chip to swap data with nearby parts. It uses a clock wire, one data wire each way, and a select wire for each part. The main chip pulls one part's select wire to pick it. Then data flows both ways at once, in time with the clock. It is faster than I2C but needs more wires.

## Example

A small colour screen and an SD card share SPI wires on Lucy's board. Each one has its own select wire.

## Why it matters

Screens and memory cards need lots of data quickly. SPI gives them the speed.

## Common mistake

Leaving two select wires active at once. Two parts try to talk on the same data wire and both get muddled.

## Three principles

- **Clock led.** The main chip sets the pace.
- **Select wire.** One wire picks each part.
- **Both ways.** Data goes in and out at once.

## Related terms

- [Inter-Integrated Circuit (I2C)](https://learn.benibix.com/term/development/i2c)
- [Serial Port (UART)](https://learn.benibix.com/term/development/uart)
- [Microcontroller (MCU)](https://learn.benibix.com/term/development/microcontroller)
- [General-Purpose Input/Output (GPIO)](https://learn.benibix.com/term/development/gpio)

## Told apart from

- [I2C vs SPI](https://learn.benibix.com/compare/i2c-vs-spi): People think I2C and SPI are two names for one way to wire up a sensor. Both link one main chip to many parts, but in different ways. I2C uses two shared wires and calls each part by its address. SPI picks each part with its own select wire and moves data faster. Use I2C to save pins, and SPI for screens and memory cards.

![Three panels. UART: two devices joined by two wires that cross, transmit to receive, with no clock and an agreed speed. I2C: two shared lines, data and clock, with three small chips hanging off them, each with its own address. SPI, lit up: one main chip with a clock line, a data out line and a data in line shared by two parts, plus a separate select wire to each part.](https://learn.benibix.com/diagrams/dev4-device-buses.svg)

---

Source: https://learn.benibix.com/term/development/spi
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
