Do you use DMA?
You are reading ADCBUF0 all the time.
I think some dsPICs have dedicated ADCBUFx for every analog pin, others just use ADCBUF0 for every conversion.
You also need to configure other stuff...
Tell adc to scan channels:
AD1CON2bits.CSCNA=1; //SCAN INPUTS FOR CH0+
Tell adc to convert for instance CH0:
AD1CON2bits.CHPS=0; //CONVERT CH0
Select which channels to scan:
- AD1CSSH
- AD1CSSL
The analog channels and if you have two ADCs on board both configuration must be identical for registers:
- AD1PCFGH
- AD1PCFGL
- AD2PCFGH
- AD2PCFGL
The dsPIC ADC can be a pain to configure.