28129 Parallax Inc, 28129 Datasheet - Page 21

TEXT BASIC ANALOG & DIGITAL

28129

Manufacturer Part Number
28129
Description
TEXT BASIC ANALOG & DIGITAL
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28129

Style
Book
Title
Basic Analog and Digital
Contents
Basic Analog and Digital Text
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
Likewise, I/O pin P12 functions as output with this command:
The rest of the program should be done over and over again, so this is a good place to put
a
Later in the program, the command
LOOP
The next task is to make the LED connected to pin P12 light up when the voltage at P7 is
high enough to qualify as a binary high signal. In other words, if the input value
measured at P7 is a binary-1, then the output at P12 should be set to binary-1. Although
there are several ways to accomplish this, the easiest way is to set the binary output value
of pin P12 equal to the binary input value of pin P7.
The
functioning as an input in the Debug Terminal. The
different items. When printing more than one item with a
separate each of the items with commas.
The first item displayed using the
top-left "home" position in the Debug Terminal. Note how
to separate it from the next item. The next item is a message in quotes:
pin P7 is
use quotes. The third item is
binary input value measured at pin P7.
We want the BASIC Stamp keep checking the voltage at P7 over and over again. We also
want the BASIC Stamp to automatically update the LED and the Debug Terminal with
the latest information from P7. This is accomplished by repeatedly sending the program
back to the loop we created earlier.
DO…LOOP
DEBUG
command, it returns to
INPUT 7
OUTPUT 12
DO
OUT12 = IN7
DEBUG HOME, "The state of P7 is ", BIN IN7
loop. So, at the point we want to start to repeat the code we put:
command can be used to display the signal levels received by an I/O pin
"
. Whenever you want to display a text message in the Debug Terminal,
DO
BIN IN7
and starts executing instructions all over again.
DEBUG
LOOP
, which tells the Debug Terminal to display the
command is
is entered. Each time the program gets to the
DEBUG
HOME
, and it sends the cursor to the
HOME
command below prints three
DEBUG
is followed by a comma
command, always
"The state of

Related parts for 28129