I have designed a circuit around the 16F887, with a resistor/capacitor combination on PortA.6 being read with the 'pot' command.

Earlier, I had these connected to PortA.5, had wierd results, and realised that that pin was a Schmitt input.

Now, things are fine on the workbench. However, the capacitor is to be located remotely as a sensor (about 50 meters), and when I did this using a standard non-shielded 2 core wire, the readings are no more consistent.

My question, before I buy the cable, is would shielded cable perhaps help?

Or would co-ax cable, the kind used for cable TV be even better?

Or neither, I need to look at another solution altogether?

Also, if I use either of the above, can this cable be run in close proximity of the mains without the readings going haywire again?

Any advice would be highly appreciated, folks!

Regards,

Anand Dhuru