Hi

This is the first time I will use a 16F876 asfar as i can read in the forum, some confusion on the port configuration:

I need to have:
RA0-RA3,RA5(AN4) analog in (10bit ADC), RA4 digital out,
RB0-RB3 + RB6,7 digital out,RB4,5 digital input,
RC0-RC5 digital out,RC6+7 TX+RXD usart

I think i have to set:

ADCON1= %00000010 ' sets RA4 to digital,RA0-3,RA5 analog in, (Bit 7 ? Left or right justified ?)
Trisa %00101111
Trisb %00110000
Trisc %10000000

ADCON0= ?
CMCON= ?
how do I set 10bit ADC ?