4.b. ATmega168's Slave Select

The Slave Select (SS) line can be used to increase the robustness of the SPI communication between the master mega644 and slave mega168. It can also be used to allow the mega644 to control additional slave microcontrollers beyond the mega168. When initiating SPI communication, the SPI master should pull low the Slave Select pin of the slave for which the communication is intended (while ensuring that the Slave Select pins of all other slaves are pulled high). After each data packet, the master can synchronize the slave by pulling high the Slave Select line.

In the Orangutan X2, the mega168’s Slave Select is externally pulled low. As such, the mega644 does not need to pull the mega168’s Slave Select low in order to be able to communicate with it. This makes the Slave Select line an optional feature.

In the Orangutan X2’s default configuration, the mega168’s Slave Select is not connected to the mega644. You can connect it by soldering a wire from one of the mega644’s IO lines to the through-hole labelled SS on the back of the main board. It is located near the center of the board next to the attention line through-hole. The set of six (2×3) holes next to the Slave Select hole contain the SPI MISO (Master In, Slave Out), MOSI (Master Out, Slave In), and SCK (SPI Clock) lines. If you want to connect any additional slave devices, you will need to use these lines. Please see the Orangutan X2 schematic (63k pdf) for more details (when looking at the back of the board, pin 1 of schematic item JP2 is the upper-left hole with the octagonal solder mask — it is labeled MISO in the picture below).

Orangutan X2 SPI and attention pins