Hi, I have just browsed through the datasheet, and if I were doing it, I would set the following registers:
INTCON.7 = 0 'Disable interrupts
TRISC.1 = 1 'Set PORTC.1 to be an input
CM1CON0.7 = 0 'Disable Comparator module
CM2CON0.7 = 0 'Disable Comparator module
VRCON = 0 'Disable Voltage Reference module
ADCON0.7 = 0 'Right justify result. Assumes 10 bit AD conversion
ADCON0.0 = 1 'Enable ADC module
ANSEL.5 = 1 'Set high impedance buffer on ANS5 (PORTC.1)
Andy




Bookmarks