← all projects
case study

Morse Code Trainer

A game that teaches you Morse code, running on bare FPGA silicon — RISC-V assembly coordinating audio, VGA graphics, and keyboard input entirely through interrupts.

  • C
  • RISC-V Assembly
  • FPGA

A game that teaches you Morse code, running on bare FPGA silicon. Built with Darshan Kasundra at the University of Toronto: a RISC-V embedded system where audio, video, and keyboard input are coordinated by asynchronous interrupts — no operating system underneath.

The hard part: everything is an interrupt

  • Timing-precise dots and dashes generated in real time through an 8 kHz audio FIFO with interrupt-driven buffering.
  • A VGA pipeline with vsync-synchronized double buffering — 307 KB of memory managed across two frame buffers for flicker-free rendering.
  • PS/2 keyboard input decoded and validated against a 26-character lookup table for live scoring.

The game engine

A five-state engine with interrupt-safe transitions runs the whole experience — listen, answer, score, repeat. Getting state changes to survive interrupts firing at the wrong moment was the best crash course in concurrency I've had.

Browse the other projects