Nope, it disable all ADC channel <7:0>.Code:'This Part set PORTA 0-5 an analog inputs ADCON1 = %111 'FRC (clock derived from a dedicated internal oscillator = 500 kHz max) ANSEL = 0 'The ANSEL (91h) and CMCON0 (9Ch)registers must be initialized to configure an CMCON0= 0 'analog channel as a digital input. Pins configured as analog inputs will read ‘0’. TRISA = %00011111 'set PORTA 0-5 as inputs
http://ww1.microchip.com/downloads/e...Doc/41250F.pdf
PDF page 45, Ansel Register.
should be
ANSEL = %00011111
PDF page 183, ADCON1
ADCON1 should be
ADCON1=%01110000
To disable comparators, cm<2:0> bits have to be = to 111
so PDF page 118, CMCON0
CMCON0=%00000111





Bookmarks