cancel
Showing results for 
Search instead for 
Did you mean: 

Hi , I want to use a 10-bit AD acquisition chip to interface with analog sensors , I know that the stm32 has an integrated ADC chip with the resolution of 12-bit. How can I read the values correctly ?

SBENS.1
Associate

I am seeking flexibility when it comes to the pins that I will use to read from these sensors that's why I am not using the analog inputs directly. 

1 REPLY 1
Simon V.
ST Employee

Hello SBENS,

You can refer to application note AN2834 - How to get the best ADC accuracy in STM32 microcontrollers.

If you analog sensor is for example 500mV and you are using STM32 analog reference VREF+=3.3V -> you must apply the following formula :

ADC code = VIN x (2^N) / VREF+ = 0.5 x 4096 / 3.3V = 621 LSB decimal code.

Do you need further information ?

Regards,

Simon

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.