user28035: I'm using a Genuino MKR1000 and I want to use the SPI interface, which I've seen that there is no Slave Select (SS)/Chip Select(CS) pin usage.
How can I use the SPI interface with multiple slaves then?


user3917: If the number of slaves is large, consider using a multiplexed arrangement for select lines.  As an example, the 16-pin 74LS138 Decoder/Demultiplexer pulls one of eight lines low depending on the state of its three address lines, while the 24-pin 74LS154 pulls one of sixteen lines low depending on the state of its four address lines.  Both of these chips have two or three enable lines, allowing use of two to four of them together to multiply the number of output lines by two to four via use of one or two more address lines.

user4143: The Arduino doesn't care what pin you use for SS since you just use digitalWrite() on it anyway. You use any pin you like for one slave, so you can use any other pin you like for another slave.
The ATMega-based boards need pin 10 to be set as an output for SPI to function, but you don't then have to use that for the actual slave select. The only time it becomes a real slave-select pin is when using the Arduino itself as a slave.

28035: <p>I'm using a <code>Genuino MKR1000</code> and I want to use the <code>SPI</code> interface, which I've seen that there is no <code>Slave Select (SS)/Chip Select(CS)</code> pin usage.</p>

<p>How can I use the <code>SPI</code> interface with multiple slaves then?</p>

<p><a href="https://i.stack.imgur.com/hKl9S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hKl9S.png" alt="enter image description here"></a></p>
 3917: <p>If the number of slaves is large, consider using a multiplexed arrangement for select lines.  As an example, the 16-pin 74LS138 Decoder/Demultiplexer pulls one of eight lines low depending on the state of its three address lines, while the 24-pin 74LS154 pulls one of sixteen lines low depending on the state of its four address lines.  Both of these chips have two or three enable lines, allowing use of two to four of them together to multiply the number of output lines by two to four via use of one or two more address lines.</p>
 4143: <p>The Arduino doesn't care what pin you use for SS since you just use <code>digitalWrite()</code> on it anyway. You use any pin you like for one slave, so you can use any other pin you like for another slave.</p>

<p>The ATMega-based boards need pin 10 to be set as an output for SPI to function, but you don't then have to use that for the actual slave select. The only time it becomes a real slave-select pin is when using the Arduino itself as a slave.</p>
