Look for Microchip AN236 X-10® Home Automation Using the PIC16F877A. It includes schematics which should cover everything you need to know.