The horizontal and vertical blank

The display is updated by reading data from the framebuffer and updating in sequence, starting from the left to right and top to bottom. We can think about this exactly as if we were iterating through a 2D array in C or C++. At the end of each scan line, the electron gun is adjusted to point at the start of the next scan line. Another adjustment must be made after the last pixel is lit so the beam can start again at the top.

The time it takes for the electron gun to move from the rightmost pixel of scan line X to the leftmost pixel of scan line X + 1 is called the Horizontal Blank Interval. This is because the electron gun is blanked, meaning that it is outputting zero electrons during this interval. This is to prevent pixels from being lit up while traveling from scan line to scan line. Similarly, the time it takes for the electron gun to move from the end of the last scan line back up to the first scan line is called the Vertical Blank Interval. Again, the electron gun is blanked to prevent pixels from being lit up while traveling back to the top scan line. The Vertical Blank Interval is a short period where the entire display has been updated and the framebuffer is not currently being read by the display:

//Example code drawing 640x480 display 
//Including H Blank Interval and V-Blank Interval
for(int h = 0; h < 480; ++h)
{
for(int w = 0; w < 640; ++w)
{
//Sets pixel color and moves to next pixel
SetPixel(framebuffer[h][w]);
}
//Resets to start of scan line and moves down one row
ResetHorizontal();
}
//Resets to first pixel of first scan line
ResetVerticle();
Figure 11.4-Showing the movement pattern of the electron gun including the Horizontal and Vertical Blank Intervals

The phosphor dots on the screen are only lit up for a short period, so the electron gun must constantly relight them. The gun moves from left to right and top to bottom many times per second to refresh each pixel and display the correct image. If this process is too slow, the display will appear to flicker.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.253.223