Specifications
Note! – These pins are only dedicated if you are actually using the SPI functions. If not, they remain
available for other functions. Also, if using three wire SPI, GPIO 14 remains available.
For platforms other than the RF100, refer to the appropriate platform specific section in the back of
this manual.
You will also need as many Chip Select pins as you have external SPI devices. You can choose any
available GPIO pin(s) to be your SPI chip selects. The basic program flow becomes:
1. # select the desired SPI device
2. writePin(somePin, False) # assuming the chip select is active-low
3. # Transfer data to the selected SPI device
4. spiWrite(“\x12\x34\x56”)
5. # deselect the SPI device
6. writePin(somePin, True) # assuming the chip select is active-low
SPI reads are handled in a similar fashion.
The specifics of which bytes to send to a given SPI slave device (and what the response will look like)
depend on the SPI device itself. You will have to refer to the manufacturer’s data sheet for any given
device you wish to interface to.
For examples of using the new SNAPpy SPI functions to interface to external devices, see the
following scripts that are bundled with Portal:
• spiTests.py – This is the overall SPI demo script
• LTC2412.py – Example of interfacing to a 24-bit Analog To Digital convertor
Script spiTests.py imports the other script, and exercises some of the functions within it.
• ZIC2410spiTests.py – like spiTests.py but specifically for ZIC2410 evaluation board
• AT25FS010.py – Example of interfacing to an ATMEL Flash memory
Script ZIC2410spiTests.py imports the other script, and exercises some of the functions within it.
SNAP Reference Manual Document Number 600-0007K Page 37 of 202