Thank you.
For this particular chip the ANSEL is used instead of ADCON1?
Would I still need to set up the ADCON0 if the ANSEL is set up?
Would you only disable the analog comparator when using a digital input?
Here's what I have now:
DEFINE OSC 8 'Oscillator speed in MHz
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 15
OSCCON = %01110000 ' Set internal OSC to 8MHz
ANSEL = %00001111 ' Set AN0-AN3 analog, rest digital
TRISIO.5 = 0 ' GP5 is output
ADCON0.7 = 1 ' Right justify for 10 bit result
INTCON = %00000000 'all interrupts OFF
Thanks again,
Tony
Originally Posted by Bruce
Bookmarks