Strange goings on with pic32mx274 a2d.
Been working on a transistor curve tracer using PWM outputs to generate voltages and 2 A2D channels to read in outputs from transistor.
The NPN transistor channel worked a treat but the PNP channel was about 2 volts off on the transistor output.
Spent a good hour tracing problems but couldnt find any until I looked at A2D input for that channel and the volts were wrong.
It seems my PICKIT3 was interfering with the A2D input on A2D channel 2.
I disconnected it and all was ok.
That a2d input is also a programming pin. I have put a resistor in series with it so I could still program the device while getting analogue data in.