Quote Originally Posted by ultiblade View Post
Hi,

I sometimes have problems with adc_in. Try this piece of code where you want to adc_in:

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
Succes,
UB
That seems to be doing the trick! Cheers.