2020-11-27 12:17 AM
Hello.
Reffering to AN4207(Doc ID 023945 Rev 1) Single ended zero reference mode (Page 9):
This mode injects an input common mode of half scale to the ADC thus maintaining the dynamic range the same as in differential mode (-32767 to +32767). In this mode, the injected common mode is dependent on gain variations.
The formula is: Vin = SDADCx_AINyP = (ReadData + 32767) * Vref/(gain x 65535)
I suspect here is a mistake. There should be -32768 (0x8000) instead of -32767 (0x8001).
And the formula should apply offset 32768 to ReadData.
Or how to explan SDADC_GetInjectedConversionValue() returning 0x8000 in case of connecting ADC input to ground?
Solved! Go to Solution.
2021-01-06 07:46 AM
Hello.
You are right. The injected value should correspond to full scale negative negative value: -32768 (0x8000). Because this should be the minimum value of final result in this single ended zero reference mode which correspond to zero analog voltage at SDADC input.
Correct formula is:
Vin = SDADCx_AINyP = (ReadData + 32768) * Vref/(gain x 65535)
Regards
Igor
2021-01-06 07:46 AM
Hello.
You are right. The injected value should correspond to full scale negative negative value: -32768 (0x8000). Because this should be the minimum value of final result in this single ended zero reference mode which correspond to zero analog voltage at SDADC input.
Correct formula is:
Vin = SDADCx_AINyP = (ReadData + 32768) * Vref/(gain x 65535)
Regards
Igor
2021-02-01 12:58 AM
Hi @glinsky ,
A new revision of AN4207 is now on the web.
The update you suggested is already there. Please keep us informed if you have any other feedback.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.