Download brisebois - thesis - draft 10
Transcript
Figure 14: USRP IO Diagram SPI, or Serial Peripheral Interface, is a standard used to communicate between electronic devices. There are five digital lines: MOSI, or master out, slave in; MISO, or master in, slave out; SCLK, the clock output by the master device; CSEL, or Chip Select; and an optional digital reset line. The master is the FX2 USB 2.0 controller chip on the USRP [22]. The RFIC is a slave. All slave chips are controlled by the master. The MOSI, MISO and SCLK lines are shared between all devices. Master selects which slave device it will output to or take input from with the CSEL lines. SPI is typically used to read and write data registers on microchips. The USRP can interface with four devices via SPI: via the TX port on side A; via RX on side A; via TX on side B; and via RX on side B. The SPI interface is controlled through GNU Radio in Python. GNU Radio includes functions for the USRP to read and write SPI registers with optional headers [21]. The RFIC chip on the RFIC daughterboard is connected to the RX SPI port. Each SPI register on the RFIC contains one byte, or eight bits, of information. To write a register on the RFIC, two header bytes are written, then up to 64 bytes of data, which would therefore set up to 64 registers. The first bit of the header is the write disable bit. It should be set to zero to write a register. The last bit is an address auto-increment disable bit. If autoincrement is disabled, one may only write or read a single register in a single pass. If autoincrement is enabled, one may write or read up to 64 registers in a single pass. The middle 14 header bits contain the number of the register one wishes to write. The next bytes, up to 64, contain the data to write to the registers. For example, if, in the header, the write disable bit is set to zero, the auto-increment bit is set to zero, and the register number is set to 0 and 64 bytes of data are sent after the header, then registers 0 through 63 on the RFIC would be set with the 24