2021-09-01 01:13 PM
I am using STM32F303REx to measure Voltage and Current from ADC (differential Input). Is there -+ values around 0 or are they offset around 4096/2 Offset that must be subtracted to get a signed value? Is there any documentation or Examples?
2021-09-01 02:52 PM
There is this example:
The comments include the simple conversion:
ADC Differential conversion result calculation:
- An offset of half of full range is added to keep the full dynamic range of differential voltage.
- Channels voltage is divided by 2, resolution is lowered of 1 bit.
=> Diff conversion result = mid-range + (channel_high-channel_low)/2
Assuming you have a 0-3.3V range:
Note that you input values still need to be within the 0V to VDDA range.
I would image this info is in the reference manual as well.
2021-09-01 02:55 PM
Just a note: don't forget to read the errata (ADC differential mode: common mode input range).
JW