Hi, Dwayne > I *do* use a PIC input pin to sample zero-cross in several products. There > are 2 - 1 Meg resistors (0.25W, 400V) in series to sample a 120 Vac > input. Some boards have 1n4148 clamps to Vdd & Gnd, some boards have a > 4.7V zener clamp to Gnd, some boards have no external diode clamps. I > don't use a capacitor filter at the pin if the intent is to sample zero > crossing (too much phase shift) but do use a capacitor if the requirement > is only use the AC mains as a timebase. It is ok to have the pin connected that way, you are protecting it. > Finally, this (2 resistors + MOV) seems to work for me with a 120 Vac mains > supply. All bets are off at higher voltages. The MOV is giving you the reliability you need ! You can be pretty sure that 120 Vac is not 2Kvolts. I do not like diode clamps to VCC or GND at all. You inject all the noise into your power supply and may get many components in trouble. Small voltage surge arrestors are available and are not too expensive. That way you just dissipate the spikes as heat and do not propagate them trough all the board at the power supply rails. Best regards, Alexandre Guimaraes -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads