It's been a few months since the previous RS500 MSP430 examples went up, so we thought it would be a good time to throw out a new one. In the previous MSP430 examples (linked below) we used the IRI-LT library to reduce code space usage. In this one, we're implementing full IRI, which provides additional functionality. Because we've already shown the detail of how IRI-LT is integrated in the MSP430 firmware, this post will be a little shorter. Refer to the previous posts for more info.
These posts show systems using the Indy RS500 UHF RFID SiP along with an MSP430 host microcontroller. All use the MSP430 USB LaunchPad evaluation kit, which showcases the MSP430F5529 microcontroller. This kit was chosen because it is low cost(only $12.99!), includes a programmer and debugger, is easy to use, and comes with a variety of useful USB firmware examples. Each post focuses on a single MSP430 firmware configuration that interacts with the RS500 in a unique way.
In the interest of brevity, a lot of the previously discussed topics will be glossed over. Check out the rest of the postings in the series here:
Bonus Post 1: RS500 With MSP430 IRI-LT Host - Non-Blocking
Bonus Post 2: RS500 With MSP430 IRI Host and USB-UART Printf
This example will showcase using a host microcontroller (the MSP430) to control the RS500, by generating IRI (not IRI-LT) traffic over its UART. This example will control the RS500, performing periodic inventories. It will produce a stream of ASCII describing startup and inventory activity, accessible via both a USB-UART COM port, and a 3.3V UART interface. The USB-UART COM port interface can be disabled to save code space, and enable compilation using the free version of CCS, which has a code size limitation.
The physical arrangement of the example is shown in the block diagram in Figure 1.
Figure 1: Example Simple Block Diagram
Example Hardware Setup
In order to exercise our example, we will have to connect the various parts such that they can communicate with each other. A block diagram of the connections is shown in Figure 2. A picture of the example hardware is shown in Figure 3. The connections are listed below.
- Both the MSP430 launchpad and RS500 dev kit should be connected to the PC via USB.
- The MSP430 will be programmed and communicate with the PC over USB, but the RS500 Dev Kit will only be powered by its USB connection.
- The Mini-Guardrail antenna (or other UHF RFID antenna) should be connected to the SMA connector J2 on the RS500 dev kit.
- The MSP430's UART pins must be connected to the RS500.
- The MSP430 UART pins are connected to J1, on pins P3.3 (RX) and P3.4 (TX), which are labeled in silkscreen on the kit.
- P3.3 should be connected to the center pin of RS500 dev kit header J14, and P3.4 should be connected to the center pin of RS500 dev kit header J16.
- These connections can be easily made using 100 mil pitch jumper wires, or mini-grabber wires.
- The jumpers for headers J14 and J16 should be set aside for this example.
- The MSP430's host UART interface should be connected, using the TXD and RXD jumpers between the MSP430 and the MSP101 Launchpad host.
Figure 2: Example Block Diagram
Figure 3: Example Hardware
Example Firmware and Software Setup
To configure the MSP430 on the USB Launchpad board, simply program the device with the firmware image attached to the page("MSP430 RS500 IRI Host with USB-UART Printf.txt" below). This image can be programmed using the standalone MSP430Flasher utility. This utility is included with the MSP-EXP430F5529LP software package in the "Binary" directory. It can be used to program the attached firmware image using the following command-line input:
MSP430Flasher.exe -n MSP430F5529 -w "MSP430 RS500 IRI Host with USB-UART Printf.txt" -v -z [VCC] -m SBW2 (-i USB) (-e ERASE_ALL)
The source for the TI Code Composer Studio(CCS) project is available on a separate download page, as it contains contents of the ITK that require agreement to a set of terms and conditions with Impinj. To start the process of getting access to the CCS project and RS500 Release Package, simply follow this link and follow the instructions there, or file a support case by emailing firstname.lastname@example.org, and asking for access to the RS500 ITK.
Upon startup, the MSP430 will immediately configure the RS500 and start performing EPC reads, as indicated by the "Status" and "Health" LEDs on the RS500 Development Kit.
To examine the results of the tag inventories, simply open the Launchpad kit's COM port. It appears in the Windows Device Manager as "MSP Application UART1". It should be configured as follows: 115,200 Baud, 8 data bits, no parity bit, 1 stop bit, no handshaking/flow control.
Once the PC is connected to the MSP430 COM port, EPC reads should appear in your terminal program as shown in Figure 5 below.
Figure 4: MSP430 COM Port in Windows Device Manager
Figure 5: Terminal COM Port Traffic
Although the hardware setup can communicate UART traffic to a host PC using the kit's Launchpad MSP101 device, the MSP430's on-board USB-UART interface is disabled in the firmware by default. This is to conserve code space, so that the firmware can be compiled even using the code-space limited free version of the CCS IDE software.
To enable the MSP430's on-board USB-UART interface, you'll need to change one #define in main.c. To enable the interface, change the line "#define USB_UART_ENABLED 0" to "#define USB_UART_ENABLED 1", and re-compile. If the build fails because of the IDE's code space limitation, you will see the following error message: "output file "MSP430 RS500 IRI Host with USB-UART Printf.out" exceeds code size limit"
If the USB-UART interface is enabled, when connecting the MSP430 device to the PC, you will need a driver file for it to work properly. This driver is included in the MSP-EXP430F5529LP software package, and is also attached to this page ("SimpleUsbBackChannel.inf" below). The device will appear as "F5529LP simpleUsbBackchannel".
Once the MSP430 is configured as a USB-UART bridge, and is connected to the RS500 Development Kit and host PC, the host PC can communicate with the RS500 via the USB-UART COM port.
The MSP430 will also print the results of the EPC reads to its USB-UART COM port, which can be observed using any terminal application. Configure your terminal application to use the correct COM port, with the correct terminal settings: 115,200 Baud, 8 data bits, no parity bit, 1 stop bit, no handshaking/flow control. To determine which COM port the MSP430 is attached to, you can look for the entry "F5529LP simpleUsbBackchannel" in the Windows Device Manager, as shown in Figure 4.
See you next time!
There are currently no future posts planned in this series, but we're open to suggestions! Please comment below with any ideas you have for cool MSP430 firmware, or other host processors you'd like to see as RS500 hosts.