3 ms·
There are some nice things about the filter in question. It's very memory efficient--you just need to keep an accumulator with the weighted sum of samples. Yo
by joe_bleau 17y ago
There are some nice things about the filter in question. It's very memory efficient--you just need to keep an accumulator with the weighted sum of samples. You get an output with each input sample, so it's a good fit for continuous signals. You can pick the coefficients so that the math is shift and add, something handy with old and slow CPUs.
I don't know why they throw away so much of the ADC resolution. I suspect that the sensors are the weak link, not the analog conditioning circuitry or the ADC. Still, 4 bits is a pretty crummy sensor.
I see some irony in that if they'd written it in assembly language instead of C, the outside analysis probably wouldn't have found nearly as many of the bugs and other issues to complain about.
- mindslight 17y agoA simple digital low pass filter certainly has uses, I just don't think any of them are applicable here. Averaging several values per reading certainly wouldn't tax the resources of even the smallest micros. I was including the sensor in the 'analog system'. If full range is 0.2% BAC (optimistic), thats a step of over 0.01%! I'd expect more from a sensor that's supposed to perform "beyond a reasonable doubt". I don't know if ASM would have really hindered analysis. Certainly it's easier to deliberately hide malicious code with ASM, but naive code is generally readable and I doubt the audit firm would have given up. Chances are an ASM programmer would have paid better attention to detail, too ;).