> Nyquist says, you need to filter at less than half the sample > frequency before you sample the signal. > > Consider this case: The audio signal is a pure 100Hz sinewave of > amplitude 1. You are sampling it at 100Hz. Without filtering, if the > phase between the sine wave and the sampler is 0, you will sample the > wave when it is zero. If the phase difference is pi/2, you will > sample the wave when it is 1. Or consider a 99 or 101 Hz sinewave. > The wave is of constant amplitude, but the VU meter would swing from 0 > to full scale once per second. I'm not sure how relevant Nyquist is in this case: it is about measuring the maximum amplitude, not about measuring frequency. I agree that there might be hypothetical scenarios in which you keep reading 0 despite the signal veering between levels of 255, but if the 100 samples are taken at irregular moments (and why would you do it at precise moments anyway?) this is very unlikely. With the example it would only be the case if the sine was at full amplitude. If the sine was at half amplitude, it would only swing to half scale. To improve on the design a moving average might solve certain problems as well. Greetings, Maarten Hofman. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist