cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to find any information about what the values I would read using Differential inputs from ADC's on STM32F303. IS there Documents about Differential input (what the output would be)?

DWise.1
Associate II

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?

2 REPLIES 2
TDK
Guru

There is this example:

https://github.com/STMicroelectronics/STM32CubeF3/blob/86346f63f25b859f93f9603837dcd5be28e8e7bf/Projects/STM32303E_EVAL/Examples/ADC/ADC_DifferentialMode/readme.txt

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:

  • 3.3V input -> 4095
  • 0V input -> 4095/2
  • -3.3V input -> 0

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.

If you feel a post has answered your question, please click "Accept as Solution".

Just a note: don't forget to read the errata (ADC differential mode: common mode input range).

JW