-
Notifications
You must be signed in to change notification settings - Fork 1
VGA Output
The VGA output works by controlling horizontal and vertical sync signals that indicate the start of a new line or frame. Counters are used to determine when these signals should be high or low. A pixel clock of 25.175Mhz indicates when the red, green and blue data outputs should be read by the VGA DAC on the DE2-115. Because the frame buffer only has enough memory for grayscale, the red, green and blue data outputs are all connected to the same 8 bit bus. The VGA protocol and the signals required for VGA video are detailed in the sections below.
The visible area of each VGA frame is sandwiched between a front and back porch. The porches are just black areas of the frame that are not typically visible on the monitor. These porches vary in size based on the resolution of the display. Counters determine when the monitor is accepting data for a porch or for the visible area of the screen. These counters are reset with each horizontal or vertical sync signal.
This signal is set low each time a new line begins. As soon as the sync pulse starts, the logic starts to fill a small ram that acts as a buffer for the current line with data from the buffer for the entire frame. Once the horizontal counter determines that the first porch is over the logic begins to output the contents of the buffer to the display.
The vertical sync signal indicates the end of one frame and the start of another. There are several lines in the porch at the start of the frame. During these lines no data from the frame buffer is output to the display as the data would not be visible. Once the porch lines are output, the horizontal line buffer starts to fill and output data for the frame.
The VGA chip accepts RGB data inputs. Each color channel is 8 bits wide. Because the frame buffer is in grayscale, each color changes is connected to the same 8 bit bus, which creates a grayscale output.
The clock input to the VGA chip varies depending on the resolution of the display. The clock determines the update rate for each pixel. For the 640x480 output resolution used in this project the clock is set to 25.175Mhz.
Second LTD. (2008). VGA Signal 640 x 480. Retrieved May 1, 2016.