HI,
I'm newbie with adcin... I wrote this little prog for a pic16f87x, and it works fine.
DEFINE OSC 4
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
bat var word
temp VAR WORD
ADCON1 = 0

TRISB = %00000000
PORTB = 0

TRISA = 255
PORTA = 0
startval:
GOSUB measure
serout2 portb.0,84,[DEC bat," ",DEC temp," "]
PAUSE 1000
GOTO startval

measure:
ADCIN 0,bat
adcin 1,temp
RETURN

But now, I would like to use a pic18f1220 and there is something wrong... the value for "temp" is now always the same as "bat" (adcin 0 versus adcin 1).

Someone can explain ?
regards
Herve