cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0xx ADC MAX Vref and Converted Value

gerhard
Associate II
Posted on June 22, 2016 at 18:29

It is recommended to use DMA for multiple ADC channels, and I spent too much time trying to switch between channels manually.

So I used STM32CubeMX to get DMA working for ADC1_Channel_0 and Channe_1

It seems with 3V3 for VDDA, I read a max of 4033 out of 4096 for 12 bit ADC.

I know 3V6 is the VDDA MAX for the ADC.

1)

How do I calculate what the ADC value should be, for a certain input voltage.

I need to have a number od set points, but to practically measure them is time consuming.

2)

What is the actual Voltage that will cause a ADC value of 4095

(I know I can practically measure it)

Any help appreciated
1 REPLY 1
Posted on June 22, 2016 at 18:48

For a 3.3V VREF (VDDA)

millivolts = (3300 * sample) / 4096;

Where 4095 would get you 3299, some people use a 4095 divisor but I don't think it makes much difference, and the math is more efficient with 4096.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..