noobie,

I think it's just a banking problem.

Before entering the Main loop, you change to bank1 and load ADCON1 and TRISB. Then in the loop you are testing and trying to set bits in PORTB, which is in bank0 or bank2.

Put a clrf STATUS before entering the loop and it should work better.
<br>