Attention and spi pins, A. atmega168's attention line, B. atmega168's slave select – Pololu Orangutan X2 User Manual

Page 23

Advertising
background image

4. Attention and SPI Pins

Orangutan X2 SPI and attention pins

4.a. ATmega168's Attention Line

Whenever a bit gets set in the mega168’s status byte, the mega168 sets its attention line. Whenever a Get Status
command (218—

Section 3.d.01

) is issued, the mega168 clears the attention line. In the Orangutan X2’s default

configuration, the attention line is not connected to the mega644 and hence any status changes must be detected
via polling the status byte with Get Status commands. If desired, you can connect the attention line to one of
the mega644’s IO pins. Whenever this pin goes high, you know to send a Get Status command. Connecting the
attention line to the mega644 gives you a simpler polling method, and it also gives you the option to trigger an
interrupt every time a status bit is set. You can access the attention line via the through-hole labelled ATT on the
back of the main board. It is located near the center of the board. The attention line is a purely optional feature.

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

Orangutan X2 Command Documentation v1.01

© 2001–2010 Pololu Corporation

4. Attention and SPI Pins

Page 23 of 27

Advertising