Circuit Fever Author - Rohit
Rohit
Posted on 23 Feb 2024

Serial Peripheral Interface (SPI) Protocol

Serial Periphiral Interface or SPI is a serial communication protocol which can transter data from sender(called master) to receiver(called slave). This protocol is synchronous communication protocol, which requires a clock pin to send or receive the data. Compared to UART serial communication protocol, it is faster but requires more connection pin.

Pin Connection

There are four connection pin in SPI which are given below:
  • MOSI: Master Out Slave In
  • MISO: Master In Slave Out
  • SCL: Serial Clock
  • CE: Chip Enable

SPI pin Connection

SPI Protocol

In this protocol, only master can send data to the slave or read data from the slave. The slave can't send or receive data by itself. Because the clock signal is controlled by the master only. If the master wants to send or read the data, it enables the clock signal.

There can be multiple slave connected to the master and the master can select the slave using the chip enable signal. The master enables the CE signal so that it can perfrom the write or read operation to the selected slave.

After master has selected the slave, it enables the clock signal. The master then sends data bits in each clock signal or master reads the data bits send by the slave in each clock signal. Once the communication is completed, the master disables the clock signal and CE signal.

Comments

We're currently in maintenance.