Overview of SPI
Serial Peripheral Interface (SPI) is typically used on external non-volatile memory and graphical displays, where faster data transfer rates and high bandwidth are required. Many sensor devices support SPI in addition to I2C.
SPI shares some characteristics with I2C. It is a synchronous serial interface, which means it relies on a shared clock signal to synchronize data transfer between devices. Because of the shared clock signal, SPI also has a master-slave architecture, where the master controls the triggering of the clock signal and all other connected peripherals are slaves.
Note
SPI is faster than I2C. The clock signal for data transfer is typically in the range of 16 MHz to 25 MHz.
Another similarity with I2C is that it supports multiple slaves.
But there are also some differences. While I2C is semi-duplex, SPI supports full-duplex data transfer, meaning the master and slave can simultaneously exchange information. This is achieved by having a wire to transmit from the...