VGA Signal generation in embedded hardware

Note: I am writing this description years after the actual project, so I am a little vague on the details. I simply cannot remeber it all. A Google search shows that this type of project has later become more common. It seems others are using more modern hardware, but still have to settle for a limited resolution, as I did, as explained later on this page. If this kind of project is of interest to you, feel free to contact me, or simply look online for the specks.

With an Atmel 8515 micro-controller I generated electrical signals according to the VGA-protocol so that I could send simple graphics to an ordinary computer monitor.

VGA graphics is controlled by setting an analog voltage on three wires each controlling one of the three base colors red, green and blue. I did not have a digital to analog converter, so I could only either turn on a color or shut it off. For red, green and blue that gave me 8 colors all in all.

Apart from controlling the colors, you need to control vertical and horizontal synchronization by setting or not setting a voltage on those two wires. While it may initially seem trivial to set the colors while the cathode ray traces a scan line and then set a h-sync signal until all lines are done after which you set a v-sync, it is not quite that simple. The ray will keep moving with or without a sync signal, so you actually have to keep up with it and set the signals inside a small time window where the monitor lets you do it to synchronize your (micro-controller) and its sense of time.

Since the cathode ray moves horizontally at a fixed, and quite fast, pace, you need to quickly change the colors while it moves. If you want a pattern of alternating white and black pixels, you need to turn the color on and off quickly enough if your pixels should not be stretched horizontally. In my case, the controller was too slow to get a high resolution, so I ended up with a resolution of 64 x 48. I could simply not change the colors fast enough to get the resolution up.