Re: Adc Non DMA in dsPIC33EV256gm106 Alternative sampling issues.
I would check AD1CON2 value. If you sample 4 channels simultaneously you will have 4 conversation followed by. If you get the interrupt after 2 the data in the buffer will not be ready. Also after at the second interrupt you will have data still from MUXA.
The correct value for the SMP bits is 0b00011.
Also the AD1CON1bits.DONE bit will clear automatically at the end of the sampling. You find this bit high only because the conversation is not yet done. You don't need the while loop too.
And there is a note from page 294:
"Do not clear the DONE bit in software if auto-sample is enabled (ASAM = 1)."
Which is your case.