You are on page 1of 2

// This project uses support files generated by Rulph Chassaing

// Comm routines included in C6xdskinit.c

#include "dsk6713_aic23.h" // needed to access codec function


Uint32 fs=DSK6713_AIC23_FREQ_8KHZ; // sampling frequency of codec
#define N 75
float h[N] = {
-0.0019416867115619914,
0.0075389146108807703,
-0.010223606127479088,
0.002594162109593547,
0.0054335084012698959,
-0.00075446662464976732,
-0.0047615417963632256,
-0.0015857459870003438,
0.0039794958789214734,
0.0040657266086977888,
-0.0019933067551258896,
-0.0059423960743324603,
-0.0014084133450025713,
0.0061569647991088746,
0.0056212467685302411,
-0.0037689297381456625,
-0.00918511853218946,
-0.0014180492842987423,
0.010162446147120035,
0.0083429512715391674,
-0.0068174188784851852,
-0.014624445694576273,
-0.0013605943613173911,
0.016951471392876588,
0.012993942341494534,
-0.012217735721468743,
-0.024459271116318383,
-0.0012755964716907188,
0.03035721619182119,
0.022796003670591061,
-0.024319598762084903,
-0.048870814988960086,
-0.0012045842549648033,
0.073994486339998472,
0.062706069645076551,
-0.092177639273779782,
-0.30276117587925933,
0.59881904793432517,
-0.30276117587925933,
-0.092177639273779782,
0.062706069645076551,
0.073994486339998472,
-0.0012045842549648033,
-0.048870814988960086,
-0.024319598762084903,
0.022796003670591061,
0.03035721619182119,
-0.0012755964716907188,
-0.024459271116318383,
-0.012217735721468743,
0.012993942341494534,
0.016951471392876588,
-0.0013605943613173911,
-0.014624445694576273,
-0.0068174188784851852,
0.0083429512715391674,
0.010162446147120035,
-0.0014180492842987423,
-0.00918511853218946,
-0.0037689297381456625,
0.0056212467685302411,
0.0061569647991088746,
-0.0014084133450025713,
-0.0059423960743324603,
-0.0019933067551258896,
0.0040657266086977888,
0.0039794958789214734,
-0.0015857459870003438,
-0.0047615417963632256,
-0.00075446662464976732,
0.0054335084012698959,
0.002594162109593547,
-0.010223606127479088,
0.0075389146108807703,
-0.0019416867115619914,
};
float yn;
float dly[N];
short a,b;
interrupt void c_int11()
{
int i;
b = input_sample();
dly[0]=(float)(b);
yn= 0;

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


yn += (h[i]*dly[i]);
for (i = N-1; i > 0; i--);
dly[i] = dly[i-1];

a=(short)(yn);
output_sample(a);
return;
}

void main()
{
comm_intr(); //iniciar DSK, codec, McBSP
while(1); //esperar que ocurra una interrupcion
}

You might also like