2021-05-21 1:32 AM
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.
2021-05-24 1:58 AM
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.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.