PORTB has no analog functions on the 16F87.

Have you disabled the WDT?