Hi Ioannis,

I think your while loop needs to be

ADCON0.1=1
WHILE ADCON0.1=1
wend