The ADC input clock is generated from the PCLK2 clock divided by a Prescaler and it must not exceed 14 MHz. The analog watchdog feature allows the application to detect if the input voltage goes outside the user-defined high or low thresholds. The result of the ADC is stored in a left-aligned or right-aligned 16-bit data register. A/D conversion of the various channels can be performed in single, continuous, scan, or discontinuous mode. It has up to 18 multiplexed channels allowing it to measure signals from sixteen external and two internal sources. The STM32F103C8 (Blue Pill) & STM32F432KC have a 12-bit ADC which is a successive approximation analog-to-digital converter. The ADC Tutorial down below is a complete introductory guide for this topic and highly recommended. And the flexibility also to make a lot of decisions like sacrificing resolution in exchange for a higher resolution or having the ADC to trigger on an internal timer signal to periodically sample the analog channels, and much more as we’ll see in this tutorial.įor those who like to have a solid introduction in ADC, how it works at the low level, different types of ADCs, ADC errors, equations, and all other details. Therefore, it’s a valuable resource in microcontrollers and different manufacturers provide us (the firmware engineers) with various features so as to make the best use of it. The ADC is one of the most expensive electronic components especially when it does have a high sampling rate and high resolution. The ADC does the counter operation that of a DAC, while an ADC (A/D) converts analog voltage to digital data the DAC (D/A) converts digital numbers to the analog voltage on the output pin.
#Blue pill schematic pdf code
And it performs a process called quantization so as to decide on the voltage level and its binary code that gets pushed in the output register. The ADC samples the analog input whenever you trigger it to start conversion. 8 STM32 ADC Resolution, Reference, Formulas Īnalog-To-Digital Converters (ADC) PrefaceĪn 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.
![blue pill schematic pdf blue pill schematic pdf](http://cholla.mmto.org/stm32/blue_pill/stm32f103c8t6_schematic.png)