AnsweredAssumed Answered

sinc2 step detection

Question asked by J-dawg on Mar 6, 2013
Latest reply on Mar 21, 2013 by AudeR

Hello ADI

 

Im making an application were i want to use the step detection filter.

Ive tried to make it work with both compare "modes"(compare with main filter / compare with previous sinc2 output). And theres something i do not quite understand.

When i use the compare with previous sinc2 output the interrupt is generated when i put in a step, and it stops again when 3 sinc2 output values is within the threshold value. Just as i would suspect.

But when i use the compare with main filter mode i dont get the same result as i was hoping for. I thought the sinc2 would generate interupts when sinc2 result minus main filter is greater than the threshold value. But that is not what im observing.

My setting are:

pADI_ADCSTEP->DETCON = 0x88;

pADI_ADCSTEP->STEPTH = 0x3;

Which gives me a threshold of 4/2024*Vref~2.4mV.

When i input a voltage of <2.4mV there isnt generated any interrupt. But when i input a voltage >2.4mV there is constantly generated interrupts.

And when i make a step that goes from say 3mV to 1mV the interrupts stops arround when the sinc2 result is 2.4mV. So it seems that it sees the threshold with respect to zero not the main filter result.

Can anyone give some explanation to this?

Ive attached my code if it is any help.

Attachments

Outcomes