Alright. I swear I tried everything. Maybe I don't understand what you are saying to do. Here is my setup:

PBP with melabs usb programer
16f876a pic w/20 mhz resonator
X-10 data pin is Portc.6 (yellow phone wire #4)
Zero crosing pin output from pl513 to pin porta.3 (black phone wire #1) I also connect a 4.7k resistor from this pin to +5v
wires 2 and 3 are tied to ground (this is the part I am not sure about)
I have two buttons as an input to tell the pic to turn unit on and off.
I have the X-10 plug set at D for the house code and 5 for the unit code.
Here is the program used:

include "MODEDEFS.BAS"
define LCD_DREG PORTB
DEFINE LCD_DBIT 0
DEFINE LCD_BITS 8
DEFINE LCD_RSREG PORTC
DEFINE LCD_RSBIT 2
DEFINE LCD_EREG PORTC
DEFINE LCD_EBIT 1
DEFINE LCD_lines 4
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
define OSC 20
define PULSIN_MAX 500
trisa = 0
trisb = 0
adcon1=7
input portc.3
input portC.4


'--------------------------------------------
CHNG VAR portc.3 ' Increment button
SETIN VAR portC.4 ' Set button


pause 2000
LCDout $fe,1
Main:
if Chng = 0 then
XOUT PORTc.6,PORTa.3,[5\5,5\uniton]
LCDOUT $FE,1,$fe,$D4,"UNIT IS ON"
endif
if setin = 0 then
xout portc.6,porta.3,[5\5,5\unitoff]
LCDOUT $FE,1,$fe,$D4,"UNIT IS OFF"
endif
goto main
end


When I push either button, the little light on the pl513 goes out for a second or two and then comes back on. I am just not sure what else to try. Thanks for the help.