> And this too. > I'll try to make up the schematic, but it is really that simple: > > 220V -> transformer -> one leg to GND, other to partitor -> partitor > output to PIC || diode. Where does the diode go? I think you are rectifying the signal to the PIC ADC, which means you are only receiving the top half. Leaving the bottom half clipped at either your diode or the PIC internal protection diode. You either need to account for this in software or capacitivly couple the signal and add a DC bias, but with a 6V transformer, you don't have enough room between your 0-VDD rail without a resistive divider. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist