CONTENTS

Home
Updates
Software
Electronics
Music
Resume
Contact


YouTube
Twitter
GitHub
LinkedIn


VGA Graphics On An FPGA

Posted: April 20, 2008

Introduction

This is my first FPGA project. I got this Xilinx Spartan3 FGPA starter kit which came with 5 pins hooked up to a VGA port. Basically all it does is takes the 50MHz clock crystal and halves it to 25MHz. This creates a VGA clock where each pixel is 1 clock cycle. It uses a 10 bit counter for doing the horizontal timing and a 10 bit counter for the vertical timing. Using these counters it calculates when to apply voltage to the horizontal and vertical sync pins and data on the red, green, and blue pins. Coding was all done in VHDL (source code is below).

I have a video of vga2.vhd working on YouTube.com:

https://youtu.be/YcRCNr78GuQ

Update (2014-Sep-02): I did a new VGA project recently in Java with a more full explanation on how VGA works here: Java VGA

Related Projects @mikekohn.net

VGA: FPGA VGA, SX VGA, Atmel VGA, Propeller Poker, Nexys2, Java VGA

Pictures

Spartan 3 starter kit

This is the Spartan 3 starter kit from Digilent.

Spartan 3 VGA color bars

This is vga.vhd running on my old Gateway monitor. I didn't want to risk doing something dumb and blowing up a CRT I liked :).

FPGA VGA bouncing square

This is vga2.vhd. This is an animation of a square changing colors really fast and bouncing around the screen. All source code is downloadable at the bottom of this page.

Nexys2 FPGA VGA color bars

Update June 12, 2011: I updated the ucf file for the Digilent Nexys2 board and made vhdl file for it. The colorbars and square move around the screen in this. For information on how to compile and run this from the command line on linux see here.

Source code

VGA Project 1: vga.vhd vga.ucf
VGA Project 2: vga2.vhd vga2.ucf
Nexys2 VGA: vga_nexys2.vhdl vga_nexys2.ucf

Copyright 1997-2024 - Michael Kohn