Back to Parent

Outcome


What is SPI?

Serial Peripheral Interface is a communication protocol used for many sensors and embedded systems. This system allows many sensors to communicate with one microcontroller with two way, or full duplex, communication.

SPI Architecture

SPI uses master/slave architecture and requires four logic signals. The "master" is usually the microcontroller, which reads and writes the multiple slave devices, which are the sensors or actuators. The four lines are as follows:

  1. SCLK - Serial Clock, which is output from the master and syncs all the devices
  2. MOSI - Master Out Slave In, which is data output from the master
  3. MISO - Master In Slave Out, which is data output from the slave device
  4. SS - Slave Select, which switches which device the master is talking to at a given time

Independent Slave Configuration

This wiring configuration is the most common, with shared clock, MOSI, and MISO lines. Adding an additional slave device is only one more pin output from the master, and the other three lines are connected to the existing buses.

Spi.thumb
Show Advanced Options

Example SPI devices with Photon

Final base.thumb
Show Advanced Options
Drop files here or click to select

You can upload files of up to 20MB using this form.