urgent help needed with pic32 fft function

88 views
Skip to first unread message

bilal_eme

unread,
Apr 27, 2011, 5:00:13 AM4/27/11
to PIC32-Basic
hi guys
this is bilal from National University of Sciences and Technology
Pakistan
i am a student of electrical engineering and whilst doing my Final
year project on PIC32mx i am facing a small problem which i am unable
to solve so far with all my knowledge and material available on web.
so i hope u guys would pay heed to my request and reply me immediately
cause i am really running out of time for the submission pf my
prokect.
i do hope you will step forward for my help
thanking in anticipation.
.
.
here goes my problem :
I wanted to calculate FAST FOURIER TRANSFORM of some fixed point
numbers and for that purpose i have used mips_fft32 function.
but unfortunately i am unable to get the required results .
when i tried to calculate TWIDDLE FACTORS using mips_fft32_setup() , I
am getting 0s at the output of twiddle factors , which I am unable to
fix.
Since, I am unable to calculate the correct TWIDDLE fatcors , how can
I get correct Fast Fourier Transform (FFT) of my desired data as we
pass twiddle factors as arguments in
mips_fft32 function.

i am using pic32 c compiler v1.11

the code is as under
#include <dsplib_dsp.h>
#define N 8
#define log2N 3
int32c twiddles[log2N];
mips_fft32_setup(twiddles,log2N);

int32
input[8]={500000,500000,500000,500000,500000,500000,500000,500000};

int32c din[n]={0};
t=0;
for(t=0;t<8;t++){
din[t].re=input[t]; // real input...complex part is zero
}

int32c dout[n]; // output vector
int32c scratch[n];

mips_fft32(dout, din,twiddles, scratch,nn);
Reply all
Reply to author
Forward
0 new messages