If you go with the on/off idea, you might want to have the PIC track the AC wave and turn it on/off at the zero-crossing, and doing timing based on pulses. If you start chopping pulses in half it might end up causing some drift (I guess it depends on how accurate you want to be). You could also just have a fast switch and do per-pulse on/off. Same idea, but instead of generating the pulses yourself you just chop the AC wave. -- Hector Martin (hector@marcansoft.com) Public Key: http://www.marcansoft.com/marcan.asc -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist