I am using a PIC18F2220. AN2 is impacted by AN1. I think I have the compators turned off, but AN2 is acting like they are on.... ANy ideas. Thanks
This is how I have initialized the analog...
ADCON0 = %00000001 ' Enable A/D
ADCON1 = %00001100 ' Anolog AN0-AN2, all else digital
ADCON2 = %10000111 ' right justify result
CMCON = %00000111 ' Comparators OFF to allow inputs on pins CMCON = 7
INTCON = %00000000 ' all interrupts OFF
Define ADC_BITS 10 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS
Bookmarks