Hi,

ADCON1:
Bit 7 is not used
Bit 6 is not used
Bit 5 sets the negative reference
Bit 4 sets the positive reference
Bit 3-0 sets the pins to Analog or Digital according to the table.

So,
ADCON1 = 0 should do it.
That will assign Vdd and Vss as pos/neg reference for the ADC and set all 13 inputs to analog.

The state at startup depends on the PBADEN configuration bit. (See note 1 just under the table)

As the table shows you can not use AN12 only as analog, if you need one channel only set ADCON1 to 14 and use AN0.

Dont forget to check if there are other functions on any of the pins that need's to be turned off. (Comparators is a classic example)

/Henrik Olsson.