Current project is an AC volt/amp/power/power factor meter using an 18F2620. It is a for-fun project. I digitize one complete cycle of the 60 Hz voltage and current waveforms using the ADC, saving 256 8-bit samples.=20 I compute RMS voltage and current, and power factor by calculating the phase shift. Life is good. But just for fun, I want to be able to calculate the power factor for non-linear loads, such as a switching power supply. >From what I have read, I need to determine the harmonic content of the current waveform.=20 It seems to me that the easiest way to do that is to use a digital filter to filter out everything above 60 hz. I've played around with simple digital filters before, to filter noise from a slowly varying DC signal, but that was sampling the signal over a long period of time. What I have is a single cycle of the waveform - 256 8-bit values representing the waveform. Can someone point me in the right direction for filtering a single cycle? --=20 Larry Bradley =20 Orleans (Ottawa) Canada=20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .