27100 Parallax Inc, 27100 Datasheet - Page 21

BASIC STAMP REV DX MODULE

27100

Manufacturer Part Number
27100
Description
BASIC STAMP REV DX MODULE
Manufacturer
Parallax Inc
Type
Microcontrollerr
Datasheet

Specifications of 27100

Contents
Board
Product
Microcontroller Basic Stamps
Operating Supply Voltage
5 to 15 V
Board Size
63.5 mm x 38.1 mm x 12.7 mm
For Use With/related Products
BASIC Stamp®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
271000-51300730
Manufacturer:
DENSO
Quantity:
20 000
Part Number:
2710002
Quantity:
7
Part Number:
2710006
Quantity:
42
STAMP FAQS
How can I define an alias to an I/O pin or another variable?
How do I reference a specific bit within a byte or word variable?
How do I define a string variable?
Last Revised On: 7/21/00
In the BASIC Stamp I you could specify the following:
to designate the symbol Index as an alias to the Counter variable and the symbol LED as an alias to I/O pin 0.
Since Counter and Index use the same register, B0, anytime Counter is changed, Index will change in the same way.
The symbol LED will always contain either a 1 or a 0 depending on the logical state of I/O pin 0.
In the BASIC Stamp II, IIe or IIsx you could specify the following:
to designate the symbol Index as an alias to the Counter variable and the symbol LED as an alias to I/O pin 0.
Since Index uses the same memory space as Counter, anytime Counter is changed, Index will change in the same
way. The symbol LED will always contain either a 1 or a 0 depending on the logical state of I/O pin 0.
On the BASIC Stamp I there is only one general purpose word register, W0, and two general purpose byte
registers, B0 and B1, which are bit addressable. The predefined symbols Bit0 through Bit15 refer to the
corresponding bits within W0 as well as B0 and B1 since those two byte variables correspond to the lower and
upper bytes of W0 respectively. Thus Bit0 is the lowest bit of both W0 and B0 while Bit8 is the lowest bit of B1
(and the 9th bit of W0).
On the BASIC Stamp II, IIe and IIsx all the variables are bit addressable, as well as nibble addressable. You can
reference a specific part of a variable by specifying the variable name followed by a dot ‘.’ and then the name of the
portion you’re interested in. For example, bit 2 of a word variable called Temp can be referenced with the notation:
Temp.BIT2. Additionally, the second nibble of Temp can be referenced with: Temp.NIB1. The valid modifiers
are: BIT0 through BIT15, LOWBIT, HIGHBIT, NIB0 through NIB3, LOWNIB, HIGHNIB, BYTE0 through
BYTE3, LOWBYTE and HIGHBYTE.
A string variable is simply an array of bytes. Only the BASIC Stamp II, IIe and IIsx allows the explicit definition of
arrays. If, for example, you want to define a string variable called Text to hold 6 characters, use the following code:
The elements of an array can be accessed by specifying the array name followed by an open parenthesis, an index
value and a close parenthesis. The first element is always index 0. For example, the second element, or character
in this case, can be referenced with: Text(1) and the last element with: Text(5). Byte arrays are useful for receiving a
string of characters via the SERIN command using the STR modifier. The BASIC Stamp II, IIe and IIsx allows
you to define arrays of bits, nibbles and words as well.
SYMBOL Counter
SYMBOL Index
SYMBOL LED
Counter
Index
LED
Text VAR
BYTE(6)
VAR
VAR
VAR IN0
BYTE
Counter
= B0
= B0
= PIN0
PROGRAMMING INFORMATION
Page: 21

Related parts for 27100