Hello everyone. I am using the A-to-D module of a PIC 16F877A to convert the value of a certain voltage on RA0 into a digital number. The voltage comes from a drop across a 1-k potentiometer. I was wondering if I am supposed to have a capacitor at the RA0 pin with the gorund in order to clean up the signal or make the conversion better. Your advice is much appreciated.
You can try it without the cap, but I think everyone here would recommend a cap to filter out "wiper noise". I would also use a larger pot if there is one available, as it will draw much less current. If it will be battery powered use a higher value.
I wouldn't worry about it - there's usually no need for a capacitor, it will simply slow down the response time. There's even an internal capacitor in the sample and hold.
As for the value of the potentiometer, bear in mind the recommended minimum source impedance feeding the analogue pin - I would suggest going no higher than 4.7K