How do VGA Monitors Work?

A VGA Monitor can be thought of as a grid of pixels where each pixel is a picture elements that can be set to a specific color. There are 480 rows and each row consists of 640 pixels. The VGA interface works serially, that is, color information for each respective pixels is sent one after the other, as opposed to all at once.

Colors can be represented using a triplet consisting of the intensities of each fundamental color (Red, Green, Blue). The monitor expects these values to be analog, and thus a DAC (Digital to Analog Convertor) is used. The DE2 Educational Board has a 10-bit DAC, that is, it uses 10 bits to represent the intensity of each channel (Red, Green, or Blue), for a total of 30 bits. Depending on the type of monitor and video card you use at home, your computer uses either 16, 24, or 32 bits to encode this color information.

An important fact to realize is that the VGA monitor does not have memory and thus will not store the pixel information being written to it. Instead, the pixels must be continuously sent to the display to achieve a stable image. The VGA Adapter does have memory and will be responsible for constantly sending out the pixel information.

Transmission Protocol

It is not your responsibility to understand how information is transmitted from the VGA Adapter to the monitor because the VGA Adapter encapsulates this process. It may however provide better insight as to how the VGA Adapter's setup came about.

There are two signals that are used to maintain synchronization with the monitor: horizontal and vertical sync. These signals are active low (activated when the signal is logic 0). The timing for these signals can be found within the verilog VGA Adapter code and is defined by the standards for VGA monitors.

During a horizontal sync cycle, the pixel information is sent for all 640 pixels followed by the lowering of the horizontal sync signal. The signal is used to coordinate the start of new lines.

A vertical sync is achieved by lowering the vertical sync signal. The vertical sync instructs the monitor to return to the top of the screen (0,0). The horizontal sync cycle that follows becomes the first row on the screen.