View previous topic :: View next topic |
Author |
Message |
cbarberis
Joined: 01 Oct 2003 Posts: 172 Location: Punta Gorda, Florida USA
|
Question Relating to CIC filters |
Posted: Sat Nov 07, 2009 2:50 pm |
|
|
Hello,
I am interested in applying a CIC (Cascaded Integrator-Comb) filter algorithm on a PIC micro. I looked at some info on the web. I found much of it somewhat esoteric and not as clear as I would like, in order to implement my own code. Most of the stuff I found was in the VHDL language which I do not use or understand that well. I was wondering if any of you have any C code snippets that actually implement the CIC filter functions, or if you can point the way to such information.
I am aware that the past October issue of Circuit Cellar did have an article on this subject, however it clearly did not answer my needs. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Sun Nov 08, 2009 2:16 am |
|
|
By design, the word length of a CIC filter is different in individual stages and possibly exceeds the size of the data types provided by a C compiler (typically int32 with 8-bit compilers). It's easy, to achieve a parameterizable (in decimation ratio, order and input/output word length) CIC filter design for FPGA, but for a uP, a full-featured macro assembler would be needed.
Did you calculate the required word lengths for your application?
P.S.: A first order CIC decimator isn't but a simple boxcar averager. You don't need to understand CIC theory to implement it. |
|
|
|