Specifications
BASIC Stamp II
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 343
2
and a standard modular phone-base connector (6P4C type). Connec-
tions are as follows:
PL-513
or TW-523 BS2
1 zPin*
2 GND
3 GND
4 mPin
* This pin should also be connected to
+5V through a 10k resistor.
Here are the Xout command codes and their functions:
Command *Code Function
unitOn %10010 Turn on the currently selected unit.
unitOff %11010 Turn off the currently selected unit.
unitsOff %11100 Turn off all modules w/ this house code.
lightsOn %10100 Turn on all lamp modules w/ this house code.
dim %11110 Reduce brightness of currently selected lamp.
bright %10110 Increase brightness of currently selected lamp.
*In most applications, it’s not necessary to know the code for a given X-
10 instruction. Just use the command constant (unitOn, dim, etc.)
instead. But knowing the codes leads to some interesting possibilities.
For example, XORing a unitOn command with the value %1000 turns it
into a unitOff command, and vice-versa. This makes it possible to write
the equivalent of an X-10 “toggle” instruction.
Here is an example of the Xout instruction:
zPin con 0 ' Zpin is P0.
mPin con 1 ' Mpin is P1.
houseA con 0 ' House code A = 0.
unit1 con 0 ' Unit code 1 = 0.
XOUT mPin,zPin,[houseA\unit1] ' Get unit 1's attention..
XOUT mPin,zPin,[houseA\unitOn] ' ..and tell it to turn on.
You can combine those two Xout instructions into one like so:
XOUT mPin,zPin,[houseA\unit1\2,houseA\unitOn] ' Unit 1 on.










