I don't know if you use any sort of libraries.
I Don't. I work with registers.
So, the curiosity board has a PIC16F1619 (which i never heard of, strange
from that era i used PIC16F15xx,17xx,18xx and 19xx)
The most current datasheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/40001770D.pdfREGISTER 17-1: ADCON0
The Analog channel to be sampled is selected by the CHS field.
Using C code, it's just a matter of writing
ADCON0bits.CHS = xxx;
where xxx is the number of the channel (0 for AN0, 7 for AN7 and so on)
Since your demo is using the auto sample / convert capability of the ADC module it's just a matter of adding this line, or, in other words, changing the channel, right after
adc_result_t adval = ADC_GetConversionResult();
Yes. There is a library function that does the same thing but i have no idea on how to call it, as i tend not to use libraries, esp on 8 bit PICs.
You may notice that the sample rate -per channel- is now halved, as it's going to alternate between two channels.
Will it work? Yes, in theory. In practice, unless the sample time is too short <-> the ADC source impedance is too high, you will have the expected result.