AD: FFT code for PIC 18F452 now available

Hi guys,

Following some heavy requests, I've just ported my optimized FFT (Fast Fourier Transform) library from the 17C75X to the 18F452. As a reminder you can find the original 17C75X library, as well as comments from its first user, Steve Thackery, here :

formatting link

Here under some informations on this 18F452 version (usable of course on other 18FXXX variants) :

This firmware is a fully optimized 256-taps integer-mode FFT code. This firmware is able to :

- Calculate the complex FFT of an array of 128 complex signal samples (giving 128 complex amplitudes, one per frequency step),

- Calculate the complex FFT of an array of 256 real signal samples (giving

128 complex amplitudes, one per frequency step from DC to Shannon's frequency (fsample/2)),

- Calculate the real frequency power spectrum of the resulting complex FFT (giving 128 real power value, one per frequency step from DC to Shannon's frequency (fsample/2)).

All numbers are coded on 16-bit integer words (32-bit for complex values), with admissible values from -8192 to +8192 to prevent overflows. The memory requirements of this firmware : no more than 576 RAM bytes : 512 for the storage of the data (256x16bit), and only 64 bytes for all other storages. The program memory requirement is 5292 bytes if all functions are needed, including validation code.

Typical execution speed for a full real 256-points FFT : 53ms only (PIC chip clocked at 40MHz), plus 4ms is power calculations are needed.

For an easy adaptation to any development environment the data is segmented into five blocks (1x64 bytes + 4x128 bytes), each block can be relocated anywhere in data memory, but each block must be included in one and only one 256-byte memory page (a block can't be overlapping a page break).

If you are interested just let me know, this firmware is available as-is on a (very small) royalty basis, or used as part as a consultancy work.

Cheers,

Robert Lacoste - ALCIOM : The mixed signals experts

formatting link
snipped-for-privacy@alciom.com

Reply to
Robert Lacoste
Loading thread data ...

Do you also have the optimization for when the inputs are all real instead of complex? That's a huge savings if you can do it right.

-Robert Scott Ypsilanti, Michigan (Reply through newsgroups, not by direct e-mail, as automatic reply address is fake.)

Reply to
Robert Scott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.