9

Analog-to-Digital Conversion

This chapter covers a very important topic of analog-to-digital conversion. The devices that actually do the conversions are called analog-to-digital converters (ADCs). The STM line of MCU has a good variety of ADCs; however, they all operate and are programmed in a similar manner. There is a single ADC used in the project board STM32F302R8 MCU. However, it can accept analog inputs from any 1 of 15 separate external lines. There is a sixteenth ADC input, but it is permanently connected to an internal temperature sensor and is not available for any other use.

Beginners in the embedded development sometimes question the need for an ADC peripheral. The answer is that measurements in the real world are taken typically ...

Get Programming with STM32: Getting Started with the Nucleo Board and C/C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.