
Why another bus
I2C finds a chip by its address and waits for an answer to every byte, which caps it at 1 Mbit/s. SPI drops the address and the answers, sends a byte each way at once, and pays with more wires.
An I2C road puts every chip on the same two wires, so every message starts by naming its chip: an address goes out first, and the chip it names answers. After each byte the receiver pulls the data line low to say it arrived. That is what makes I2C so easy to wire, and it is also what limits it. The standard tops out at 1 Mbit/s in Fast-mode Plus, and most modules on a hobby board run at 100 or 400 kbit/s.
What SPI drops
SPI, the Serial Peripheral Interface, has no addresses and no answers. The controller owns a wire to each peripheral called chip select. It pulls that wire low, and the peripheral whose light is on listens; the others keep their hands off. The controller then ticks a clock wire, and on every tick one bit leaves on MOSI while one bit arrives on MISO. Eight ticks move a byte each way, at the same moment.
With no address to look up and no answer to wait for, the clock is limited by the wires and the chip, not by the protocol. A BME280 sensor accepts SPI at up to 10 MHz, and a W25Q128 flash chip reads at up to 50 MHz with its plain read command. An ESP32 can drive SPI at up to 80 MHz on its dedicated pins.
What it costs
Four wires instead of two, and one more chip-select wire for every additional peripheral. Nothing checks that a byte arrived: if the peripheral is not listening, the controller reads back whatever the line happens to hold and carries on.
SPI began at Motorola in the early 1980s, in its 6805 microcontrollers, and it was never made a formal standard. There is no rulebook to check a chip against. The chip's own datasheet says how it talks, and the rest of this course is the vocabulary those datasheets use.
The sushi belt in this lesson's bench is a picture, and one thing about it is wrong: a real belt takes a second a step, and a real SPI clock ticks millions of times a second, as electricity.
Common mistakes
- Expecting an address on the wire. SPI has none. Which chip listens is decided by which chip-select wire is low, so the wiring is the addressing.
- Assuming SPI has a fixed speed. It has no standard speed at all. The limit is the slowest chip on the bus and the wires between them, and it is written in the datasheet.
- Trusting a silent bus. With no answers, a loose chip-select wire looks like a working bus that returns nonsense.
Edit this page — content/fundamentals/spi/why-another-bus.mdx
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.