- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am working on a small project that causes holiday lights to flash in time to user specifiable frequency bands of music. I have a working prototype that uses an ADC, a Filter Bank, a DAC, and comparators. But there is a problem.
I can manually program the filter bank for any kind of response. I want the ability to configure it with a UART to allow user programmable frequency response and filter type. I do not think this is possible with the PSOC filter bank as there is no register for bandwidth, etc. It does not look like there is a register for the coefficients either.
Another option is to use the CPU to run an IIR algorithm and an external application that computes the coefficients. The main drawback to this is the filter needs CPU time. I can make this work but I would prefer to do it with the filter bank.
Any other options aside from using external IC chips?
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Michal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No examples. I would suggest you to start a new topic with an FFT question, somebody might have got something.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look at this for modifying coeficients -
http://www.cypress.com/?app=forum&id=2232&rID=56121
You can also consider a comb filter, easy to implement.
http://en.wikipedia.org/wiki/Comb_filter
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.
Regards, Dana.