VGA Graphics Controller

Build a VGA signal generator that displays graphics on a real monitor—create video timing, frame buffers, and pixel output.

Overview

This project generates proper VGA video signals to display graphics on a real monitor. You'll build timing circuits for horizontal and vertical sync, a frame buffer in RAM to hold pixel data, and a DAC to convert digital color values to analog VGA signals. This is how the first video cards worked!

Components Needed

  • 1x 25.175MHz crystal oscillator
  • 3x SN74HC393 IC (Binary Counter)
  • 2x SN74HC138 IC (Decoder)
  • 2x SN74HC00 IC (NAND)
  • 1x 6116 SRAM (or similar)
  • 12x R-2R DAC resistors
  • 1x VGA connector (female)
  • manyx Wires

Instructions

  1. Build Horizontal Counter

    Use cascaded binary counters driven by the 25.175MHz pixel clock. Count 0-799 for each horizontal line, then reset. Generate Hsync pulse during counts 656-751.

  2. Build Vertical Counter

    Increment the vertical counter each time horizontal counter resets. Count 0-524 for each frame. Generate Vsync pulse during lines 490-491.

  3. Generate Blanking Signal

    Create a blanking signal that's active during non-visible portions (porches and sync periods). This forces RGB outputs to black during retrace.

  4. Build the DAC

    Create three R-2R ladder DACs (one each for Red, Green, Blue). Each converts digital color bits to the 0-0.7V analog levels VGA expects.

  5. Add Frame Buffer

    Connect RAM with address lines driven by the X/Y counters. Data output goes through the DACs. For simplicity, start with low resolution (e.g., 64x48 with pixel doubling).

  6. Wire the VGA Connector

    Connect: DAC outputs to RGB pins, Hsync and Vsync to sync pins, grounds to ground pins. Power on and you should see a display on the monitor!

Challenges

  • Implement character generation for text display
  • Add sprite overlays for game graphics
  • Build a graphics command processor for drawing primitives
  • Increase resolution or color depth