User's Manual Part 2

Software Design
Wireless Sensing Triple Axis Reference design, Rev. 0.9
42 Freescale Semiconductor
5.4 STAR protocol and ZSTAR extensions (over USB)
The ZSTAR demo uses a subset of the original STAR demo protocol commands. This way, most of the
software originally developed for the RD3112 (STAR) is also usable with the ZSTAR.
The STAR demo communicates over the RS232 serial line with a simple text-based protocol. The same
protocol is used in ZSTAR for communication between the USB stick and a PC (over a virtual serial port).
The PC application sees the same interface (serial port) and the same protocol as if a STAR demo was
connected.
5.4.1 Communication handshake ‘R’ (0x52)
Initially, a handshake (commands needed to test/establish the connection between the PC and the
ZSTAR demo) is conducted. This is accomplished by the PC sending an R’ command, the ZSTAR demo
responding with ‘N’. In this way, the PC application sees that the demo is ready for communication.
Communication is reset, and any debug or system modes are disabled.
Figure 5-4
Communication handshake ‘R’ (0x52)
5.4.1.1 Extended Communication handshake ‘r’ (0x72)
To determine whether a ZSTAR or STAR demo is connected, Only the ZSTAR demo implements an
Extended Handshake Communiation command. Once the PC sends the ‘r’ command, the ZSTAR demo
responds with a ‘Z’.
Figure 5-5
Extended Communication handshake ‘r’ (0x72)
5.4.2 Accelerometer data transfer ‘V’ (0x56)
The PC sends the Values ‘V’ command, the demo responds with 6 bytes in the following sequence:
'x', X-value, 'y', Y-value, 'z', Z-value, simply an ‘x’ character followed by the actual X-axis accelerometer
binary value, then a ‘y’ followed by the actual Y-axis accelerometer binary value and a ‘z’ followed by the
actual Z-axis accelerometer binary value. Since the ZSTAR demo caches the last (over the air)
transmitted values, these values are immediately provided to the PC.
PC to demo
demo to PC
‘R’
‘N’
PC to demo
demo to PC
‘r’
‘Z’