User Manual
Table Of Contents
- Revision History
- Table of Contents
- Chapter 1 Introduction
- Chapter 2 Wireless Sensing Triple Axis Reference design introduction
- Chapter 3 Sensor Board description
- 3.1 Board overview
- 3.2 A/D conversion of XYZ levels
- 3.3 Power management
- 3.4 ZSTAR Sensor Board hardware overview
- 3.4.1 Analog connections
- 3.4.2 g-select connections
- 3.4.3 BDM (Background Debug Mode) connections
- 3.4.4 Sensor Board schematics
- 3.4.5 Button connections
- 3.4.6 MC13191 to MC9S08QG8 microcontroller interface
- 3.4.7 MC13191 RF interface
- 3.4.8 Clocking options of MC9S08QG8
- 3.4.9 LED indicators connections
- 3.4.10 Power supply
- 3.5 Bill of Materials
- Chapter 4 USB stick board description
- Chapter 5 Software Design
- 5.1 Introduction
- 5.2 SMAC (Simple Media Access Controller)
- 5.3 ZSTAR RF protocol
- 5.4 STAR protocol and ZSTAR extensions (over USB)
- 5.5 Bootloader
- Chapter 6 Application Setup
- Appendix A References

Software Design
Wireless Sensing Triple Axis Reference design, Rev. 0.9
44 Freescale Semiconductor
Figure 5-8Calibration data ‘K’ (0x4B)
5.4.4 Calibration process ‘k’ (0x6B)
The calibration process is initiated by a ‘k’ command from the PC, followed by 6 bytes of calibration data.
These are to be stored in the Flash memory of the Sensor Board being used. More in chapter 5.3.2.5
ZSTAR_CALIB.
The calibration data is just 6 bytes in the following sequence:
Xval0, Xval1, Yval0, Yval1, Zval0, Zval1 - 0g and 1g calibration accelerometer binary values for X-, Y-
and Z-axis. No response from the demo is provided. Verification of the calibration data stored can be done
using the Calibration data ‘K’ (0x4B) command.
Figure 5-9Calibration process ‘k’ (0x6B)
5.4.4.1 Remaining STAR demo commands
The remaining STAR commands, such as 'F', 'G', 'H', '0', '1', '2', '3' and 'E' are not implemented in the
ZSTAR demo.
5.4.5 Additional ZSTAR commands
5.4.5.1 g-select reading ‘G’ (0x47)
The ZSTAR demo allows dynamic selection of the g-range for the accelerometer sensor (see details in
chapter 3.4.2 g-select connections), thus additional commands are implemented to read and change the
g-range.
When the PC issues a ‘G’ command, the ZSTAR demo responds with the g-range actually selected. A ‘0’,
‘1’, ‘2’ or ‘3’ character is returned where ‘0’ is for the 1.5g range, ‘1’ for 2.0g , ‘2’ for 4.0g and ‘3’ for the
6.0g range. If a different sensor (e.g. MMA7261Q) is implemented on the Sensor Board, the g-ranges are
2.5g, 3.3g, 6.7g and 10g respectively.
PC to demo
demo to PC
x(0g)
‘X’ ‘Y’ ‘Z’
‘K’
x(1g) y(0g) y(1g) z(0g) z(1g)
PC to demo
demo to PC
x(0g)
‘k’
x(1g) y(0g) y(1g) z(0g) z(1g)