ADCON1 = %00000100 will set adc reference to external , is that what you want ? have you provided an ext reference ?

I assume you have the pot connected to an0 of course