Thanks, but I just tried that & still get the same results, a maximum of 3 as the a/d result. I have tried chips from different batches, various settings for the adc clock, I am using a 8MHz resonator for the clock. I have measured the voltage on the pin (pin 17), and it varies from 0 to 5V. I have used the 818 in the past with no problems. That time I had a 20MHz osc, so I used clock / 64, i.e. ADCON0 = 129, ADCON1 = 206 and it worked fine. I just cant see why it wont work.

Oh well I'll keep trying....