DSPRelated.com
Forums

How to use FFT routines given in compiler manual..............

Started by mall...@yahoo.co.in February 24, 2009
Hi!

Any body tried the FFT routines given in visualDSP compiler manual.....
we are trying to use the Library routines rfft_fr16 but we are unable to get proper reslts.........

we have checked Compiler documentation, this is just an example code we need to test...........

the thing is outFFT is always showing "zero" in the following program

we are using visualDSP 5.0
#define EE_LENGTH 8000
#define FFT_SIZE 256
#define SAM_RATE 16000

section("sdram0") complex_fract16 outFFT[FFT_SIZE];

section("sdram0") complex_fract16 outiFFT[FFT_SIZE];

section("sdram0") complex_fract16 tempFFT[FFT_SIZE];

section("sdram0") complex_fract16 twidFFT[FFT_SIZE];

section("sdram0") fract16 inFFT[FFT_SIZE];
void main()
{
unsigned int i;

for(i=0;i<256;i++)
inFFT[i] = 0x01;

twidfftrad2_fr16(twidFFT,FFT_SIZE/2);

rfft_fr16(inFFT,tempFFT,outFFT,twidFFT,1,FFT_SIZE,0);
ifft_fr16(outFFT,tempFFT,outiFFT,twidFFT,1,FFT_SIZE,0);

}
if anybody know how to use them or why this code is not running...
it will be very helpful to us
thank u
malli
On Tue, 24 Feb 2009, m...@yahoo.co.in wrote:

> the thing is outFFT is always showing "zero" in the following program
>
> for(i=0;i<256;i++)
> inFFT[i] = 0x01;

This is a DC, and almost zero input. Try changing it to
inFFT[i] = i;
and see what happens.

Patience, persistence, truth,
Dr. mike