Skip to main content
SBENS.1
Visitor II
May 21, 2021
Question

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 ?

  • May 21, 2021
  • 1 reply
  • 592 views

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. 

This topic has been closed for replies.

1 reply

Simon V.
ST Employee
May 24, 2021

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.