28122 Parallax Inc, 28122 Datasheet - Page 129

KIT WHAT'S A MICRO:PARTS ONLY

28122

Manufacturer Part Number
28122
Description
KIT WHAT'S A MICRO:PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28122

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
You will also program the BASIC Stamp to use these values to control the servo.
Parts and Circuit
Same as Activity #1
Programming the BASIC Stamp to Receive Messages from Debug
Programming the BASIC Stamp to send messages to the Debug Terminal is done using
the
Debug Terminal is done using the
also have to declare one or more variables for the BASIC Stamp to store the information
it receives. Here is an example of a variable you can declare for the BASIC Stamp to
store a value:
Later in the program, you can use this value to store a number received by the
command:
When the BASIC Stamp receives a numeric value from the Debug Terminal, it will store
it in the
characters you are sending will be digits that form a decimal number. As soon as you hit
the carriage return, the BASIC Stamp will store the digits it received in the
variable as a decimal number, then move on.
Although it is not included in the example program, you can add a line to verify that the
message was processed by the BASIC Stamp.
Example Program: ServoControlWithDebug.bs2
Figure 4-19 shows a close-up view of the Transmit Windowpane in the Debug Terminal.
Your Transmit Windowpane may be smaller. You can click and drag the separator
between the two panes downward to make the Transmit Windowpane larger. You can
type characters into the Transmit Windowpane to send them to the BASIC Stamp. In this
example, somebody typed in 100, then hit the carriage return, then typed in 850. The
Receive Windowpane displays the “Enter number of pulses:” message sent by the BASIC
Stamp. It also displays an echo of the characters 100 that were typed into the Transmit
Windowpane.
DEBUG
pulses VAR Word
DEBUGIN DEC pulses
DEBUG CR,
pulses
command. Programming the BASIC Stamp to receive messages from the
variable. The
"You sent the value: ",
DEC
DEBUGIN
formatter tells the
command. When using this command, you
DEC pulses
DEBUGIN
command that the
DEBUGIN
pulses

Related parts for 28122