VGA Tester

From On-signal: Projects & Research

Jump to: navigation, search
Yep
Yep
The finished board
The finished board
View of VGA connector - solder side
View of VGA connector - solder side
PIC VGA: The setup
PIC VGA: The setup
PIC VGA: The circuit
PIC VGA: The circuit
This 37
This 37" did not cooperate.
It also works on modern monitors...
It also works on modern monitors...

The VGA tester is a simple circuit with a microcontroller which shows a test screen on a VGA display. It is a research project for my final graduation project at the Rietveld Academy. I did a workshop about it at Linux Wochen Linz '09 in April 2009.

Next up: one at the Hardhack festival in c-base, Berlin and one at Mediamatic, Amsterdam.

Contents

Downloads

The assembly code and docs on how to make your own box are here:

Tech

I started out by looking for programs for this PIC that already did this, and finally arrived at a page which had code for generating VGA on a 16F84 (which is kind of similar). HOwever, after porting it to my 16F628A (only some small code changes), I could not get it to work. So I started all over and read about VGA theory.

The tinyvga.com site has a nice page with VGA timings, which I used extensively. For testing I put a computer in 640x480@60hz mode (which is the most basic VGA mode), and started by using the VGA signals that the computer generated. First I soldered a bridge (2 female VGA plugs which I connected using a breadboard) so I could easily decouple the hsync and vsync signals. Then, I started writing a very simple program for just generating the HSYNC signal. After a while, this worked; it turned out I needed exactly 31 instructions for the required 31.1 khz HSYNC. Then, I started generating the data signal, only the green line, in between the hsync pulses. This also worked and now I only needed to replicate this code 480 times and put a VSYNC signal after it, together with "blank" HSYNCs.

The final assembler code got a bit ugly (hey, it's assembler... and my FIRST real assembler project!) so before I release it I'll clean it up. I'm also planning to add a very simple video memory to it; I hope to gain some 15x15 pixel space with the 4mhz.

Another TODO is to get it working with the PIC's internal 4mhz oscillator: that should work as well but so far I could not get it running. Maybe it is not precise enough; I'll need some electronics expert to help me with this.

Demo

Quick demo:


Resources

These links were quite helpful with creating the code to do the VGA timings and programming PICs in general.

Personal tools