X-10 Home Automation Using the PIC16F877A 00236a | c Microchip AN236 X-10 Home Automation Using the PIC16F877A Author Jon Burroughs Microchip Technology Inc. INTRODUCTION X-10 is a communication protocol designed for sending signals over 120 VAC wiring. X-10 uses 120 kHz bursts timed with the power line zero-crossings to represent digital information. Plug-in modules available from various vendors enable users to create home automation systems by using the AC wiring already installed within a home. Readers who would like an overview of the X-10 signal format may refer to Appendix A. PICmicro microcontrollers can easily be used in conjunction with X-10 technology to create home automation applications. The specific PICmicro microcontroller MCU used should be selected based on RAM ROM operating frequency peripheral and cost requirements of the particular application. The PIC16F877A was selected for this application because of its versatility as a general purpose microcontroller its FLASH program memory for ease of development data EEPROM and ample I O. This application note discusses the implementation of X-10 on a PICmicro MCU to create a home controller that can both send and receive X-10 signals. The reader may implement the home controller as is or adapt the circuits and firmware to other applications. A library of X-10 functions is provided to facilitate development of other X-10 applications using PICmicro MCUs see Appendix E . Operating instructions for the home controller are included in Appendix B. HARDWARE OVERVIEW The home controller application described in this application note allows the user to program on and off times for up to sixteen devices using a 2x16 liquid crystal display and five push buttons. A built-in light sensor can be used to turn on lights at dusk and turn them off at dawn. The home controller is designed to facilitate experimentation with home automation using the PIC16F877A. In addition to the PIC16F877A the board will accept any other PICmicro MCU that shares the same pinout such as