Specifications
BASIC Stamp II
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 269
2
High
HIGH
pin
Make the specified pin output high (write 1s to the corresponding bits
of both DIRS and OUTS).
• Pin is a variable/constant (0–15) that specifies the I/O pin to use.
Explanation
In order for the BS2 to actively output a 1 (a +5-volt level) on one of its
pins, two conditions must be satisfied:
(1) The corresponding bit of the DIRS variable must contain a 1 in or-
der to connect the pin’s output driver.
(2) The corresponding bit of the OUTS variable must contain a 1.
High performs both of these actions with a single, fast instruction.
Demo Program
This program shows the bitwise state of the DIRS and OUTS variables
before and after the instruction High 4. You may also connect an LED
to pin P4 as shown in figure I-5 to see it light when the High instruc-
tion executes.
debug "Before: ",cr
debug bin16 ? dirs,bin16 ? outs,cr,cr
pause 1000
HIGH 4
debug "After: ",cr
debug bin16 ? dirs,bin16 ? outs
220Ω
LED
I/O pin
Figure I-5










