© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
W. GayBeginning STM32Maker Innovations Serieshttps://doi.org/10.1007/979-8-8688-0199-0_14

14. Analog-to-Digital Conversion

Warren Gay1  
(1)
St. Catharines, ON, Canada
 

Embedded computing often needs to convert an analog signal level into a digital form for analysis. One application is measuring temperature by the voltage developed across a semiconductor. It is no surprise then that the STM32 platform has both an analog-to-digital converter (ADC) and a built-in channel to the ADC for measuring temperature.

This chapter’s demonstration project will illustrate how to use the libopencm3 routines to access the ADC peripheral, reading analog channels PA0 and PA1, ...

Get Beginning STM32: Developing with FreeRTOS, libopencm3, and GCC 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.