910-90005 Parallax Inc, 910-90005 Datasheet - Page 16

KIT BASIC STAMP-PORTABLE DEVICE

910-90005

Manufacturer Part Number
910-90005
Description
KIT BASIC STAMP-PORTABLE DEVICE
Manufacturer
Parallax Inc
Series
BASIC Stamp®r
Type
Education Kitr
Datasheet

Specifications of 910-90005

Contents
Board, cable, components, manual and temperature sensor
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Outs
will be high (5 volts).
So,
and
You'll remember from the variables overview in Chapter XX that
bits), as two Bytes (8 bits), as four Nibbles (4 bits) or as 16 individual Bits. So,
Dirs register.
The advantage of going to this depth is that we can gain more flexibility and control over our programs –
especially in terms of readability (this aspect will become much more important as our programs grow). Take a
look at Listing 1c. Notice how we really don't need any comments to explain what's going on? Pretty cool, huh?
' {$STAMP BS2}
' Program: LED Blink.BS2 (Version C)
' Purpose: Blinks an LED connected to the BASIC Stamp
' ---------------------------------------------------------------
LedPin
LedCtrl
On
Off
' ---------------------------------------------------------------
Initialize:
Start:
Parallax, Inc. • BASIC Stamp HomeWork Board ver 1.1
Dir15 = 1
Out15 = 1
Dir15 = 1
Out15 = 0
LedCtrl = %1
LedPin = On
PAUSE 500
LedPin = Off
PAUSE 500
GOTO Start
HIGH 15
LOW 15
is a zero, the associated output pin will be low (0 volts). When a bit in
CON
CON
VAR
VAR
is the same as:
is the same as:
0
1
Dir15
Out15
' make LED pin an output
' LED i/o pin control
' LED on/off control
Dirs
and
Outs
Outs
can be accessed as a Word (16
Dir15
is one, the associated output pin
corresponds to bit 15 of the
Page 16

Related parts for 910-90005