You are on page 1of 4

// This project uses support files generated by Rulph Chassaing

// Comm routines included in C6xdskinit.c


#include "dsk6713_aic23.h"
Uint32 fs=DSK6713_AIC23_FREQ_16KHZ;
#define N 82
float h[N] ={
0.0004074865473442,0.0002543237813091,-0.0008690369934732,0.001900211108543,
-0.0006356345587641, 0.002831906017623,
0.00446979705725,0.0006735920299246,
-0.005669076454314,-0.006858036372882,-0.0001400818297269,
0.007236859877625,
0.006615056907667,-0.0003462297478668,-0.004192220404945,0.001890890104889,
-0.0009640635151615,-0.005550968832389,-0.006376075321376,
0.005537633231617,
0.0194340213727, 0.01375120572204, -0.01197510010074, -0.02894149769671,
-0.01459875345679, 0.01436453216816, 0.02278934830829, 0.006361601885578,
-0.004098953994792, 0.006020964723689, 0.007434605336241,
-0.02455800296395,
-0.0536309143759, -0.01847654729075, 0.06839584485667, 0.1045373938554,
0.01910053909178, -0.1136466128638, -0.138512895991,-0.008053587204461,
0.1415385299388, 0.1415385299388,-0.008053587204461, -0.138512895991,
-0.1136466128638, 0.01910053909178, 0.1045373938554, 0.06839584485667,
-0.01847654729075, -0.0536309143759, -0.02455800296395, 0.007434605336241,
0.006020964723689,-0.004098953994792, 0.006361601885578,
0.02278934830829,
0.01436453216816, -0.01459875345679, -0.02894149769671, -0.01197510010074,
0.01375120572204, 0.0194340213727, 0.005537633231617,-0.006376075321376,
-0.005550968832389,-0.0009640635151615,-0.001890890104889,0.004192220404945,
-0.0003462297478668, 0.006615056907667, 0.007236859877625,0.0001400818297269,
-0.006858036372882,-0.005669076454314,0.0006735920299246,
0.00446979705725,
0.002831906017623,-0.0006356345587641,-0.001900211108543,0.0008690369934732,
0.0002543237813091,0.0004074865473442
};
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 interrupcin
}

You might also like