User's Manual Part 2

STAR protocol and ZSTAR extensions (over USB)
Wireless Sensing Triple Axis Reference design, Rev. 0.9
Freescale Semiconductor 43
Figure 5-6
Accelerometer data transfer ‘V’ (0x56)
5.4.2.1 Extended Accelerometer data transfer ‘v’ (0x76)
The ZSTAR demo has also two buttons designed on the Sensor Board. To acquire the actual state of
these buttons, the original ‘V’ command has been extended to a ‘v’ command, that provides the same
information, followed by a ‘b’ character and a binary byte containing the actual state. The least two
significant bits are used, the others are reserved. If a button is pressed, the actual bit is set to ‘1’, and if
depressed, the bit is ‘0’.
Figure 5-7
Extended Accelerometer data transfer ‘v’ (0x76)
5.4.3 Calibration data ‘K’ (0x4B)
The calibration data is the accelerometer values for specific g (acceleration) levels. The values for 0g and
1g (Earth gravity) are provided for each axis. The values are stored in the Flash memory of the Sensor
Board and are transferred to the USB stick once the air connection is established (as described in chapter
5.3.2.2 ZSTAR_CONNECT). These values are stored in the USB stick for retrieval by the PC using the
‘K’ command.
The PC sends the Calibration data ‘K’ command, the demo responds with 9 bytes in the following
sequence:
'X', Xval0, Xval1, 'Y', Yval0, Yval1, Z', Zval0, Zval1, simply an ‘X’ character followed by the 0g and 1g
X-axis calibration accelerometer binary values, and the same for Y- and Z-axis.
PC to demo
demo to PC
X-axis value
‘x’
Y-axis value
‘y’
Z-axis value
‘z’
‘V’
PC to demo
demo to PC
X-axis value
‘x’
‘v’
Y-axis value
‘y’
Z-axis value
‘z’
buttons
‘b’