Tool/software: Code Composer Studio
#include "bs2700.cof" //coefficient file
#include "dsk6416_aic23.h" //codec-dsk support file
Uint32 fs=DSK6416_AIC23_FREQ_8KHZ; //set sampling rate
int yn = 0; //initialize filter's output
short dly[N]; //delay samples
interrupt void c_int11() //ISR
{
short i;
dly[0]=input_sample(); //input newest sample
yn = 0; //initialize filter's output
for (i = 0; i< N; i++)
yn += (h[i] * dly[i]); //y(n) += h(i)* x(n-i)
for (i = N-1; i > 0; i--) //starting @ end of buffer
dly[i] = dly[i-1]; //update delays with data move
output_sample(yn >> 15); //scale output filter sample
return;
}
void main()
{
comm_intr(); //init DSK, codec, McBSP
while(1); //infinite loop
}
#define N 89 //number of coefficients
short h[N]= {-14,23,-9,-6,0,8,16,-58,50,44,-147,119,67,-245,
200,72,-312,257,53,-299,239,20,-165,88,0,105,
-236,33,490,-740,158,932,-1380,392,1348,-2070,
724,1650,-2690,1104,1776,-3122,1458,1704,29491,
1704,1458,-3122,1776,1104,-2690,1650,724,-2070,
1348,392,-1380,932,158,-740,490,33,-236,105,0,
88,-165,20,239,-299,53,257,-312,72,200,-245,67,119,-147,44,50,-58,16,8,0,-6,-9,23,-14};
After writing this code in the Code Composer Studio,it is giving error like
"FIR.c", line 1: fatal error: could not open source file "bs2700.cof"
i do not know where can i get the source file...