How does a transformer and 2 resistors sound? If you wanted a relatively minimalist implementation you could connect one side of the secondary to a resistive divider across Vdd-Gnd and the other to a resistive divider to ground with the PIC A2C tapped off that. As long as Vpp < Vdd the output is always positive. In the limiting version of this you connect one side of transformer to Vdd and the output to a divider to ground and tap ADC input off the divider. ADC input is always positive. =A0 =A0 =A0 =A0 =A0 =A0 =A0Total requirement =3D transformer + 2 resistors. Here Vpp must be less than 2 x Vdd and output divider ratio K such that (Vdd + Vpp/2) x k < Vdd The smallish downside is that the available measured voltage may be slightly less than in some other systems - BUT you lose the non linearity / offset introduced if diodes are used, notionally* need no clamp diodes etc. * Here mains noise can appear at reduced V on PIC pin scaled by transformer ratio. Protecting against this may or may not be a good idea [tm] but is not a terrible one unless minimum parts count is absolutely crucial. Clamp Schottkys to each rail may be OK. Small cap on PIC pin may be all that is needed, noting phase delay and peak V reduction caused (both of which can be small). =A0 =A0 =A0 =A0 =A0 =A0 =A0Russell -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist