I don't understand why people trash AN521 so much. It simply shows a PIC interfacing to line voltage. It does not advocate human contact with the PIC when line connected. There are plenty of electronic devices in your world that are line connected. Compact fluorescent lights are electronic and line connected. There are also methods to protect devices and humans if component failure happens. Two resistors in series is a widely used and accepted practice. Moving to a second topic, in the United States and in all countries I know of, a certain amount of line current is allowed to flow through human beings. A VCR, for instance, although isolated, has a resistor and capacitor from neutral to case. Neutral and hot frequently get reversed, but the amount of current that would flow into a grounded human when this happens is small, acceptable, and legal. I'm all for safety, don't get me wrong. But if someone is building something that controls line power, such as the triac control mentioned in AN521, he/she needs to take precautions building it and fiddling around with it. It doesn't matter whether there's a PIC in it or not. You don't need to stop designing it when you decide to put a PIC in it. Thirdly, as far as applying higher than supply voltages to inputs of a PIC, there are PICs and there are PICs. The amount of current you inject, and what polarity it is, will affect operation at different levels depending which PIC you choose. The 16C54 allows 500uA without affecting operation. As new PICs have been introduced, that value has decreased but is still nonzero, especially if you are not using analog features in the PIC. I hope I have made this clear enough that readers will not think I am starting a flame or religious war. Cheerful regards, Bob -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist