testing the video card

tests

does it work?

The first test that I want to perform is to see if the video card is outputting the right siganls. If these are not correct, it won’t matter if the rest is working! I have connected the video card to the computer and if you look at figure 9, you will see that the video card’s horizontal and vertical sync is working, as the monitor has correctly said that it is set up for 640 x 480, 60 Hz.

VGA card 640 x 480 test
figure 9. monitor confirms correct vertical and horizontal sync

can I use a 25 MHz instead of 25.175 MHz?

Now that I have established that the video card is outputting the correct signals, I want to test if my circuit will still generate sync and blanking signals that are still in spec, when using a 25 MHz clock. Although the VGA specification calls for a clock frequency of 25.175 MHz and you can buy 25.175 MHz crystal oscillators, 25 MHz ones are easier to find, which would add another option for anyone who wishes to build this but has struggled to find one. The reason why I think that this could still work is that there is some tolerance built into the VGA specification. VESA (an organisation that defines technical standards, including VGA) allows for a tolerance of 0.5%. This means that the lowest clock frequency should be 25.049125 MHz. Although this is above 25 MHz, it’s close enough that I think it’s worth trying!

displaying an image

The next test is to see if I can get the video card to display an image on the monitor. The way that I plan to do this is to take an image that is in the PNG format and break it down into bits and place it onto the eeprom that is connected to the video card. This conversion needs to happen because a PNG file is compressed data and the EEPROM needs uncompressed data. Therefore, we need to decompress the PNG file

conclusion

I have designed, built and tested a video card that has a visible range that conforms to the VGA specification of 640 x 480 pixels. This works on the standard clock of 25.175 MHz but will successfully work on a 25 MHz clock, even though it is technically not within the tolerance of the specification. The video card outputs colour via a DAC that consists of 2 parts red, 2 parts green and 2 parts blue, which means that this is a 64-colour (2 ^ 6) video card. This is known as 6-bit RGB.

If you would like to build my video card, then you can buy a PCB from my Tindie store: VIDEO CARD