There is probably a better approach: A fast-fourier transformation will exactly deliver what you'd like to have and it uses less CPU than scanning the spectrum with IIR. There are several FFT algorithms ready-made in C-language. An entry-point is here: www.fftw.org/links.html
Take a look at this for modifying coeficients -
You can also consider a comb filter, easy to implement.
You can always roll your own (bigger learning curve) using the DFB assembler -
http://www.cypress.com/?rID=60720 DFB Assembler, MAC Topics
This would allow you to implement a tunable constant Q or constant BW filter
of your choosing.
Hello Bob, did you use the fft library for PSoC 5LP? Do you know some tutorial for implementing it to PSoC with some easy example?
No examples. I would suggest you to start a new topic with an FFT question, somebody might have got something.
Here is my code with using CMSIS library. I made complex signal model sig = cos(fi) + j*sin(fi) using fasth math functions from CMSIS and I made complex fft. I'm sending computed spectrum using USBUART to PC. In attachment is matlab program (change .txt to .m) for drawing received data to figure. (all is for PSoC 5LP)
Hi bob, I don´t understand.
Can I use the fftw library in a psoc project implementation??
in that case, what files do you use? because the folder fftw3 contains many files .
thank you and sorry for asking in this place.