









StickOS User's Guide
CPUStick User's Guide
Copyright © 2008-2009 CPUStick.com;
all rights reserved. Patent pending.
webmaster@cpustick.com |
With the aid of an MC13201 ZigFlea™ Wireless
Transceiver, a simple wireless embedded system, like a
remote LED dimmer, can be brought online just as easily as a local
embedded system!

It’s as easy as...
- set the 2.4GHz zigflea wireless nodeid on each MCU
- wire MCU #1 to its embedded circuit
- wire MCU #1 pin an0 to the potentiometer
- wire MCU #2 to its embedded circuit
- wire MCU #2 pin dtin0 to the LED
- connect a host computer to the USB interface on
MCU #1
- write and debug your BASIC control program, live on
MCU #1
(see below)
- use the 2.4GHz zigflea wireless transport to connect to
MCU
#2
- write and debug your BASIC control program, live on
MCU #2
(see below)
- run the program on MCU #2
- disconnect from MCU #2
- run the program on MCU #1
The entire debugging session, including the writing and running of
both MCU’s BASIC control programs, is shown below:

(see the examples in text format)
Note that all of this debugging session is occurring on the Hyper
Terminal connected to the USB interface on MCU #1!
First we write the program on MCU #1.
- Notice in line 10 that we declare a local pin variable named
“potentiometer” to read the value of the potentiometer, through
analog input pin an0, in millivolts.
- Then, in line 20, we declare a remote pin variable to control
the LED on MCU #2 (through MCU #2’s local pin variable!);
the “as remote on nodeid 2” indicates that the real variable
declaration is found on MCU #2.
- Then we simply enter an infinite loop reading the value of the
potentiometer (again, in millivolts) every 100ms, and writing it to
the LED on MCU #2.
We then save the program to flash memory on MCU #1 and configure
it to run automatically when the MCU powers up.
Then we remotely connect to MCU #2 and write its program.
- Notice in line 10 that we declare a local pin variable named
“led” to control the LED, through analog output pin dtin0, in
millivolts.
- Then we simply enter an infinite loop, waiting for our local pin
variable to be written remotely from MCU #1 every 100ms!
We then save the program to flash memory on MCU #2 and configure
it to run automatically when the MCU powers up.
Finally, we run the program on MCU #2, disconnect from
MCU
#2 by pressing <Ctrl-D>, and run the program on MCU #1.
At this point, adjusting the potentiometer on MCU #1 causes the
LED brightness on MCU #2 to be correspondingly adjusted, after a
100ms delay!!!
keywords: rich testardi microcontroller hobby
rapid prototype breadboard high-school |