Embedded Systems··C, Assembly

STM32 Analog to Digital Converter, Timers & USART

Embedded systems project exploring the use of ADC, timers, and UART on an STM32 microcontroller.
Developer

STM32 Analog to Digital Converter, Timers & USART is an embedded systems project carried out on an STM32 Nucleo-64 board, aiming to understand how different peripherals interact in a microcontroller environment.

The goal was to combine timers, analog-to-digital conversion, and serial communication into a single coherent system — a small but complete embedded application built in C.


Technologies

STM32 Nucleo-64

A popular development board based on the ARM Cortex-M3 architecture, ideal for learning embedded systems.

C Programming

The primary programming language used for low-level hardware interaction and peripheral control.

Assembly

Used for critical sections requiring precise timing and low-level hardware access.


About the Project

The project explores three key parts of the STM32 ecosystem:

  • PWM (Pulse Width Modulation) — controlling the brightness of an LED by adjusting the duty cycle of a signal.
  • ADC (Analog to Digital Converter) — reading analog input from a potentiometer and internal temperature sensor.
  • UART (Serial Communication) — sending sensor data to a computer every second via the serial port.

Together, these elements form a simple data acquisition and visualization system, where sensor readings are measured, processed, and transmitted automatically.


My Role & Contributions

As the developer, I was responsible for the full setup and integration of the STM32 peripherals:

  • Configured timers to generate periodic interrupts and PWM signals.
  • Programmed the ADC to capture analog values and convert them to digital readings.
  • Implemented UART communication to send temperature and voltage data to a serial monitor.
  • Used interrupts to manage synchronization and improve real-time behavior.

This required a solid understanding of register-level programming, microcontroller architecture, and data flow between peripherals.


Example of Integration

Every second, the system:

  1. Reads the potentiometer and temperature sensor using the ADC.
  2. Adjusts the LED brightness proportionally through PWM.
  3. Sends both readings to the serial monitor via UART.

This cycle runs autonomously through timer interrupts, illustrating how STM32 peripherals cooperate without relying on an operating system.


Skills Developed

  • Embedded C programming for hardware-level control.
  • Timer and interrupt management for periodic task execution.
  • Signal acquisition and processing using ADC.
  • Serial communication protocols (UART).
  • Understanding of low-level system design on ARM Cortex-M architectures.

Summary

This project offered a practical introduction to embedded systems engineering, bridging software logic and hardware control.
It demonstrated how to design reliable, low-level systems capable of interacting directly with physical components — a crucial foundation for real-time and IoT applications.