1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

AD: FFT code for PIC 18F452 now available

Discussion in 'Embedded' started by Robert Lacoste, Jul 8, 2003.

  1. 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 :

    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.


    Robert Lacoste - ALCIOM : The mixed signals experts
    Robert Lacoste, Jul 8, 2003
    1. Advertisements

  2. Robert Lacoste

    Robert Scott Guest

    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.)
    Robert Scott, Jul 8, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.