You want to write directly to ADCON1 so you have at least Fosc/8 for 4MHz.
ADCIN doesn't do this for you - so your AD conversion clock is way too fast with ADCON1 = 0 by default.
You want to write directly to ADCON1 so you have at least Fosc/8 for 4MHz.
ADCIN doesn't do this for you - so your AD conversion clock is way too fast with ADCON1 = 0 by default.
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
Hi Russ,
DEFINE ADC_CLOCK xx only works if the clock select bits are in ADCON0, so just write directly to ADCON1 to set the conversion clock. ADCON1 = %00110000 for RC, ADCON1 = %00010000 for Fosc/8 (recommended).
Bookmarks