While waiting for the Polycases to arrive, I have been working on the TW523 emulation. I had originally planned to duplicate the TW523 functionality as closely as possible, but I added a few additional capabilities. Any feedback or suggestions are will be appreciated. The XTB-II PIC now does the following:
1) It recognizes 48 cycles in the 650uS X10 reception window as a logic "1" 2) It begins decode after detecting the 4-bit 1110 start pattern. 3) It checks the next 18 bits, and rejects any message without 9 "1" bits. 4) Data is sent to the controller synchronous with the repeated word. 5) Logic "1" output is a 1.3 mS pulse starting at the zero crossing. 5) Message length is determined by the next gap or start pattern. 6) It does not need a gap to separate messages, only another start pattern.This deviates from the TW523 in two regards. It should accept extended messages, which are longer than the standard 22 bits. And it should recognize each pair of bright/dim commands. Any comments on whether this will cause problems? It is easy to back down to just accepting the standard
22-bit message, but I thought accepting extended messages would be valuable.With its tuned input network, the XTB-II is pretty good at digging the X10 signal out of the noise. I may add gated AGC to reduce sensitivity if it rejects any messages due to an incorrect balance of "1" and "0" bits.
The X10 transmitter auto tunes itself to 120KHz using 60Hz as a reference. It sends that burst out only in the X10 window following a zero crossing. Within that window, the duration of the burst is controlled by the digital input.
Jeff