BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333 • Page 15
BASIC Stamp II
The 32-byte RAM is arranged as follows:
Word Bits Description R/W
$0 0000 0000 0000 0000 Pin input states read-only
$1 0000 0000 0000 0000 Pin output latches read/write
$2 0000 0000 0000 0000 Pin directions read/write
$3 0000 0000 0000 0000 variable space read/write
$4 0000 0000 0000 0000 variable space read/write
$5 0000 0000 0000 0000 variable space read/write
$6 0000 0000 0000 0000 variable space read/write
$7 0000 0000 0000 0000 variable space read/write
$8 0000 0000 0000 0000 variable space read/write
$9 0000 0000 0000 0000 variable space read/write
$A 0000 0000 0000 0000 variable space read/write
$B 0000 0000 0000 0000 variable space read/write
$C 0000 0000 0000 0000 variable space read/write
$D 0000 0000 0000 0000 variable space read/write
$E 0000 0000 0000 0000 variable space read/write
$F 0000 0000 0000 0000 variable space read/write
Word $0 always reflects the read-state of all 16 I/O pins. Whether a pin
is an input or output, it’s logical state can be read in this word. Word
$0 is accessed by the following symbolic names:
INS the entire 16-bit word
INL the low byte of INS
INH the high byte of INS
INA the low nibble of INL
INB the high nibble of INL
INC the low nibble of INH
IND the high nibble of INH
IN0 the low bit of INS (corresponds to I/O pin P0)
IN15 the high bit of INS (corresponds to I/O pin P15)