Electronic – RC filter infront of Analog port pins in pic microcontroller

adcmicrocontrollerpic

What is the use of RC filter in front of Analog port pin while using port pin for analog to digital conversion in pic 16f877A and in most pic controller the RC filter is advised to be used?

Best Answer

A lot of MCUs take a pulse of current to "charge" the internal sample and hold circuitry (part of the integrated ADC). If the series resistance of the signal source is too high, it won't charge the internal cap sufficiently and there will be an error in the conversion.

Applying a capacitor from the pin to ground means that there is a much greater chance of this working because the external cap can supply the current needed. See this SE post (relating to PIC input impedance) and check out the answer.

enter image description here

Of course this makes a low pass filter that is also useful for anti-aliasing.