2004/05/07 22:02:17
Guest
Hi all,
I hope this is the right forum for this question, if not please refer me to the right one. I want to use the C18 compiler to perform an FFT routine on some discrete data on a PIC18F458, that is the only PIC family I have access to, and have programmer for. It doesn't need to be a large-point routine, nor does it need to be very fast, but does need to work. Does anyone have any code that may do the trick? All the codes I saw online are for PCs and are veeeeery large and can't compile to PIC, else they are for DSPs with specialized instruction sets and hardware resources. The PIC is the only chip I'm familliar with to even try this. Any ideas? Code snippets and suggestions are very welcome!
Thanks,
Vadim
2004/05/08 18:56:57
Guest
Hi Vadim,

Please look at for Robert Lacoste's FFT routines that he developed for his Spectrum Analyzer in a Circuit Cellar article as a possible solution to your query. Although he wrote these routines in optimized assembly language for a PIC17 device the information found there should be invaluable to you since I consider him an FFT Guru. The Spectrum Analyzer article and code is located on the Circuit Cellar WEB site at http://www.circuitcellar.com/library/print/0998/Lacoste98/4.htm

Regards,

Daniel
2004/05/08 19:40:34
Guest
Hi Daniel,
I just wanted to verify: the only code that i found for performing the FFT routine given in the article was from here: http://www.circuitcellar.com/pastissues/articles/Laco98/Listing1.htm
Is this really it? I couldn't find an actual .c or .asm source file out there. The article definetly seemed relevent to what I want, but I couldn't find any complete source. Did I miss somthing?
-Vadim
2004/05/09 04:01:46
Guest
Hi Vadim,

Sorry about that, here is a link to the actual Circuit Cellar article, which also has links to the source code.

http://www.circuitcellar.com/library/print/0998/Lacoste98/

If you want more of his FFT and spectrum analyzer references just do a www.google search on "robert lacoste ftt spectrum".

Regards,

Daniel
2004/05/09 04:22:09
Guest
Hi Vadim,

I see what you mean, even this version of the article does not directly point to the code. You need to go to the Circuit Cellar home page and find the "Article Code" link, and then look for the date of the magazine article. I found the following link which has the code you are looking for. I looked at it just now and it does contain the optimized PIC17 MPASM code for the FFT along with corresponding C as comments. It is not too difficult to convert PIC17 assembly to PIC18 and just call the routines from PIC18 C. In some of his other articles he may already have C versions, so it is worth researching them. The FFT algorithms are based on the original Microchip FFT Application Notes which were used as a starting point. See Microchip APP notes AN542 and AN543. I hope this helps you with your FFT applications.

ftp://ftp.circuitcellar.com/pub/Circuit_Cellar/1998/Issue_98/

Regards,

Daniel
© 2017 APG vNext Commercial Version 4.5

Use My Existing Forum Account