Go Down

Topic: Modified 8bit FFT in c (Read 60 times) previous topic - next topic


Nov 30, 2010, 09:56 pm Last Edit: Nov 30, 2010, 10:16 pm by DE8MSH Reason: 1

hope that anyone can help: will use this FFT for some HAM projects. Question: how can I reduce the bandwidth from 330hz to 3300 khz only?

Most HAM radios have audio bandwidths from 0 to 3khz.  

And: how can I use 128 or 256 FFT level instead of 64?

Thank you very much fpr information.


I'm currently trying to take an analog signal into my arduino in the frequency range of around 70-400 Hz with a few harmonics in each signal.  Can this FFT code be used if i wanted to find the fundamental frequency of my signals?  How would i go about doing that?  Do i need to look for the highest magnitude in the FFT bins?  I'm new to this stuff and need a little guidance.



Ricardo, yes.. that's going to be your best bet.  There's a bit of error in the bands because of the use of Integer math, but it's at the cost of speed to go to floating point of any sort.

Unlike my above project, you are going to want to actually tune the sample code to actually get timed samples, as my approximation (or even "fast as you can" code) is NOT lab accurate by any means.

I've been reading up and am starting to get a grip on the math.  By the way, to the other poster.. the output is N/2 where N is the number of samples, this gives 64 bins due to 128 byte sample space.

I might tweak this code at some point and stick it somewhere as a downloadable lib-- I haven't seen the author back to the thread, but this code shouldn't disappear.. far too useful, if even just for a light show..
When the testing is complete there will be... cake.


Hi all!

I have been trying to get this working with no luck, I have tried versions 18, 21 and 22 in ubuntu 64bits and in windows xp

I allways get this error:
Code: [Select]
FFT_test.cpp.o: In function `setup':
FFT_test.cpp:21: undefined reference to `fix_fft(char*, char*, int, int)'

I got the code for the pde from http://blurtime.blogspot.com/2010/11/arduino-realtime-audio-spectrum.html
but I think the problem is in the library...

Any advice?



well... ok, I will answer myself, after a few hours I realized I named the library fix_fft.c instead of fix_fft.cpp and now it works!!

Go Up