This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

FFT using tms6713

Hi,

  I am unable to find FFT using the following code..I am using TMS6713 ans ccs 3. Please help me in this regard

 

#define CHIP_6713 1

#include "dsk6713.h"

#include "stdlib.h"

#include "math.h"

#include "utility.h"

#define PI 3.14159265358979323846

#define N 512

float x[2 * N];

float w[N];

void divide(float *x,int n)

{

int i;

float inv = 1.0 / n;

for(i=0;i<n;i++)

{

x[2 * i]=inv * x[2 * i];

x[2 * i + 1]=inv * x[2 * i + 1];

}

}

void main()

{

int i;

float mag[N];

60

for(i=0;i<N;i++)

{

x[2 * i]= sin(2 * PI * 10 * i / N) + sin(2 * PI * 40 * i / N);

x[2 * i +1]=0;

}

tw_genr2fft(w,N);

bit_rev(w,N>>1);

DSPF_sp_cfftr2_dit(x,w,N);

bit_rev(x,N);

for(i=0;i<N;i++)

{

mag[i]=sqrt((x[2 * i] * x[2 * i]) + (x[2 * i + 1] * x[2 * i + 1]));

}

bit_rev(x,N);

DSPF_sp_icfftr2_dif(x,w,N);

divide(x,N);

while(1);

}

 

bit_rev , dsp67x.lib , utility.c, dsk6713bsl.lib where to get these files ?

 

Can you tell me in steps what should i do to get FFT o/p and where to check?