On Thu, May 28, 2009 at 1:10 PM, Peter Restall wrote: > > On Thu, 28 May 2009 11:13:40 -0400, M.L. wrote: > > > Pete, > > You can't detect a 60kHz signal with a 26.7kHz sample rate. I just ran an > > Octave simulation of the Goertzel algorithm and I was able to get good > > results with something like this: > > > > [snip] > > > > -- > > Martin K. > > Thanks for the input Martin - I'll have a play about with your script a > little > later. For the time being though, I've stuck my own octave script at > Very simply, sampling theory says that you need to sample at least twice as fast as the maximum frequency you want to look at. So if you sampled at 10kHz the maximum frequency you can see is 5kHz (with much distortion). You will get numbers if your Goertzel code is trying to detect a frequency > sample speed, but they won't be correct. - Martin -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist