how did you get the code to compile?
what type of cable do you use for it?
thanx
how did you get the code to compile?
what type of cable do you use for it?
thanx
iq66:
how did you get the code to compile?what type of cable do you use for it?
thanx
I used AVR Studio.
What cable are you referring to?
If it is the prgramming cable, I used Atmel AVR ISP MkII on the 6-pin Arduino ISP connector.
Hi I compiled the code with AVR studio but it gave me 3 compile error. However, they are included in “ffft.h” header file.
fft_input(capture, bfly_buff);
fft_execute(bfly_buff);
fft_output(bfly_buff, spectrum);
How do I get the fundamental frequency from the fft code? I basically need to see the output on the serial terminal. I do not have an lcd display.
Thanx.[/quote]
iq66:
Hi I compiled the code with AVR studio but it gave me 3 compile error. However, they are included in “ffft.h” header file.fft_input(capture, bfly_buff);
fft_execute(bfly_buff);
fft_output(bfly_buff, spectrum);
How do I get the fundamental frequency from the fft code? I basically need to see the output on the serial terminal. I do not have an lcd display.
Thanx.
[/quote]
Maybe you forgot to include the FFFT.S file?
An FFT could be quite useful for other things. There was an attempt about 5 years back to directly decode WWVB on a microcontroller (60KHz time standard in the US), which wasn’t entirely successful…but the person didn’t really indicate why or even what one he/she was using. There is a 75KHz similar operation in europe.
Id imagine you’d connect the ADC to a loop antenna (perhaps with an op amp on the front end, optional crystal filter if WWVB doesnt come in strong in your location), mix in a PWM near its frequency to get it low in the baseband, and decode it with a low frequency bucket, there might be some success possible.
Its just some 1 bps signal where they cut the power 17dB (ASK) to indicate the type of bit. 17dB should show up with even the crudest of FFT resolutions.
It would be really cool with some wound wire on the ADC line though wouldn’t it? you could practically build in a RTC into anything for almost zero cost. You wouldn’t really need to run it much either to make use of one of the many arduino software RTC’s. Sync when you need to.
ptaa32:
As an afterthought:Guess it would be unpractical with all that inline assy.
The ideal would be as an earlier poster asked for: make a stand-alone library for the FFT.
Hope, hope …
Did you ever find (or make) a version of this code that can be used as a library in the Arduino SDE?
So, how many FFT’s/second did you finally manage?
On ATMega64 at 16 MHz I can do 128 FFT in 13ms with conversion to phase/magnitude taking 8ms.
On the MSP430 at 16 MHz I can do a 128 FFT in 11ms with conversion to phase/magnitude taking 6ms.
Just in case anyone else is looking for FFT code, I did some benchmarking tests of FFT on different flavors of Arduino, and on a Teensy. My write-up below shows the relative speeds of the different boards. It also has a link to my GitHub for the FFT and benchmarking code:
https://openaudio.blogspot.com/2016/09/ … speed.html
My results show that the Arduino Uno is, predictably, very very slow in doing FFTs. The Teensy (especially the new K66-based Teensy 3.6) is way better for such computational tasks.
Chip