I2C
Info
SPI is a Synchronization serial data connection standard.
SPI is a synchronous serial communication.
It is a full-duplex system.
The SPI bus consists of four elements.
picture [1] SPI circuit
SCLK : Serial Clock. (output from master)
MOSI : Master Output Slave Input.
MISO : Master Input Slave Output.
CS/SS : Chip Selection/Slave Selection (output from master)
Protocols
The maste select a slave to transmit a signal through the SS .
master transmits a signal synchronized to the SCLK through the MOSI .
The slave receives the signal transmitted through his (slave) MOSI according to the SCLK .
while it is activated to receive the signal through the SS .
To initiate communication,
the bus master configures the clock using frequencies supported by the slave device.
If the slave device has a unique crystal, the spi bus frequency must match the unique crystal frequency.
The master sends a bit on the MOSI line and the slave reads it,
while the slave sends a bit on the MISO line and the master reads it.
This order is maintained even if only one-way data transfers are intended.
MOSI and MISO look like one shift register.
The reason for this is to form a circulation buffer between the chips.
picture [2] SPI MOSI and MISO
This is Typical SPI circuit with multiple slaves.
picture [3] Typical SPI circuit: multiple slaves
The disadvantage of the SPI interface is that as the number of slave devices increases,
The SS pin of the master increases.
This is Daisy Chained SPI circuit with multiple slaves
The ‘Daisy-Chained’ circuit that improves this shortcoming.
picture [4] Daisy Chained SPI circuit: multiple slaves
The “Daisy Chained” circuit means that even if the slave device is increased,
Only one SSu pin of the master can be used.
Feature of spi
There are some advantages and disadvantages.
This is advantages of spi
1. There is no start/stop signal. The data can be streamed continuously without interruption.
2. There is no conflict slave's address
3. data bigger and faster than i2c
4. full-duplex system
This is disadvantages of spi
1. Uses four wires
2. No ACK
3. No form of error checking
4. Only single master
Leave a comment