Build an X-10 test transmitter
One of the built-in commands in the Basic Stamp language, XOUT, supports X-10 physical layer output to a TW523 interface. The command synchronizes with the Zero Crossing signal input on one pin, and drives the Transmit to Power Line signal on a second pin. The following program drives a sequence of P1 On and P1 Off commands onto the power line, somewhat similar to the constant stream of P1 On commands output by the X-10 Pro XPTT.
We investigated writing software to read and report X-10 commands with the Basic Stamp, but ultimately the device is too slow. The SHIFTIN command looked promising for a time, offering the capability to clock in data from a serial line, but because the Basic Stamp can only generate the clock pulse for SHIFTIN and not accept a clock from the external device, it’s not usable with the TW523. So you’ll understand our approach, the following program was intended to test X-10 input using direct pin I/O, but it does not work because it can’t cycle fast enough to read the pins at the 120 Hz half-cycle rate. If you rewrote it in Java, the Javelin Stamp is likely to be fast enough.