FFT


Files

file  e_fft.c
 Package to mange the FFT.
file  e_fft.h
 Package to mange the FFT.
file  e_fft_utilities.h
 Some fft features.
file  e_input_signal.c
 Allocate memory and initialize the sigCmpx array.
file  e_twiddle_factors.c
 The FFT factor from Microchip.

Detailed Description

Introduction

The fast fourier transform (FFT) is really usefull, especially to work with the microphones data. This package contains all you need to perform the FFT.
The dsPic has some specials instructions (MAC instructions) which are used here.

How it works

To do the FFT on your data, first make this:

Then you just have

A little code to illustrate this.

        e_ad_scan_on();
        // waiting all the 512 data (here we scan the microphones)
 while(!e_ad_is_array_filled());
        e_ad_scan_off();

        // We put the mean to zero
        e_subtract_mean(e_mic_scan[0], FFT_BLOCK_LENGTH, LOG2_BLOCK_LENGTH);
        // We copy the array of micro zero to the FFT array
        e_fast_copy(e_mic_scan[0], (int*)sigCmpx, FFT_BLOCK_LENGTH);
        
        // The result is saved => we can launch a new acquisition
        e_ad_scan_on();
        // Now we are doing the FFT
        e_doFFT_asm(sigCmpx);

Author:
Doc: Jonathan Besuchet

Generated on Fri Feb 29 14:26:55 2008 for e-puck by  doxygen 1.5.4