Without knowing more, all I can tell you is that 10M is far too high a resistance for the input of a PIC to measure. If you want any kind of accuracy, you should keep the input impedance to below 4K or so. Use two 5K resistors
in series between Vcc and GND and connect the junction to the A/D input, then read the A/D and see what you get.