Hello i try to understand the use of the adc converter in 12f683.
i have found som code on the internet but i dont know how to modify.

i have testet this code and it works . this give me a 8bit result from AN3
and present the result as a stream of pulses on GPIO.1 just to monitor the funktion of the adc.

can someone help me modify the code for this so i can read AN0 + AN1 and store them as adval1 and adval2.
the rest of the ports are digital i/o.

the workin example code.

' Define ADCIN parameters
Define ADC_BITS 8 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS
ANSEL = %00111000 ' Set AN3 analog, rest digital
CMCON0 = 7 ' Analog comparators off

adval Var byte ' Create adval to store result
GPIO.1=0
Pause 500 ' Wait .5 second for LCD to init
mainloop:
ADCIN 3, adval ' Read channel 3 to adval

Pulsut: 'pulses
high GPIO.1
pause 5
low GPIO.1
pause 5
adval=adval - 1
if adval>0 then pulsut
pause 100
Goto mainloop ' new reading.
End