attach is the fft files . I write the program using CCS compiler , but simulation was done on the Mplab ide.
I used the Matlab to get the samples of sine wave. put it in the array "input". Then the fft is done.
one need to change this value
#define FFT_BLOCK_LENGTH 128
in file FFT.h accordingly for how much points of FFT he wants to do.
I used following steps to check the program
1) install CCS compiler
2) install Mplab ide.
3) Install CCS Mplan ide plugin
4) use Matlab to get the sample of any waveform
5) perform fft on the above wave form
5) use matlab to plot the absolute value of fft
6) use the sample waveform values from step 4 in the Dspic program
7) used simulation to get the result .
8) extracted the result and plot the values in Matlab .
9) compare the result.