Hi,
I sometimes have problems with adc_in. Try this piece of code where you want to adc_in:
Succes,Code:ADCON0.1 = 1 'Start ADC conversion while ADCON0.1 = 1 :wend 'Wait for ADC DONE RefADC.highbyte = ADRESH 'Move HIGH byte of result to adcVAL RefADC.lowbyte = ADRESL 'Move LOW byte of result to adcVAL CellA = CellA + RefADC 'Add latest ADC reading to running total
UB
Bookmarks