Go Down

Topic: FIR Filtering on Audio (Read 271 times) previous topic - next topic

simplycambio

I have been trying to implement an FIR filter on an Arduino Uno for sometime now to no avail. I have successfully implemented a simple input - output audio routine via ADC and PWM using code I saw online. However, when I tried to implement a real time FIR filter based on code from a DSP textbook, the output is just noise. The block of code used for the filter is attached.

My main concern however how do to process each sample individually without distorting the accumulator and output. Any advice?

pjrc

This isn't the right way to post code here.

First, you need to copy & paste as text, and use the code tags.  See #7 here:

http://forum.arduino.cc/index.php?topic=148850.0

Second, if you want useful help, you need to post your whole program.  Posting just this function (which looks like it was designed to run on a PC, not an Arduino Uno) is not enough.  Nobody can even begin to guess what's really wrong.  Or if they do, it'll be just blind guessing (like assuming your array sizes are too big for Uno's tiny memory).  Without those details, people simply can't help you.

Third, it's entirely possible your problem is hardware-based.  Again, if you want help, you need to be specific about how you've connected everything.  For that, posting an image is the right way!  :)

simplycambio

Points noted. Will approach next post accordingly.

el_supremo

How many coefficients are in the filter?

Pete
Don't send me technical questions via Private Message.

Go Up