28123 Parallax Inc, 28123 Datasheet - Page 35

TEXT WHAT'S A MICROCONTROLLER

28123

Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28123

Style
Book
Title
What's a Microcontroller?
Contents
Whats a Microcontroller? Text
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
Lead Free Status / RoHS Status
Not applicable / Not applicable
A command is a word you can use to tell the BASIC Stamp do a certain job. The first of
the two commands in this program is called the
This is the command that tells the BASIC Stamp to send a message to the PC using the
serial cable.
The second command is called the
This command is handy because it puts the BASIC Stamp into low power mode when it’s
done running the program. In low power mode, the BASIC Stamp waits for either the
Reset button to be pressed (and released), or for a new program to be loaded into it by the
BASIC Stamp Editor. If the Reset button on your board is pressed, the BASIC Stamp
will re-run the program you loaded into it. If a new program is loaded into it, the old one
is erased, and the new program begins to run.
Your Turn – DEBUG Formatters and Control Characters
A
sends look a certain way in the Debug Terminal.
makes the Debug Terminal display a decimal value. An example of a control character is
CR
that come after a
modify your program so that it contains more
formatters and control characters. Here’s an example of how to do it:
DEBUG
, which is used to send a carriage return to the Debug Terminal. The text or numbers
DEBUG "Hello, it's me, your BASIC Stamp!"
END
' What's a Microcontroller - FirstProgramYourTurn.bs2
' BASIC Stamp sends messages to Debug Terminal.
DEBUG CR, "What's 7 X 11?"
DEBUG CR, "The answer is: "
DEBUG DEC 7 * 11
formatter is a code-word you can use to make the message the BASIC Stamp
First, save the program under a new name by clicking File and selecting Save
As. A good new name for the file would be FirstProgramYourTurn.bs2
Modify the comments at the beginning of the program so that they read:
Add these three lines between the first
command:
CR
will appear on the line below characters that came before it. You can
END
command:
DEBUG
DEC
DEBUG
command:
is an example of a formatter that
DEBUG
commands along with some
command and the
END

Related parts for 28123