Zstar
Freescale ZSTAR
We have a Freescale Wireless Sensing Triple Axis Reference Design (ZSTAR). This is two boards connected by a radio. The reference design lists for about $100, we can probably get them for less.
- Freescale site for the ZSTAR
- MC9S08QG8 CPU: 8 bit, 8K flash, 512 bytes RAM
- MC13191 2.4 GHz, Low Power Transceiver
MMA7260QT 3-Axis Acceleration Sensor
- MMA7260QT 3-Axis Acceleration Sensor
- The remote uses a CR2032 Lithium Battery
- AN3109: Using the Multi-Axis g-Select Evaluation Boards discusses using development boards that are separate from the Zstar. These development boards are available for about $37 from Mouser
Using the Zstar
- Insert the CD, which will bring up a web page
- Read the
ZSTAR Reference Design Demo Quick Start
- Plug the USB Device in
- When prompted for drivers, select
Advanced
and then browse toD:\Drivers
- I had to change my port to
COM2
- To start the demo, go back to the web page that came up and click on
ZSTAR GUI
Java and the Zstar
On the CD there is D:\ZSTAR_files\Java-games
. See the README.txt file.
The game runs on a simulator of a cell phone, which requires version 2.2 of the j2me: http://java.sun.com/products/j2mewtoolkit/download-2_2.html.
The application consists of a jar file that has many images and a few classes. The classes have been obfuscated, but jad, the Java Decompiler shows that c.class
contains
{
String s1 = "comm:com" + i1
+ ";baudrate=38400;parity=none;bitsperchar=8;blocking=off;autocts=on;autorts=on";
byte byte0 = 0;
try
{
a_javax_microedition_io_CommConnection_static_fld =
(CommConnection)Connector.open(s1);
a_java_io_DataInputStream_static_fld =
a_javax_microedition_io_CommConnection_static_fld.openDataInputStream();
Programming the Zstar
Programming the Sensor Board
ZSTARRM
- Wireless Sensing Triple Axis Reference Manual says
- 3.4.3 BDM (Background Debug Mode) ConnectionsA J2 connector is a non-standard footprint primarily intended for in-factory programming and testing via “spring-needle” type of connections. The J2 connector carries all standard signals for Background Debug Mode communication so if required, one may solder wires and a standard 2x3 pins 2.54mm (100mil) pitch header for regular BDM re-programming. The pin numbering is shown on Figure 3-5
Chapter 5, "Software Design", of the ZSTARRM
- Wireless Sensing Triple Axis Reference Manual discusses the Simple Media Access Controller (SMAC). See also the Simple Media Access Controller (SMAC) User's Guide
Zstar serial protocol
Section 5.4 of ZSTARRM
- Wireless Sensing Triple Axis Reference Manual discusses the serial protocol.
- To connect via Windows, use HyperTerminal
- Start -> All Programs -> Accessories -> Communications -> HyperTerminal
- In the
New Connection
window, enter any name and then hitOK
- In the
Connect To
window, go to theConnect Using
window and select your comm port, such asCOM2
- Change the
Bits per second
to38400
- Send a
R
, get anN
back - Communication Handshake - Send a
r
, get anZ
back - Getting aZ
indicates that a Zstar is connected, not a Star. - Send a
V
, get back x,y,z dataThe PC sends the Values ‘V’ command, the demo responds with 6 bytes (or 9 bytes in 16-bit mode) 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.
* Send a @@v@@, get back x, y, z, buttons, raw temperature, raw bandgap.
* Send an @@I@@, get back info (:source:)
$Version: 1.0.41.0$
$Date: Sep-5-2006$
$Author: r30323$ - Send a
U
, turn on debugging, send au
to turn it off.
There is a model in the eecs124 CVS repository as eecs124/src/zstar/ptolemy/ZstarDisplay.xml
. This model uses Ptolemy II SerialComm actor to connect to the serial port and display the results.
- Sometimes the model has "Actor not ready to fire".
- Try rerunning the model
- Use
rV
to put the device in Zstar mode and get back 16 bit data.
eecs124/src/zstar/ptolemy/ZstarPlot.xml
will plot the data!
Multiple versions of the SerialComm actor.
The message is PortInUseException: Port owned by Ptolemy
- forum.java.sun.com article about bizarre mention, suggests virtual ports?
- Notes about port ownership
- Java Com API
Zstar problems
- The data is unchanging.
- Try rebooting.
- Unplug and plug the USB back in. It may help to wait?
- Try running the demo that comes with the model
- Take the battery out and put it back in
- Replace the battery, it is probably weak. This was our problem
- See the freescale 8bit forum
- Try selecting a different channel Using the
U
command from hyperterminal to turn on debugging.
- Try selecting a different channel Using the
Other programming resources
- AN2295 - Developer's Serial Bootloader for M68HC08 and HCS08 MCUs - Creating a boot loader
- Source code is available on the CD or via Source files for Emitter and USB boards (CodeWarrior 3.1 or 5.1)