PDA

View Full Version : ADC filter



leonel
- 16th May 2005, 15:52
I want to implement a filter into my ADC measurement, because my display second digit is always changing. Whatīs the best way to do it and have a correct value?
I'm using PIC16F872 with ADC 10bits.
Thank you.

Melanie
- 16th May 2005, 16:29
Take a number of samples, sum and average...

Personally, I take it a stage further..

1. Take a number of samples... eg 16...
2. Sort in numeric Sequence...
3. Junk the Top Four and Bottom Four (this removes any serious anomalies)...
4. Sum and average the eight remaining...

leonel
- 16th May 2005, 16:56
I already did that... When I posted the question I realized the solution :)
But I canīt take more than 12 samples and make the average, because my display brightness decrease! The ideia to remove the Top Four and Bottom Four itīs great, i already didnīt do that!
Regards
Leonel Monteiro

Luciano
- 16th May 2005, 18:58
Refresh the LED display between the samples.

ardhuru
- 17th May 2005, 17:46
The software-only solution sounds great, but if you'd rather not deal with the extra code, how about a 0.1 uf (or larger) capacitor across the input?

Regards,

Anand