| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
X-10® Home Automation Using PIC16F877A Author: Burroughs Microchi
Top Searches for this datasheetAN236 X-10® Home Automation Using PIC16F877A Author: Burroughs Microchip Technology Inc. HARDWARE OVERVIEW home controller application described this application note allows user program times sixteen devices, using liquid crystal display five push buttons. built-in light sensor used turn lights dusk, turn them dawn. home controller designed facilitate experimentation with home automation using PIC16F877A. addition PIC16F877A, board will accept other PICmicro that shares same pinout, such PIC18F452. Therefore, experimenters expand application using higher performance PIC18 family parts without changing hardware. With care, engineers home control enthusiasts experiment with home automation using MPLAB® MPLAB® development tools in-circuit emulator. However, proper circuit isolation precautions must taken avoid damage your computer development tools. Figure warning note! WARNING: ground application circuit tied neutral VAC. safely connect your development tools computer home controller, must power through isolation transformer leave wall ground (the green wire most cases) disconnected. test instruments (such oscilloscope) that hook application circuit, should powered through isolation transformer well, with wall ground disconnected. addition, entire circuit should enclosed within suitable case prevent unintentional contact with mains voltage! INTRODUCTION X-10 communication protocol designed sending signals over wiring. X-10 uses bursts timed with power line zero-crossings represent digital information. Plug-in modules available from various vendors enable users create home automation systems using wiring already installed within home. Readers would like overview X-10 signal format refer Appendix PICmicro® microcontrollers easily used conjunction with X-10 technology create home automation applications. specific PICmicro microcontroller (MCU) used should selected based RAM, ROM, operating frequency, peripheral, cost requirements particular application. PIC16F877A selected this application because versatility general purpose microcontroller, FLASH program memory (for ease development), data EEPROM, ample I/O. This application note discusses implementation X-10 PICmicro create home controller that both send receive X-10 signals. reader implement home controller adapt circuits firmware other applications. library X-10 functions provided facilitate development other X-10 applications using PICmicro MCUs (see Appendix Operating instructions home controller included Appendix FIGURE TEST SETUP WHEN USING DEVELOPMENT TOOLS X-10 Board X-10 Lamp Module Oscilloscope X-10 Lamp Module X-10 modules test instruments should plugged into isolation transformer. maintain isolation, leave ground disconnected. Isolation Transformer Computer, development tools, isolation transformer should plugged into wall outlet. 2002 Microchip Technology Inc. DS00236A-page AN236 HARDWARE DESCRIPTION overview home controller application hardware shown Figure hardware functionality X-10 circuitry divided into four functional blocks: Zero-crossing detector carrier detector signal generator Transformerless power supply There several application functions that directly associated with X-10 interface. User interface functions accomplished with display five push buttons. real-time clock created using Timer1 external oscillator. User modified control data, such unit times, stored PICmicro MCU's built-in EEPROM. light sensor load switch also used this application. FIGURE APPLICATION BLOCK DIAGRAM X-10 FUNCTIONS Zero-crossing Detector APPLICATION SPECIFIC FUNCTIONS Light Sensor Load Switch Carrier Detector Real-time Clock Control Data Storage Carrier Generator USER INTERFACE TRANSFORMERLESS POWER SUPPLY Switches DS00236A-page 2002 Microchip Technology Inc. AN236 summary resource seen Table Details functional sections discussed below. TABLE SUMMARY MICROCONTROLLER RESOURCE Function Zero-crossing Detect Modulation Triac Dimmer Timing Real-time Clock Envelope Timing Light Sensor Press Inputs Reserved Data pins Control pins Non-volatile Control Data Storage Description Generates interrupt every zero-crossing. TRISC used enable/disable output. Main oscillator 7.680 MHz. Generates dimmer timing increments controlling Triac. Used time keeping clock scan clock. interrupt/25 interrupts/1 sec. Times duration bursts onset second third phase bursts. Used detect dawn dusk. Five push buttons used menu navigation. Isolation precautions required. warning note! data lines LCD. control lines LCD. Stores times other user programmable information. Resource External interrupt CCP1/Timer2 mode Timer2 interrupt through postscaler Timer1 interrupt Timer0 interrupt PORTB<1:5> PORTB<6:7> PORTD<0:7> PORTE<0:2> DATA EEPROM Zero-Crossing Detector X-10, information timed with zero-crossings power. zero-crossing detector easily created using external interrupt just external component, resistor, limit current into PICmicro (see Figure United States, Vrms VAC, peak line voltage 165V. select resistor Ipeak 165V/5 which well within current capacity PICmicro pin. Input protection diodes (designed into PICmicro pins) clamp voltage higher than lower than VSS. Therefore, when voltage negative half cycle, will clamped 0.6V. This will interpreted logic zero. When voltage rises above input threshold, logical value will become `1'. this application, configured external interrupts, input buffer Schmitt trigger. This makes input threshold rising edge falling edge. Upon each interrupt, Interrupt Edge Select within OPTION_REG register toggled, that interrupt occurs every zero-crossing. Using following equation, possible calculate when state will change relative zero-crossing: Vpk*sin(2**f*t), where 165V rising edge, will high about after zero-crossing, falling edge, will about before zero-crossing. More information interfacing PICmicro MCUs power lines found application note AN521, "Interfacing Power Lines", which available download from Microchip site. FIGURE ZERO-CROSSING DETECTOR PIC16F87XA RB0/INT 2002 Microchip Technology Inc. DS00236A-page AN236 Carrier Detector receive X-10 signals, necessary detect presence signal power line. This accomplished with decoupling capacitor, high-pass filter, tuned amplifier, envelope detector. components carrier detector illustrated Figure Because impedance capacitor 1/(2**f*C), capacitor presents impedance (13) carrier frequency, high impedance (26.5 power line frequency. This high-pass filter allows signal safely coupled power line, doubles coupling stage carrier generator described next section. Since carrier frequency much higher than power line frequency, straightforward design filter that will pass signal completely attenuate high-pass filter forms first stage High-Pass Filter Tuned Amplifier Block, shown sheet schematics Appendix simple high-pass filter, breakpoint 1/(2**R*C). 1/(2**150 kHz. This point assures that signal completely attenuated, while signal passed through amplifier stages. Next, signal amplified using series inverters configured high gain amplifiers. first stages tuned amplifiers with peak response kHz. next stages provide additional amplification. amplified signal passed through envelope detector, formed with diode, capacitor, resistor. envelope detector output buffered through inverter presented input (RC3) PIC16F877A. Upon each zero-crossing interrupt, simply checked within transmission envelope whether carrier present. presence absence carrier represents stream `1's `0's that form X-10 messages described Appendix FIGURE CARRIER DETECTOR Decoupling Capacitor Rated High-Pass Filter Tuned Amplifier(1) Envelope Detector PIC16F87XA Note schematic Appendix DS00236A-page 2002 Microchip Technology Inc. AN236 Carrier Generator X-10 uses modulation transmit information over power lines. possible generate carrier with external oscillator circuit. single would used enable disable oscillator circuit output. However, external oscillator circuit avoided using PICmicro MCU's modules. CCP1 module used mode produce square-wave with duty cycle 50%. Because X-10 specifies carrier frequency (+/- kHz), system oscillator chosen 7.680 MHz, order generate precisely kHz. Calculations setting period duty cycle shown code listing comments function InitPWM. After initialization, CCP1 continuously enabled, TRISC used gate output. When TRISC set, input signal presented pin. When TRISC clear, becomes output signal coupled power line through transistor amplifier capacitor, depicted Figure Since impedance capacitor 1/(2**f*C), capacitor presents impedance carrier frequency, high impedance power line frequency. This high-pass filter allows signal safely coupled power line, doubles first stage carrier detector, described previous section. compatible with other X-10 receivers, maximum delay from zero-crossing beginning X-10 envelope should about Since zero-crossing detector maximum delay approximately firmware must take less than after detection zero-crossing begin transmission envelope. Transformerless Power Supply PIC16F877A other board circuits require supply. this application, X-10 controller must also transmit receive data over line. Since X-10 components intended plugged into wall outlet have small form factor, transformerless power supply used. characteristics transformerless supplies that should kept mind limited current capacity, lack isolation from mains (see warning note)! WARNING: This circuit isolated from VAC. with caution when constructing using such circuit, ensure that contained within suitable insulated enclosure. Follow isolation precautions avoid personal injury damage test equipment development tools. Figure illustrates transformerless power supply used this application. protect circuit from spikes power line, 130V (voltage dependent resistor) connected between Line Neutral. Positive Temperature Coefficient (PTC) device acts resettable fuse, which limits current between Ground Neutral. resistor limits current into circuit, resistor provides discharge path voltage left capacitor when circuit unplugged from wall. diodes rectify voltage across 1000 capacitor 5.1V Zener diode produce supply. reader wish refer technical brief TB008, "Transformerless Power Supply", available download from Microchip site, additional information transformerless power supply design. FIGURE CARRIER GENERATOR High-Pass Filter Rated PIC16F87XA 7.680 OSC2 OSC1 RC3/CCP 2002 Microchip Technology Inc. DS00236A-page AN236 FIGURE TRANSFORMERLESS POWER SUPPLY 2.25 1.1M 1N4005 2.25 1N4005 1000 5.1V Zener Load Switch load switch included home controller that lamp module, with house unit address. Triac selected load switch, because medium power switching capacity rapid switching capability make well-suited lamp control dimming. Triac inexpensive, three-terminal device that basically acts high speed, bi-directional switch. terminals, MT2, wired series with load. small trigger current between gate allow conduction occur between MT2. Current continues flow after gate current removed, long load current exceeds latching value. Because this, Triac will automatically switch near each zero-crossing voltage falls below latching voltage. Teccor® L4008L6 Triac selected because sensitive gate that directly controlled from logic level output PICmicro pin. sensitive gate Triac control current both directions through device, even though PICmicro provide only positive voltages gate. variable dimmer created including delay between time each zero-crossing time that trigger current provided Triac from PICmicro MCU. design control lamp dimmer using PICmicro discussed detail PICREF-4 Reference Design, "PICDIM Lamp Dimmer PIC12C508". FIGURE LOAD SWITCH/DIMMER (TRIAC) Return PIC16F87XA L4008L6 1N4148 Gate DS00236A-page 2002 Microchip Technology Inc. AN236 Module 2-line 16-character display uses HD44780U Display Controller. Eight data lines three control lines used interface PICmicro MCU. fewer pins available, operated Nibble mode using only four data lines, with some additional software overhead. basic library included this application, which provides necessary functions controlling this type LCD. development tool, without taking first isolating entire application from wall power (see previous warning notes)! Control Data Storage Certain control data that programmable user must stored non-volatile memory. PICmicro MCU's built-in EEPROM well-suited this task. EEPROM memory space most efficiently avoiding wasted bits), on/off times light sensor control flags stored using format shown Figure Figure shows location on/off times other information within data EEPROM. Using this data organization, only bytes EEPROM required store on/off times light sensor control flags units. Real-Time Clock real-time clock implemented using Timer1. real-time clock keeps track present time using routine called UpdateClock. also determines rate that buttons read routine called ScanKeys. Timer1 cause interrupt each time overflows. adding specific offset Timer1 each time overflows, time before next overflow precisely controlled. button reading routine, ScanKeys, called each time Timer1 interrupt occurs. Since ScanKeys performs debouncing button presses, suitable rate check buttons once every With crystal, counter increments once every 31.25 when prescaler 1:1. order Timer1 generate interrupt once every TMR1H:TMR1L pre-loaded with 0xFCE0h. Timer1 interrupt interval, tick, seen following equation: (FFFFh FCE0h)*1/32 .025 tick Each time ScanKeys called (every ms), calls UpdateClock. UpdateClock keeps track time unit variables: ticks, seconds, minutes, hours. Since every equals tick, seconds incremented every ticks. Minutes hours incremented similar fashion. FIGURE EEHours ON/OFF TIME STORAGE bits Hour bits OnMin bits AM/PM Hour Control Dusk AM/PM Hour Control Dawn bits Hour EEOnMinutes EEOffMinutes FIGURE Address 0x001 0x002 0x010 0x011 0x012 EEPROM DATA Unit System System Unit Unit Unit Data House Address Unit Address OnHour OnHour OnHour OffHour OffHour OffHour 0x020 0x021 0x022 Unit Unit Unit OnMin OnMin OnMin Push Buttons Five push buttons, connected RB1-RB5, used user interaction with application. Each normally open push button will pull port when pressed. 0x030 0x031 0x032 Unit Unit Unit OffMin OffMin OffMin Light Sensor detect ambient light level, photoresistor used conjunction with resistor create voltage divider. voltage divider varies with intensity ambient light connected analog channel (AN0) microcontroller. Each time that minutes incremented within UpdateClock routine, flag that enables routine called CheckOnOffTimes called from main loop. CheckOnOffTimes compares present time with unit times stored EEPROM memory. there match, then flag either turn unit off, sending appropriate X-10 command when routine ControlX10Units called. In-Circuit Debugger have been reserved In-Circuit Serial Programming(ICSPTM) in-circuit debugger (ICD). However, connect other 2002 Microchip Technology Inc. DS00236A-page AN236 APPLICATION FIRMWARE OVERVIEW firmware divided into several different files facilitate adaptation code other applications. Following summary files associated with this application note: Defines X-10 functions. Defines X-10 constants macros. x10hc.asm Main application code home controller. x10demo.asm Example code that shows X-10 library macros. lcd.asm Defines routines necessary driving LCD. p16f877A.lkr Standard linker file PIC16F877A parts. p16f877A.inc Standard include file PIC16F877A parts. Detailed descriptions operation found comments within code listing. X-10 library functions macros described next section. x10lib.asm x10lib.inc X-10 LIBRARY simple library commands developed used home controller. used with little modification user's application. library consists files: x10lib.asm x10lib.inc. library, user need only understand function macros defined x10lib.inc. macros greatly simplify library eliminating need user understand every X-10 function x10lib.asm. Examples macros used included file x10demo.asm. macros explained below: InitX10 This macro used initialize peripherals that provide X-10 functionality. must called application program before below macros will work. used follows: InitX10 SkipIfTxReady Before sending X-10 message, necessary make sure that another message already being sent, which signified X10TxFlag being set. This macro simply checks that flag skips next instruction okay begin transmission. Otherwise, there chance that transmission will interrupt ongoing transmission. used follows: SkipIfTxDone GOTO ;loop until ready ;transmit next message SendX10Address (House, Unit) This macro used send X-10 address particular unit. requires arguments, house address unit address. definitions house unit addresses defined x10lib.inc. this macro send address unit house simply types: SendX10Address HouseP, Unit16 SendX10AddressVar This macro used send X-10 address, defined variables rather than constants. send address contained user variables MyHouse MyUnit, following sequence would applied: MOVF MyHouse, ;contains value ;from 0-16 ;contains value ;from 0-16 MOVWF TxHouse MOVF MyUnit, MOVWF TxUnit SendX10AddressVar DS00236A-page 2002 Microchip Technology Inc. AN236 SendX10Command (House, Function) This macro used send X-10 command. requires arguments, house address function code. definitions house addresses function codes defined x10lib.inc. this macro send command `All Lights units house types: SendX10Command HouseA, AllLightsOn SendX10CommandVar This macro used send X-10 command, defined variable rather than constant. this macro send command stored user variable MyCommand units MyHouse, types: MOVF MyHouse, ;contains value ;from 0-16 SkipIfAddressRcvd necessary make sure that address received using this macro, which checks RxCommandFlag clear. used follows: SkipIfAddressRcvd GOTO ;loop until address ;received SkipIfCommandRcvd necessary make sure that command received using this macro, which checks RxCommandFlag set. used follows: SkipIfCommandRcvd GOTO ;loop until command ;received MOVWF TxHouse MOVF MyCommand, ;any X-10 ;function ;defined ;x10lib.inc ReadX10Message This macro called read received X-10 message, which either address command. message address, then received house unit codes will stored variables RxHouse RxUnit, respectively. message command, then received house address function code will stored variables RxHouse RxFunction. simply called follows: ReadX10Message Please refer example code x10demo.asm each these macros used simple application. MOVWF TxFunction SendX10CommandVar SkipIfRxDone Before reading X-10 message, necessary make sure that complete message been received. This signified X10RxFlag being set. This macro simply checks that flag skips next instruction X-10 message been received. used follows: SkipIfRxDone GOTO ;loop until message ;received 2002 Microchip Technology Inc. DS00236A-page AN236 Memory Usage Memory usage X-10 portion application summarized Table TABLE SUMMARY MEMORY USAGE X-10 FUNCTIONALITY Memory Type Used words bytes bytes controller Available PIC16F877A 8453 words bytes bytes Percent Used FLASH Program Memory Data Memory (RAM) EEPROM Data Memory Memory usage entire home application summarized Table TABLE SUMMARY MEMORY USAGE HOME CONTROLLER Memory Type Used 3762 words bytes bytes Available PIC16F877A 8453 words bytes bytes Percent Used 44.5% 45.6% FLASH Program Memory Data Memory (RAM) EEPROM Data Memory DS00236A-page 2002 Microchip Technology Inc. AN236 CONCLUSION PICmicro well-suited X-10 applications. With plethora on-chip peripherals external components, PICmicro used implement X-10 system that transmit receive messages over power line wiring. small code size X-10 library leaves ample space user create application specific code. PICmicro MCUs, such PIC16F877A, have plenty additional resources creating more complex X-10 applications, while smaller PICmicro MCUs selected economical simpler X-10 applications. USEFUL REFERENCES This site describes build appliance module that utilizes PIC16C52 PIC16F84. Parts this project's receiver circuit, designed Phil Plunkett, were adapted home controller application. http://www.microchip.com Microchip site features data sheets, product information, more. Helpful technical documentation available here include: AN521 "Interfacing Power Lines" TB008 "Transformerless Power Supply" PICREF-4 "PICDIM Lamp Dimmer PIC12C508" http://www.x10.com/support Wireless Technology, Inc.web site features technical information FAQs pertaining X-10 communication protocol. 2002 Microchip Technology Inc. DS00236A-page AN236 APPENDIX DOES X-10 PROTOCOL WORK? X-10 transmissions synchronized with zero-crossings power line. monitoring zero-crossings, X-10 devices know when transmit receive X-10 information. binary represented long burst kHz, near zero-crossing point binary zero represented lack burst. FIGURE A-1: X-10 TRANSMISSION TIMING 2.778 5.556 8.333 Note These carrier bursts timed coincide with zero-crossing other phases, when implemented. complete X-10 message composed start code (1110), followed house code, followed code. code either unit address function code, depending whether message address command. Table Table show possible values house codes. DS00236A-page 2002 Microchip Technology Inc. AN236 TABLE A-1: House Addresses HOUSE CODES House Codes When transmitting codes Table Table A-2, zero-crossings used transmit each complementary pairs (i.e., zero represented 0-1, represented 1-0). example, order send house code four-bit code Table 0110, code transmitted complimentary pairs 01101001. Since house codes sent using complimentary format, start code only place where pattern 1110 will appear X-10 data stream. code, which 5-bits long Table A-2, takes bits represent complimentary format. Because last code always zero unit address function code, last code treated suffix that denotes whether code unit address function code. complete block data consists start code, house code, code suffix. Each data block sent twice, with power line cycles, zero-crossings, between each pair data blocks. example, turn X-10 module assigned house code unit following data stream would sent power line, zero-crossing. First, send address twice: 1110 START 1110 START 01101001 HOUSE 01101001 HOUSE 10101001 UNIT 10101001 UNIT Suffix Suffix TABLE A-2: CODES Codes Unit Addresses Units Units Bright Lights Extended Code Hail Request Hail Acknowledge Pre-set Extended Code (Analog) Status Status Status Request Next, wait three cycles (six zero-crossings): 000000 Then, send command twice: 1110 START 1110 START 01101001 HOUSE 01101001 HOUSE 01011001 01011001 Suffix Suffix Lastly, wait three cycles (six zero-crossings) before sending next block: 000000 Function Codes There exceptions this format. example, bright codes require 3-cycle wait between consecutive commands consecutive bright commands. complete discussion X-10 messages, please refer Wireless Technology, Inc. site (see "USEFUL REFERENCES" section). 2002 Microchip Technology Inc. DS00236A-page AN236 APPENDIX HOME CONTROLLER OPERATING INSTRUCTIONS FIGURE B-2: SELECT FUNCTION SCREENS Select Function System Addr menu down enter exit Welcome Screen home controller user interface consists five buttons LCD. Upon power-up, Welcome screen displayed. This screen displays welcome message time. Immediately, seconds begin incrementing PICmicro begins keeping track time. Figure shows Welcome screen location functionality each button. Depending screen viewed, each five buttons performs different function. When Welcome screen displayed, buttons enable access following functions: Press menu enter Select Function screen. Press brighten lamp that plugged into home controller. Press down lamp. Press enter turn lamp Press exit turn lamp off. Select Function System Time menu down enter exit Select Function Program Unit menu down enter exit Select Function Light Sensor menu down enter exit System Time Screen System Time screen time. SETTING SYSTEM TIME Starting from Welcome screen, press menu until System Time screen displayed press enter. Press up/down hours. Press enter when correct hour, including been selected. Repeat this process minutes. time correct, select (the default) using up/down buttons press enter. This returns Welcome screen with time displayed. time correct, select press enter. This will return user step correct time entered. Press exit time return user Welcome screen without saving time. FIGURE B-1: WELCOME SCREEN Welcome Home 12:00:00 menu down enter exit Select Function Screen When viewing Welcome screen, menu button enables access Select Function screen. Each successive press menu button cycles through four main functions user interface: setting system time, setting system address, setting light sensor, programming unit times, illustrated Figure B-2. FIGURE B-3: SYSTEM TIME SCREENS System Time 12:00 menu down enter exit System Time 12:00 menu down enter exit System Time 12:00 Okay? menu down enter exit DS00236A-page 2002 Microchip Technology Inc. AN236 Select System Address Screen System Address screen house address unit address home controller. Light Sensor Screen Light Sensor screen select whether units turn dusk, dawn. SETTING HOUSE/UNIT ADDRESS From Welcome screen, press menu until System Addr screen displayed press enter. Press down house address letter from Press enter when house address been selected. Repeat steps unit address number from 16). house unit addresses correct, select (the default) using up/down buttons press enter. This returns Welcome screen with address stored non-volatile memory. address correct, select press enter. This will return user step Press exit time return user Welcome screen without saving address. SETTING LIGHT SENSOR From Welcome screen, press menu until Light Sensor screen displayed press enter. Press down select desired unit. house address will already system house address. Press enter when desired unit address been selected. Press down select whether unit should turn dusk, press enter. Repeat this process other units desired. Press exit return Welcome screen. Pressing exit while Dusk" "Off Dawn" prompt displayed will return user Welcome screen without modifying that parameter. FIGURE B-5: LIGHT SENSOR SCREENS FIGURE B-4: SYSTEM ADDRESS SCREENS Light Sensor A-01 Unit menu down enter exit System Addr A-01 House menu down enter exit System Addr A-01 Unit menu down enter exit Light Sensor Dusk? menu down enter exit System Addr A-01 Okay? menu down enter exit Light Sensor Dawn? menu down enter exit 2002 Microchip Technology Inc. DS00236A-page AN236 Program Unit Screen Program Unit screen program times different units. FIGURE B-6: PROGRAM UNIT `ON' TIME SCREENS Program Unit A-01 Unit menu down enter exit PROGRAMMING UNIT TIMES From Welcome screen, press menu repeatedly until Program Unit screen displayed press enter. Press down select desired unit. house address will already system house address. Press enter when unit address been selected. Press down `on' time hours. Hours `00' means that unit will turned time. Press enter when correct hour, including been selected. Repeat this process `on' time minutes. hour been `00', then minutes will `00' automatically. time correct, select (the default) using up/down buttons press enter. user will prompted program `off' time similar fashion. time correct, select press enter. This allows user re-enter hour minutes returning step Repeat this process `on' `off' time other units desired. Press exit return Welcome screen. Pressing exit while "Set Hours" "Set Min" prompt displayed will return user Welcome screen without modifying parameters. Program On-Time 00:00AM menu down enter exit Program On-Time 00:00AM menu down enter exit Program On-Time 00:00AM Okay? menu down enter exit Program Off-Time 00:00AM menu down enter exit Program Off-Time 00:00AM menu down enter exit Program Off-Time 00:00AM Okay? menu down enter exit DS00236A-page 2002 Microchip Technology Inc. AN236 APPENDIX FIGURE C-1: X-10 SCHEMATICS SHEET MENU ZEROX ENTER DOWN TRIAC 2002 Microchip Technology Inc. MCLR EXIT XOUT DS00236A-page AN236 FIGURE C-2: SHEET EXIT DOWN ENTER LCD1 MENU DS00236A-page 2002 Microchip Technology Inc. AN236 FIGURE C-3: SHEET TRIAC 2002 Microchip Technology Inc. XIOCIRCUITS DS00236A-page AN236 FIGURE C-4: SHEET ZEROX XIOCIRCUITS CARRIERDATA XOUT DS00236A-page 2002 Microchip Technology Inc. AN236 FIGURE C-5: SHEET 2002 Microchip Technology Inc. CARRIERDATA DS00236A-page AN236 APPENDIX Count PARTS LIST Reference Value 6.8V 1N4005 1N4148 5.1V 2N2222 Power Power CD4069 2.25 250V 1000 7.680 CG161 LTL-94PEKTA PIC16F877A Resettable PTC's Description Zener Diode Diode Diode Zener Diode Transistor Connector Connector Inverters Capacitor Capacitor Capacitor Capacitor Capacitor Capacitor Capacitor Capacitor Capacitor Capacitor Capacitor Capacitor Crystal Crystal Axial Lead Inductor HD44780-based 2x16 Liquid Crystal Display LEDs Microcontroller Potentiometer Cell Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Push Button Switches Test Points Sensitive Gate Triac Varistor (Voltage Dependent Resistor) C10, C11, C14, C21, C25, C23, C18, LCD1 PTC1 PTC2 R15, VDR1 TIC206D 130V DS00236A-page 2002 Microchip Technology Inc. AN236 APPENDIX SOURCE CODE size considerations, complete source code this application note included text. complete version source code, with required support files, available download archive from Microchip site, www.microchip.com 2002 Microchip Technology Inc. DS00236A-page AN236 NOTES: DS00236A-page 2002 Microchip Technology Inc. Note following details code protection feature PICmicro® MCUs. PICmicro family meets specifications contained Microchip Data Sheet. Microchip believes that family PICmicro microcontrollers most secure products kind market today, when used intended manner under normal conditions. There dishonest possibly illegal methods used breach code protection feature. these methods, knowledge, require using PICmicro microcontroller manner outside operating specifications contained data sheet. person doing engaged theft intellectual property. Microchip willing work with customer concerned about integrity their code. Neither Microchip other semiconductor manufacturer guarantee security their code. Code protection does mean that guaranteeing product "unbreakable". Code protection constantly evolving. Microchip committed continuously improving code protection features product. have further questions about this matter, please contact local sales office nearest you. Information contained this publication regarding device applications like intended through suggestion only superseded updates. your responsibility ensure that your application meets with your specifications. representation warranty given liability assumed Microchip Technology Incorporated with respect accuracy such information, infringement patents other intellectual property rights arising from such otherwise. Microchip's products critical components life support systems authorized except with express written approval Microchip. licenses conveyed, implicitly otherwise, under intellectual property rights. Trademarks Microchip name logo, Microchip logo, KEELOQ, MPLAB, PIC, PICmicro, PICSTART MATE registered trademarks Microchip Technology Incorporated U.S.A. other countries. FilterLab, microID, MXDEV, MXLAB, PICMASTER, SEEVAL Embedded Control Solutions Company registered trademarks Microchip Technology Incorporated U.S.A. dsPIC, dsPICDEM.net, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, microPort, Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM, PICC, PICDEM, PICDEM.net, rfPIC, Select Mode Total Endurance trademarks Microchip Technology Incorporated U.S.A. other countries. Serialized Quick Turn Programming (SQTP) service mark Microchip Technology Incorporated U.S.A. other trademarks mentioned herein property their respective companies. 2002, Microchip Technology Incorporated, Printed U.S.A., Rights Reserved. Printed recycled paper. Microchip received QS-9000 quality system certification worldwide headquarters, design wafer fabrication facilities Chandler Tempe, Arizona July 1999 Mountain View, California March 2002. Company's quality system processes procedures QS-9000 compliant PICmicro® 8-bit MCUs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, non-volatile memory analog products. addition, Microchip's quality system design manufacture development systems 9001 certified. 2002 Microchip Technology Inc. DS00236A page WORLDWIDE SALES SERVICE AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: 480-792-7627 Address: http://www.microchip.com ASIA/PACIFIC Australia Microchip Technology Australia Suite Rawson Street Epping 2121, Australia Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 Japan Microchip Technology Japan K.K. Benex 3-18-20, Shinyokohama Kohoku-Ku, Yokohama-shi Kanagawa, 222-0033, Japan Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Rocky Mountain 2355 West Chandler Blvd. Chandler, 85224-6199 Tel: 480-792-7966 Fax: 480-792-4338 China Beijing Microchip Technology Consulting (Shanghai) Co., Ltd., Beijing Liaison Office Unit Bldg. Chaoyangmen Beidajie Beijing, 100027, China Tel: 86-10-85282100 Fax: 86-10-85282104 Korea Microchip Technology Korea 168-1, Youngbo Bldg. Floor Samsung-Dong, Kangnam-Ku Seoul, Korea 135-882 Tel: 82-2-554-7200 Fax: 82-2-558-5934 Atlanta Sugar Mill Road, Suite 200B Atlanta, 30350 Tel: 770-640-0034 Fax: 770-640-0307 Singapore Microchip Technology Singapore Ltd. Middle Road #07-02 Prime Centre Singapore, 188980 Tel: 65-6334-8870 Fax: 65-6334-8850 Boston Drive, Suite Westford, 01886 Tel: 978-692-3848 Fax: 978-692-3821 China Chengdu Microchip Technology Consulting (Shanghai) Co., Ltd., Chengdu Liaison Office 2401, 24th Floor, Ming Xing Financial Tower TIDU Street Chengdu 610016, China Tel: 86-28-86766200 Fax: 86-28-86766599 Taiwan Microchip Technology (Barbados) Inc., Taiwan Branch 11F-3, Tung North Road Taipei, 105, Taiwan Tel: 886-2-2717-7175 Fax: 886-2-2545-0139 Chicago Pierce Road, Suite Itasca, 60143 Tel: 630-285-0071 Fax: 630-285-0075 China Fuzhou Microchip Technology Consulting (Shanghai) Co., Ltd., Fuzhou Liaison Office Unit 28F, World Trade Plaza Wusi Road Fuzhou 350001, China Tel: 86-591-7503506 Fax: 86-591-7503521 Dallas 4570 Westgrove Drive, Suite Addison, 75001 Tel: 972-818-7423 Fax: 972-818-2924 EUROPE Austria Microchip Technology Austria GmbH Durisolstrasse A-4600 Wels Austria Tel: 43-7242-2244-399 Fax: 43-7242-2244-393 Detroit Tri-Atria Office Building 32255 Northwestern Highway, Suite Farmington Hills, 48334 Tel: 248-538-2250 Fax: 248-538-2260 China Shanghai Microchip Technology Consulting (Shanghai) Co., Ltd. Room 701, Bldg. East International Plaza Xian Road Shanghai, 200051 Tel: 86-21-6275-5700 Fax: 86-21-6275-5060 Kokomo 2767 Albright Road Kokomo, Indiana 46902 Tel: 765-864-8360 Fax: 765-864-8387 Denmark Microchip Technology Nordic Regus Business Centre Lautrup Ballerup DK-2750 Denmark Tel: 4420 9895 Fax: 4420 9910 Angeles 18201 Karman, Suite 1090 Irvine, 92612 Tel: 949-263-1888 Fax: 949-263-1338 China Shenzhen Microchip Technology Consulting (Shanghai) Co., Ltd., Shenzhen Liaison Office 1315, 13/F, Shenzhen Kerry Centre, Renminnan Shenzhen 518001, China Tel: 86-755-82350361 Fax: 86-755-82366086 France Microchip Technology SARL Parc d'Activite Moulin Massy Saule Trapu Batiment Etage 91300 Massy, France Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Jose Microchip Technology Inc. 2107 North First Street, Suite Jose, 95131 Tel: 408-436-7950 Fax: 408-436-7955 China Hong Kong Microchip Technology Hongkong Ltd. Unit 901-6, Tower Metroplaza Hing Fong Road Kwai Fong, N.T., Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 Toronto 6285 Northam Drive, Suite Mississauga, Ontario 1X5, Canada Tel: 905-673-0699 Fax: 905-673-6509 Germany Microchip Technology GmbH Steinheilstrasse D-85737 Ismaning, Germany Tel: 49-89-627-144 Fax: 49-89-627-144-44 India Microchip Technology Inc. India Liaison Office Divyasree Chambers Floor, Wing (A3/A4) O'Shaugnessey Road Bangalore, 025, India Tel: 91-80-2290061 Fax: 91-80-2290062 Italy Microchip Technology Centro Direzionale Colleoni Palazzo Taurus Colleoni 20041 Agrate Brianza Milan, Italy Tel: 39-039-65791-1 Fax: 39-039-6899883 United Kingdom Microchip Ltd. Eskdale Road Winnersh Triangle Wokingham Berkshire, England RG41 Tel: 5869 Fax: 44-118 921-5820 10/18/02 DS00236A-page 2002 Microchip Technology Inc. Other recent searchesZMYK54W-4 - ZMYK54W-4 ZMYK54W-4 Datasheet V23845-A - V23845-A V23845-A Datasheet Bwxyz - Bwxyz Bwxyz Datasheet TLHR42 - TLHR42 TLHR42 Datasheet TLHO42 - TLHO42 TLHO42 Datasheet TLHY42 - TLHY42 TLHY42 Datasheet TLHG42 - TLHG42 TLHG42 Datasheet TLHP42 - TLHP42 TLHP42 Datasheet NJM2143 - NJM2143 NJM2143 Datasheet LA507 - LA507 LA507 Datasheet DS04-21359-2E - DS04-21359-2E DS04-21359-2E Datasheet BCM5706 - BCM5706 BCM5706 Datasheet 2SK3486 - 2SK3486 2SK3486 Datasheet
Privacy Policy | Disclaimer |