4: BASIC Stamp Architecture – Memory Organization
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 47
the BASIC Stamp cannot change its state. A pin that is an output is set to
the state indicated by the corresponding bit of the OUTS register.
When the BASIC Stamp is powered up, or reset, all memory locations are
cleared to 0, so all pins are inputs (DIRS = %0000000000000000). Also, if
the PBASIC program sets all the I/O pins to outputs (DIRS =
%1111111111111111), then they will initially output low, since the output
latch (OUTS) is cleared to all zeros upon power-up or reset, as well.
Word Name Byte Names Nibble Names
Bit Names
Special Notes
INS
INL
INH
INA, INB
INC, IND
IN0 – IN7
IN8 – IN15
Input pins
OUTS
OUTL
OUTH
OUTA, OUTB
OUTC, OUTD
OUT0 – OUT7
OUT8 – OUT15
Output pins
DIRS
DIRL
DIRH
DIRA, DIRB
DIRC, DIRD
DIR0 – DIR7
DIR8 – DIR15
I/O pin direction control
W0
B0
B1
W1
B2
B3
W2
B4
B5
W3
B6
B7
W4
B8
B9
W5
B10
B11
W6
B12
B13
W7
B14
B15
W8
B16
B17
W9
B18
B19
W10
B20
B21
W11
B22
B23
W12
B24
B25
Note: All registers are word, byte, nibble and bit addressable
The INS variable always shows the state of the I/O pins themselves,
regardless of the direction of each I/O pin. We call this, "reading the
pins". If a pin was set to an input mode (within DIRS) and an external
Table 4.2: BS2, BS2e, BS2sx and
BS2p RAM Organization. Note:
There are 16 words, consisting of
two bytes each for a total of 32
bytes. All bits are individually
addressable through modifiers and
the bits within the upper three
words are also individually
addressable though the pre-defined
names shown.
Summary of Contents for BASIC Stamp 2e
Page 1: ...BASIC Stamp Programming Manual Version 2 0c...
Page 34: ...Quick Start Guide Page 32 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 340: ...ASCII Chart Page 338 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 342: ...Reserved Words Page 340 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 346: ...Conversion Formatters Page 344 BASIC Stamp Programming Manual 2 0b www parallaxinc com...