Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

FFT or FHT for PIC?

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi all:
Are there stable FFT or FHT libraries for the PIC environment? I have a fair amount of PIC hardware and tool chain on hand.

I see AVR has it.
https://www.waitingforfriday.com/in...ansformation_Library_for_AVR_microcontrollers

Since I am doing a project that needs to bin frequency range amplitudes, I am considering using AVR chips and Atmel Studio to work in for this app., but I will have to invest in dev boards and 'learn' their chips.

thx much
 
FFT here. PIC18F452 @ 40Mhz, 127 freq bins (only 122 columns on LCD). Only 17 updates per second though. Have gotten it up to 31 updates/second by using a 64Mhz PIC18F46K22 at 80Mhz, along with some code tweaking.

Can't hand over the code though. Under license for at least another couple of years.
(P.S. Turn down the speakers!!!)
 
Well that's interesting, 30+ updates per sec (not including any LCD driving) is reasonable for me, but still begs the question, PIC or AVR for FFT/FHT?
 
Apples and oranges as to whether you go PIC or AVR. Whatever you're used to.
FFT or FHT? Couldn't tell you. Again, whatever fits your application and works best. I'm not a math genius, barely understand how FFT works in the first place. If you can make it all the way thru the wiki pages on FFT and FHT, then you're ahead of me. I get lost about halfway thru each article.
 
The algorithm itself is written pretty much in ANSI C and you can use it almost with any micrcocontroller without modification. If you already have development tools for PICs, then I would go with PICs..
Just download the code and take a look at it.

If the FHT is good enough for you, then I would go with it, since it requires less memory and runs faster than FFT..

Edit: I read the code linked above.. the only AVR specific code I found is the UART settings for sending test result messages to PC. And in some places to write/read variables from program space.
 
Last edited:
Apples and oranges as to whether you go PIC or AVR. Whatever you're used to.
FFT or FHT? Couldn't tell you. Again, whatever fits your application and works best. I'm not a math genius, barely understand how FFT works in the first place. If you can make it all the way thru the wiki pages on FFT and FHT, then you're ahead of me. I get lost about halfway thru each article.

Wikipedia is really bad place to learn anything involving math.. they just make the math "too complicated" without any relation to the real world.
Good free place to start learning: https://www.dspguide.com/pdfbook.htm
 
Going back to last century there was a PIC application on the PICList for doing audio FFT using a fairly low spec PIC and directly driving a VGA monitor at the same time.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top