User Guide
Table Of Contents
171
When the master sends information to a slave, it usually:
1. Pulls the SS line low for the selected slave.
2. Brings the MOSI line high if the bit it is sending is 1;
or brings MOSI low if the bit is 0.
3. Pulses the SCK line. For example, if the clock line is
low when SPI is not being used, then pulsing the
line involves briefly bringing the clock line high and
then bringing it low again.
4. Repeats this process until all of the bits are sent.
5. Brings the SS line high.
When the master reads information from a slave, it usually:
1. Pulls the SS line low for the selected slave.
2. Pulses the SCK line.
3. Reads whether the MISO line is high, or low.
4. Repeats this process until it has all of the
information that it is expecting.
5. Brings the SS line high to end communication with
the slave.
With some devices, the master sends a command to the slave
device to tell it to send data. In these cases, the master moves
between the sending and reading phases without changing the
SS line.
There is some variety in how different SPI devices expect these
two processes to work. Some require that the clock line is high
when it is not in-use, and others require it to be low. Some SPI
slave devices expect their SS line to be high when the master
SS Slave select. Use one of these for each slave
device in the circuit. The master uses this wire to
indicate which slave device should listen and
respond to instructions.
Pin Name Description