DSPRelated.com
Forums

Seek help for FIR filter problem

Started by elit...@yahoo.com.cn August 18, 2009
I am a novice using the PADK board based on 6727, I want to implement a FIR filter to get the Hilbert Transform of the input signal, the coefficients are obtained by MATLAB. The C codes in the CCS is as follows,
but the output wave have discontinuity points every several cycles seen from the oscilloscope(the picture cannot be attached). The DAC buffer is set as int dmaxDacBuffer[PINGPONG][STEREO][NUM_CHANNEL][FRAME_SIZE], where FRAME_SIZE is 80, PINGPONG is 2, STEREO is 2, NUM_CHANNEL is 4.

So I am confused about this phenomenon, can anyone help me. Thanks!
float dly[NUM_COEFFS-1+FRAME_SIZE]; //NUM_COEFFS == 50
float OutL = 0;

float sin_table[24] = {
#include "sin_table_sampling192kHz_carrier40kHz_24elements.txt"
};
float cos_table[24] = {
#include "cos_table_sampling192kHz_carrier40kHz_24elements.txt"
};

void Process(void)
{
int i,j;

for(i=0,j=NUM_COEFFS-1; i {
dly[j] = processBufInL[i];
}

for (i=0; i {
for (j=0; j {
OutL += A[j]*delay[i+j];
}

processBufOutL[i] = OutL;
OutL = 0;
}

for (i=0,j=FRAME_SIZE; i {
dly[i] = dly[j];
}
}

_____________________________________