User's Manual Part 2

Software Design
Wireless Sensing Triple Axis Reference design, Rev. 0.9
46 Freescale Semiconductor
and the reported USB stick packet level are shown, as well as command names, etc. This can be useful
in determining the communication range between the USB stick and the Sensor Board.
The debug information is no longer displayed after issuing a ‘u’ command or
Communication handshake
‘R’ (0x52)
.
Figure 5-13
Debug on ‘U’ (0x55) and Debug off ‘u’ (0x75)
5.4.6 Further debug and test commands
5.4.6.1 Forced channel number selection
In order to allow effective testing and debugging, few additional commands have been added. If, before
a connection between the USB stick and Sensor Board is established, any hexadecimal number
command (‘0’ through ‘9’ or ‘A’ through ‘F’) is sent, the connection will be established on this specific
channel number (0 to 15). Any new channel can be selected, sending the new channel number command.
The selection becomes effective during the new connection is being established.
The return to the automatic mode (where a random channel with the minimum energy is selected) can be
forced only by a complete software reset (ie. removing the USB stick from the USB slot).
5.4.6.2 Semiautomatic self-calibration
For the purpose of easier semiautomatic calibration of the ZSTAR demo, additional Calibration command
‘Q’ (0x51) has been added. This command is usually issued over terminal (e.g. HyperTerminal) software.
A user is required to place the Sensor Board into 3 specific positions, in which the Earth gravity will induce
a maximum acceleration in each of X, Y, and Z axes. Before issuing the first ‘Q’ command, the Sensor
Board must be placed flat, ie. with Z-axis aiming toward the Earth core. For the second issue of ‘Q’
calibration command, the board’s X-axis has to aim toward the Earth core. The board should ‘stay’ on its
right edge. Next, the Y-axis is calibrated, with the board ‘staying’ on its top edge. Finally, after issuing the
fourth ‘Q’ command, the calibration data are sent to the Sensor Board, actually using
ZSTAR_CALIB
command. The text help is provided during the self-calibration process.
PC to demo
demo to PC
‘U’
various debug information
‘u’
no debug info
mainly on air protocol