This repository contains embedded C projects developed for the Texas Instruments TM4C1294NCPDT microcontroller (ARM Cortex-M4F) as part of the Microcontroller Lab course at HAW Hamburg. Each project demonstrates hands-on use of core MCU peripherals — ADC, PWM, UART, GPIO — with interrupt-driven design patterns.
microcontrollerProjects/
│
├── LED_Pendulum_UART_Display/ # Project 1 — UART-controlled LED pendulum display
├── LED_Dimmer_XY_Joystick/ # Project 2 — PWM LED dimmer via analog XY joystick
├── Digital_Multimeter_WeightedConversion/ # Project 3 — Digital voltmeter using weighted conversion
│
└── README.md
Folder: LED_Pendulum_UART_Display/
Displays characters typed on a PC onto a swinging LED pendulum in real time via UART. The microcontroller receives ASCII characters, maps them to a bitmap font, and renders them column by column as the pendulum swings.
| Feature | Detail |
|---|---|
| Communication | UART0 — PC to MCU character streaming |
| Display | 10-character string rendered on LED pendulum (5×5 bitmap font) |
| Interrupt sources | UART RX interrupt + GPIO button interrupt |
| Display modes | Toggle between red-on-black and black-on-red via push button |
| Supported chars | A–Z, 0–9 (ASCII 0x41–0x5A) |
Key files:
main.c— main loop and peripheral configurationint_handler.c / .h— UART and GPIO interrupt handlersint_handler_invert.c— inverted display mode handler5x5_font.h— bitmap character definitionstm4c1294ncpdt_startup_ccs.c— CCS startup file
Folder: LED_Dimmer_XY_Joystick/
Controls LED brightness using a 12-bit ADC reading from an analog XY joystick. PWM duty cycle (5%–95%) is adjusted based on joystick position, with a button to toggle between full and minimum brightness.
| Feature | Detail |
|---|---|
| ADC | Internal 12-bit ADC (Sequence 0) reading joystick X-axis |
| PWM | 1 kHz square wave via Timer2, duty cycle 5%–95% |
| Joystick behavior | Right → increase brightness · Left → decrease · Center → hold |
| Button behavior | Toggle full ↔ minimum brightness |
| Interrupt sources | Timer interrupt for PWM · GPIO for button |
Key files:
main.c— ADC polling, PWM control logicint_portM_handler.c / .h— GPIO port M interrupt handler
Folder: Digital_Multimeter_WeightedConversion/
Measures an external analog voltage using the Weighted Conversion Method with an external DAC and the TM4C1294 ADC. The result is displayed as a 4-digit BCD value (e.g. 12.34) on a BCD display.
| Feature | Detail |
|---|---|
| Method | Weighted (successive approximation) conversion |
| Interface | External DAC + TM4C1294 ADC |
| Output | 4-digit BCD display (integer + decimal parts) |
| LSB resolution | ~0.0195 V |
| Build system | CMake (CLion / GCC toolchain) |
Key files:
main.c— conversion logic, BCD display outputCMakeLists.txt— build configuration
| Property | Value |
|---|---|
| MCU | Texas Instruments TM4C1294NCPDT |
| Architecture | ARM Cortex-M4F @ 120 MHz |
| Flash / RAM | 1 MB / 256 KB |
| Peripherals used | GPIO, ADC, PWM (Timer), UART0 |
| IDE | TI Code Composer Studio (CCS) / CLion |
- TI Code Composer Studio or CLion with GCC ARM toolchain
- TM4C1294 LaunchPad or compatible evaluation board
- TivaWare peripheral driver library
- Import the project folder into Code Composer Studio
- Select the correct target device:
TM4C1294NCPDT - Build → Flash via JTAG/XDS110 debugger
- Open a serial terminal (115200 baud) for UART projects
cd Digital_Multimeter_WeightedConversion
mkdir build && cd build
cmake ..
make