Hi guys,
I have a question:
I'am using the differential mode for a current measurement with a 1.25V negative mux.
My problem is now that I get only 11-bit back instead of 12.
The Atmel-42181-SAM-D21 Datasheet on Page 868 states:
• If the positive input may go below the negative input, the differential mode should be used in order
to get correct results.
• If the positive input is always positive, the single-ended conversion should be used in order to
have full 12-bit resolution in the conversion.
Does that mean in differential mode its not possible to get 12-Bit resolution? Its just annoying that its written like this and not stated directly like: Differential mode has only 11-Bit resolution....
My setup is like this:
ADC->AVGCTRL.bit.SAMPLENUM = ADC_AVGCTRL_SAMPLENUM_2_Val; // 2 samples
ADC->AVGCTRL.bit.ADJRES = 1; // Adjusting result by 1
ADC->CTRLB.bit.DIFFMODE = 1; // Enable differential mode
ADC->INPUTCTRL.bit.GAIN = ADC_INPUTCTRL_GAIN_1X_Val; // Gain select as 1X
ADC->INPUTCTRL.bit.MUXPOS = ADC_INPUTCTRL_MUXPOS_PIN5_Val; // Differential positive: Input
ADC->INPUTCTRL.bit.MUXNEG = ADC_INPUTCTRL_MUXNEG_PIN6_Val; // Differential negative: 1.25V
ADC->REFCTRL.bit.REFSEL = ADC_REFCTRL_REFSEL_AREFA_Val; // reference is external 2.5 V
while (ADC->STATUS.bit.SYNCBUSY == 1);
Kind regards