How to calculate ADC value in stm32f103c8?

How to calculate ADC value in stm32f103c8?

The value will increase from 0 to 4095 based on the value of voltage per step, which can be calculated by formula VOLTAGE / STEP = REFERENCE VOLTAGE / 4096 = (3.3/4096= 8.056mV) per unit. As computers store and process only binary/digital values (1’s and 0’s).

What is the ADC value in STM32 blue pill?

As mentioned earlier, the ADC in STM32 Blue Pill has a resolution of 12-bits. So, the range of ADC values in STM32F103C8T6 is from 0 to 2­12 – 1 i.e. 0 to 4095. Based on the analog voltage, the value will increase in steps.

Is the stm32f103c8t6 an analog or digital microcontroller?

But the problem with Microcontrollers (be it STM32F103C8T6 or Arduino) is that they are digital “beings” and cannot work with Analog values. Hence, we have to first convert the analog value into Digital values before giving them to the Microcontroller for further processing or analyzing. Analog to Digital Converters are used for this purpose.

What is the reference voltage on the STM32?

The reference voltage is equal to the voltage at which the microcontroller is operating. When the STM32 board is powered via USB cable then the operating voltage is 3.3V. You can also measure the operating voltage by using a multimeter across the Vcc and ground pin on the board.

How does an ADC converter work in a computer?

An ADC (Analog-To-Digital) converter is an electronic circuit that takes in an analog voltage as input and converts it into digital data, a value that represents the voltage level in binary code. The ADC samples the analog input whenever you trigger it to start conversion.

How is the sampling time calculated in STM32?

STM32 ADC Sampling Time ADC samples the input voltage for a number of ADC_CLK cycles which can be modified using the SMP [2:0] bits in the ADC_SMPR1 and ADC_SMPR2 registers. Each channel can be sampled with different sample times. The Total ADC Conversion Time is calculated as follows:

What is the operating voltage of the STM32?

When the STM32 board is powered via USB cable then the operating voltage is 3.3V. You can also measure the operating voltage by using a multimeter across the Vcc and ground pin on the board. So the above formula fits into our case as shown below