I'm glad to hear you got it working, but ADCON1 has no affect on PORTB.

PORTA is the 16F876 A/D port.

AN4 = RA5
AN3 = RA3
AN2 = RA2
AN1 = RA1
AN0 = RA0