Damn Edit function is inoperative ! OK I'm 3 beers into a 12 pack right now, UM Firewater's got my N/A blood flowing now. From your code . . .
<b><I>ADCON1=%00000111 ;Sets the Analog to Digital control register</I></b> seems to me ADCON1 = 7 makes all ports digital.