Bala.Chandar wrote: > The Neutral terminal of the Mains is connected to a PIC > input through a 4.7M resistor for detecting zero crossings. You havn't thought about using a "AC-opto coupler" ? These are specificaly built to handle this task. See as an example the device SHF628A from Vishay : http://www.vishay.com/optocouplers/list/product-83722/ You'll get much better mains <-> PIC isolation, and you can more easily add a smothing R/C net between the optocoupler and the input pin of the PIC (to filter out "spikes" in the mains). Jan-Erik. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics