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.

TMS320C6748: IIR filter using C6748

Part Number: TMS320C6748

Hello everyone,

I have implemented IIR filter program using LCDK6748. I used TI libraries that  require in the program and also the .out file is generated.I gave a Sine wave as the i/p to the filter but in the o/p only noise is observed.Can you suggest me how to check the o/p of the IIR filter in LCDKC6748?

I attached the code and the matlab generated coefficient file as under :-

// L138_iirsos_intr.c

//
//IIR filter implemented using secondordersections
//floatingpointcoefficientsreadfromfile
//
#include"L138_LCDK_aic3106_init.h"
#include"bs1800int.cof"
float w[NUM_SECTIONS][2]={0};
interrupt void interrupt4(void) //interruptserviceroutine
{
int section;//indexforsectionnumber
float input;//inputtoeachsection
float wn,yn;//intermediateandoutputvalues
input=((float)input_left_sample());//inputfromADC
for(section=0;section<NUM_SECTIONS;section++)
{
wn=input-a[section][1]*w[section][0]
-a[section][2]*w[section][1];
yn=b[section][0]*wn+b[section][1]*w[section][0]
+b[section][2]*w[section][1];
w[section][1]=w[section][0];
w[section][0]=wn;
input=yn;//outputofcurrentsectionisinputtonext
}
output_left_sample((int16_t)(yn));//outputtoLDAC
return;
}
int main(void)
{
L138_initialise_intr(FS_8000_HZ,ADC_GAIN_0DB,DAC_ATTEN_0DB,LCDK_LINE_INPUT);
while(1);
}
 coefficient file

// bs1800int.cof
//second order type 1 Chebyshev LPF with 2dB passband ripple
//and cutoff frequency 1500Hz


#define NUM_SECTIONS 1
float b[NUM_SECTIONS][3]={{0.0,0.48255,0.0}};
float a[NUM_SECTIONS][3]={{1.0,-0.71624,0.387913}};