Go Down

Topic: Differential ADC 11-Bit? (Read 2003 times) previous topic - next topic

muschasgrazias

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:
Code: [Select]

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

AloyseTech

Hi, the differential mode is in fact only 11bit... I agree that it is not really clearly stated in the datasheet though...

muschasgrazias

Hi Aloyse,

Thank you for clarifying, now I don't have to worry about that my implementation is wrong :)

Kind regards

Molorius

The values returned are 11 bit because the 12th bit is used to show the sign, positive or negative. So while the returned decimal value has 11 bits, 12 bits of information are still maintained.

Go Up