Wireless RS232 data radios from Data Hunter.com

Call Data Hunter wireless data radio
Email questions to Data Hunter wireless data radios
555

SPI Serial Peripheral Interface Bus

The Serial Peripheral Interface Bus or SPI (often pronounced "spy") bus is a high-speed synchronous serial data link standard that operates in full duplex mode. SPI is synchronous because the Master SPI device clocks the data for both Master and Slave. Devices communicate in Master/Slave mode where the Master device initiates the data frame. Multiple slave devices are allowed with individual slave select (chip select) lines.

 

Wiki Link: For the latest updated SPI information read Wiki about SPI at:http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

SPI General Theory of Operation

The SPI bus specifies four logic signals.

  • MOSI — Master Output, Slave Input (output from master)
  • MISO — Master Input, Slave Output (output from slave)
  • SCLK — Serial Clock (output from master)
  • SS — Slave Select (active low; output from master)

Signal Names may vary depending upon how long ago the documentation of your device was created.

SPI General Operation

The SPI bus can operate with a single master device and with one or more slave devices.

Single SPI Radion Module Connection to Microcontroller

If a single slave device is used, the SS pin may be fixed to logic low if the slave permits it. Some slaves require the falling edge (high->low transition) of the slave select to initiate an action.
In this common configuration, a microcontroller connects to the Radion OEM Module with a high speed SPI interface. In this example the microcontroller is designated as the Master and the Radion OEM Module is designated as the Slave. In this case since the Radion is the only SPI Slave, the SS-not signal may be permanently pulled low as shown. This may save using a GPIO pin from the microcontroller.

With multiple Slave devices, one of which is the Radion OEM Module, an independent SS signal is required from the master for each slave device.

The following technical article has C coding examples of how to control SPI devices including “Bit Banging” for primitive devices that do not have native SPI interfaces.  

“Coding SPI Software”

Reprint of Technical article from EDN (Electronic Design News)

or http://www.edn.com/contents/images/6505575.pdf

This article includes C Code examples for:

  • Sending and Receiving Data
  • Bit-Banging SPI Transfer Routines
  • Bits Order Inversion in a Byte
  • Example: Serial EEPROMs Read Operations
  • Example: Serial EEPROMs Write Operations
  • Programming-Status Routine

 

   
Featured Products | Product Selector | RS232 Wireless | RS232/485/422 Wireless | Data Capture Wireless |
All 802.11abg Wireless | OEM 802.11abg Modules | OEM Zigbee Modules | All OEM Wireless Modules