TRISA = 3 and ADCON1 should be out of the loop...