![Parallax 29158 Скачать руководство пользователя страница 10](http://html1.mh-extra.com/html/parallax/29158/29158_manual_3623808010.webp)
Parallax, Inc. • BASIC Stamp HomeWork Board ver 1.1
Page 10
Figure 9
BASIC Stamp
Windows
Editor.
Because the Windows editor supports more than one model of the BASIC Stamp, it is necessary to tell the editor
which model you are trying to program. The STAMP directive is a special command that should be included
(near the top) in a program to indicate the model of BASIC Stamp targeted. The line below is an example of the
STAMP directive (in this case, it indicates that the program is intended for a BASIC Stamp 2):
' { $STAMP BS2 }
This line should be entered into your code, usually near the top, on a line by itself. The STAMP directive is read
and acted upon by the BASIC Stamp Windows Editor any time a source code file is loaded, tokenized,
downloaded (run). In order to test communication between the BASIC Stamp and your PC, download a simple
program as shown below.
' { $STAMP BS2 }
DEBUG “Hello World!”
After you’ve typed in the program, download it using the
►
button or the Run | Run menu. If it worked, you’ll see
a blue “debug” window which displays characters sent by the BASIC Stamp to the PC for display (Figure 10).
Communication Problem? If the PC didn’t successfully
communicate with the BASIC Stamp, you would have
received an error message similar to this one.
Troubleshooting suggestions:
•
Check power supply and serial cable connection to
PC
•
Disable any communication port devices (Palm
Pilots)
•
Use CTRL-I to “identify” the BASIC Stamp. Put the
successful COM port number in the Edit |
Preferences |Editor Operation |Default COM port