correct some mistakes:
if xn=2048, yn=969*2;
xn=4096, yn=1968*2;
xn=8182, yn=4025*2;
Reply by Simon●May 21, 20062006-05-21
Hi,
I wanna implement a low pass IIR filter in C2407 using the 24x
Filter library.
I am a new comer to this kind of implementation.
/*After the initation:*/
{
iir.dbuffer_ptr=dbuffer;
iir.coeff_ptr=coeff;
iir.qfmat=IIR_LPF_QFMAT;
iir.nbiq=IIR_LPF_NBIQ;
iir.isf=IIR_LPF_ISF;
iir.init(&iir);
}
while(ADUPDATE) /*new adc coming*/
{
iir.input=xn; /*new value into delay buffer*/
iir.calc(&iir); /*fir
calculation*/
yn=(iir.output<<1);
ADUPDATE=0;
}
I met some problem i can not explain.
1) If I directly set xn=100, I found yn is always be zero.
2) if I set xn=8005, then , yn=7896
set xn=2048, then, yn= 969
xn=4096, yn= 1968
xn=8182, yn= 4025
I remembered the FIR filter implementation i did yesterday, if I set
xn=1000, then yn=1000.