CONTENTS

Home
Electronics
Graphics
Java
Java Mobile
Android / iOS
Other Stuff
Music
Resume
Contact





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). Btw, anyone interested in reading about video timings, I found this page quite useful: http://www.epanorama.net/documents/pc/vga_timing.html.

I have a video of vga2.vhd working on YouTube.com: http://www.youtube.com/watch?v=YcRCNr78GuQ.

Related Projects @mikekohn.net

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

Pictures

This is the Spartan 3 starter kit from Digilent.

(Click image for bigger picture)

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 :).

(Click image for bigger picture)

This is vga2.vhd. This is an animation of a square changing colors really fast and bouncing around the screen. I put a video for this on YouTube here http://www.youtube.com/watc h?v=YcRCNr78GuQ. All source code is downloadable at the bottom of this page.

(Click image for bigger picture)

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.

(Click image for bigger picture)

Links

Digilent - This is the web site where I got my FPGA starter kit from. They have some really nice stuff there.

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-2014 - Michael Kohn