George wrote: > How do you detect zero crossings? I have had problems in=20 > that area with > pics connected to the mains. Make sure that there is no input=20 > that can go > below Vss or above Vdd as current into the protection diodes spells > problems. The Neutral terminal of the Mains is connected to a PIC input through a = 4.7M resistor for detecting zero crossings. (Some may consider this = dangerous, but since the power supply itself makes the whole circuit "live", this = doesn't make any big difference.) The software checks for 0 to 1 and 1 to 0 transitions. I didn't have any problems with detection of zero crossings = and as I had mentioned earlier, everything worked perfectly on the = breadboard. Regards, Bala=20 -- 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