Importance of SPI slave select pin
Importance of SPI slave select pin
Chip select (CS) or slave select (SS) is the name of a control line in the SPI bus used to select one (or a set) of the slave device (commonly called “chips”) out of several slave devices connected to the same master device.
From Figure 1. There is one master device and one slave device and to use the SPI communication between these devices, then both master and slave must support the SPI peripheral or the SPI interface. If the slave doesn’t help SPI interface, then SPI communication between the master and the slave is not possible.
So, when a master wants to communicate with a slave, the first thing master does is, it selects the slave. So, that means the master uses one of its GPIO pins to pull the slave select (SS) pin of the slave to ground.
When the SS pin of the slave pulled to ground, then the only slave will activate the data pins that is, MOSI and MISO pin. Unless slave select pin pulled to 0 or ground, the slave would not enable data communication between master and slave devices because the data pins are in high impedance state or Hi-Z state until the SS pin is 0. So, when master pulls SS pin to ground, then data pins are come out of Hi-Z state.
By connecting GPIO pins of the master to the slave, the program has to select the slave by pulling the slave select to ground. Then the master can send the data as well as receive the data from the slave. Master will send the data to the slave, and the clock must carry along with the data. That means the data communication must be synchronized with the clock signal.
In the following article, let’s see SPI minimal bus configuration.
FastBit Embedded Brain Academy Courses
Click here: https://fastbitlab.com/course1