Skip to content

Understanding SPI

Serial Peripheral Interface is extremely common for intergrated circuits (ICs). Used in memory chips, things like SD cards, lots of microcontrollers, IO expandeders, LCDs, DAQs, ADCs. SPI has a clock, interfaces with a clock can generally transmit faster.

There is a master and slaves, the IC is the SPI sslave where the master is a microcontroller or FPGA, the master initiationes the interaction with 4 signals. SCLK - serial clock, MOSI - master out slave in, MISO - master in slave out, SS - slave select (or chip select) which is active low.

You can have muleiple slaves on the same line. In this case there are three SS (chip select lines). Think of it as a way for the slave/chip to open it's eye and read the data.

Advantages/disadvantages:

ad: full duplex, e.g. can send and receive at same time. ad: higher spped that UART or I2C ad: Ubiquitous

dis: More pins that UART or I2C dis: short distances vs. RS-485/RS-232 dis: lots of variants