Quote Originally Posted by mackrackit View Post
I am not all that familiar with X-10, but posting the problem code may help. Could be something as simple as forgetting
Include "modedefs.bas"
I was thinking more on the line that you probably have your PBP manual at hand. I believe its Xin and Xout show what is needed to interface.

This happens to be about the only instance where I suggest a non-PIC solution. PBP's Xin and Xout commands are quite limited. Xin requires you to either wait in a loop until you receive an entire command or to use an interrupt on ZC to check for an input during the 100mS just after ZC. It can take nearly 1/2 second to receive an entire command and this is a long time to wait in a loop. And most users find interrupts a bit daunting.

Don Kinzer, the proprietor of ZBasic has written low level interrupt-driven X-10 functions that operate in the background, buffering both inputs and outputs, that operate in much the same way as UARTs. All the user has to do is check a flag periodically to see if a command has been received and to fill the output buffer with the bits needed to send a command. You can get this in a $10 chip, the ZX-328n http://www.zbasic.net/Microcontrolle...ller/p-68.html. It is by far the easiest way to handle X-10. It does require a little more external circuitry than a PIC does.