Search this site
Embedded Files
  • Home
  • Projects
 
  • Home
  • Projects
  • More
    • Home
    • Projects

Arcane Ascension

 Embedded C Handheld Game Project 

Introduction

The final project for UT Austin's Introduction to Embedded Systems class required designing a PCB with a display, speaker, and input peripherals that interfaced with a TI MSPM0 MCU evaluation board. We then had to program the MCU in C to render a playable game on the screen and handle real-time button inputs to drive the gameplay logic. 

My goal was to build a Pong-inspired game with a twist: three independent objects bouncing around the screen while the player controls a character using 2 buttons and tries to dodge all three objects for as long as possible. My design used an LCD display interfaced to the Arm Cortex-M0+ MCU over SPI, a 12-bit ADC driven by a slide potentiometer, and a speaker driven through the onboard 12-bit DAC for real-time audio feedback. I wrote low-level C firmware to configure registers, manage interrupts, and read button inputs via GPIO, enabling responsive gameplay and smooth on-screen rendering. 

PCB Schematic and Layout

I captured the design in KiCad by starting from the MCU board header pinout and then building labeled interfaces for every subsystem. In the schematic, I mapped the LCD screen to the MCU’s SPI signals and brought over the required 3.3 V and ground connections, then added discrete input peripherals pushbuttons with pull resistors for stable logic levels) and status LEDs with current-limiting resistors. For analog features, I tied two potentiometers into ADC-capable pins for tunable gameplay parameters and routed the DAC output to a small speaker stage, using a resistor network to condition the signal and provide safe drive characteristics. Once the schematic was validated, I translated it into PCB layout by placing the evaluation board header footprint as the anchor, grouping the buttons at the board edge for ergonomics, and keeping the analog (ADC/DAC) nets compact and separated from fast digital lines. I then  poured a solid ground reference and verified clear 3.3 V distribution to each block. Finally, I checked connectivity/DRC and fixed any errors to ensure the board would reliably interface with the MSPM0 evaluation board.

Display

For the display portion of the project, I used the ST7735 graphics driver to initialize and control the 160×128 LCD over SPI, then built the entire UI by drawing bitmaps, text, and simple shapes. In main(), I configured the screen orientation with ST7735_SetRotation(1) and rendered a start screen using ST7735_DrawBitmap(...). I used the same code for all the static screens. During gameplay, the display loop continuously updates the scene by drawing the player sprite bitmap at the ADC-controlled x-position, rendering enemies as moving circles with ST7735_DrawCircle(...), and “erasing” old frames by redrawing the previous object positions in black before drawing the new positions in color. I also displayed live HUD data (Lives/Score) with cursor-positioned text output, and on game-over I cleared the screen, displayed an end-screen bitmap, and printed the final score, keeping all LCD drawing in the main loop to maintain smooth refresh and avoid timing issues.


Final Game

Overall, this project tied together my hardware and firmware skills end-to-end: I designed a custom PCB to interface with the MSPM0 LaunchPad, then wrote low-level C code to drive the SPI LCD, read user inputs, and generate DAC-based audio for a complete, playable system. The final result is a polished, responsive game demo that I showcase in the video below.

IMG_8782.MOV

Get in touch at ashwintx@gmail.com

Google Sites
Report abuse
Page details
Page updated
Google Sites
Report abuse