BASIC stamp manual v2.2

5: BASIC Stamp Command Reference – XOUT
BASIC Stamp Syntax and Reference Manual 2.2 www.parallax.com Page 465
XOUT
BS1 BS2 BS2e BS2sx BS2p BS2pe BS2px
XOUT Mpin, Zpin, [ House \Command { \Cycles} {, House \Command { \Cycles }} ]
Function
Send an X-10 power-line control command (through the appropriate
power-line interface).
Mpin is a variable/constant/expression (0 – 15) that specifies the I/O
pin to output X-10 signals (modulation) to the power-line interface
device. This pin will be set to output mode.
Zpin is a variable/constant/expression (0 – 15) that specifies the I/O
pin that inputs the zero-crossing signal from the power-line
interface device. This pin will be set to input mode.
House is a variable/constant/expression (0 – 15) that specifies the X-
10 house code (values 0 - 15 representing letters A through P).
Command is a variable/constant/expression (0 – 31) that specifies the
command to send. Values 0 – 15 correspond to unit codes 1 – 16.
Other commands are shown in Table 5.125.
Cycles is an optional variable/constant/expression (1 – 255)
specifying the number of times to transmit a given key or command.
If no Cycles argument is used, XOUT defaults to two. The Cycles
argument should be used only with the DIM and BRIGHT
command codes
Quick Facts
Table 5.124: XOUT Quick Facts.
All BS2 Models
Compatible
Power-line
Interfaces
PL-513 and TW-523
Special Notes
The XOUT command will stop the BASIC Stamp program until it is able
to send the transmission. If there is no AC power to the power-line
interface, the BASIC Stamp program will halt forever.
Explanation
XOUT lets you control appliances via signals sent through household AC
wiring to X-10 modules. The appliances plugged into these modules can
be switched on or off; lights may also be dimmed. Each module is
All
2