Scott, According to that last posting about the sine wave generation (not about determinism ), it appears to me that you are expecting to see a sine wave as an input. I'm not so lucky - I just get a 60uS pulse during the zero crossing, as determined by some off-chip electronics. Do I want to implement a FIR filter and try to track either 50 or 60 Hz (yes, it's supposed to lock to either one) with a PID loop? Guess I got a little confused - that was basically my thought. As for amplitude, I only have to generate a 0-5V sine wave at the right frequency (determined by the incoming line); the power electronics convert that to 480V for me. Thanks. Andy -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu