46
User Manual
Copyright ©2003 A7 Engineering, Inc.
Communicating between a PC with an eb600 and a BOE
In this exercise we will step through the process of communicating between an eb500
module inserted into a Board of Education (BOE) board and a PC that has an eb600 PC
Adapter.
To perform this exercise, as documented, you will need to have two serial ports available on
your PC, an eb600 PC Adapter, a Board of Education board, and two eb500 moduels. One
serial port will be used to connect the PC to the Board of Education serial port. The other
serial port will be used to connect to the eb600 PC Adapter. If you are using any of the other
supported Parallax boards, you may need to make adjustments to this exercise.
Step 1: Transmit Data from the PC to the BASIC Stamp
In this step we will create a BASIC Stamp application to read data from the eb500
and display the data in the BASIC Stamp Editor Debug window. We will then
download and run the application.
1.
Connect the
Board of Education board serial port
to the
PC
.
2.
Open the
BASIC Stamp Editor
.
3.
Enter the following
program code
into the editor.
‘{$STAMP BS2}
bData VAR BYTE
‘Wait for the eb500 radio to be ready
PAUSE 1000
Main:
SERIN 0,84,[STR bData\1]
DEBUG STR bData\1
GOTO
Main
The application waits for an individual byte of data to arrive and then displays the
byte in the debug window and then repeats this process.
4.
On the
File
menu, click
Save As
.
5.
In the
File name
box, enter a file name to which to save the program just created.
For example, Receive.bs2.
6.
Click
Save
.
7.
Apply
power
to the
Board of Education board
.
8.
On the
Run
menu, click
Run
.