Wednesday, February 19, 2020

VGA Display

Due to the sending principle of OV7670 is similar to the VGA display port, hence, the display protocol was selected as the display protocol.

Before the implementation of VGA display, the pixel data should be firstly stored in a dual RAM and VGA display module can read data from dual RAM. Two parts have independent clock signal, hence the clock sequence between VGA display and OV7670 can be combined together without error of address and clock.

To complete this function, IP core can be directly applied in this part.

Figure 1. IP core of dual RAM
After this dual RAM, the VGA display protocol will be completed. Firstly, the basic principle of VGA should be determined. From the timing diagram of VGA display protocol [1], each frame can be divided into 6 different parts, Horizontal Front Porch, Horizontal Active, Horizontal Back Porch, Vertical Front Porch, Vertical Active and Vertical Back Porch, however, only the Horizontal Active and Vertical Active are available for displaying pixel. The porch part is an mandatory part of VGA protocol because VGA is developed from the picture tubes displaying and the tubes consume time to adjust the position and direction of tubes. Hence, the front porch and back porch for the horizontal and vertical directions should be determined at the beginning of this module.
Figure 2. Basic Timing Diagram of VGA display [1]
According to Figure 2, these horizontal and vertical components can be adjusted to put the active part to the upper right part. This position management can simplify the implementation of this part. Moreover, according to the protocol, the Horizontal Front Porch is 16, Horizontal Sync Pulse is 96, Horizontal Back Porch is 48, Vertical Front Porch is 10, Vertical Sync Pulse is 2 and Vertical Back Porch is 33.
Figure 3. VGA Timing Specification [1]
According to the previous information, the basic parameters can be determined. The other display parts are simple to implement because it just requires 'if else' syntax to output pixels in the active part.
Figure 4. Parameters of VGA Timing
Due to the monitor is HDMI port, this program also requires a convertor from VGA to HDMI and this can be done by IP core vga2dvi. The final image can be displayed on the HDMI monitor.
Figure 5. IP core of convertor from VGA to HDMI

Reference:

[1] S.Larson, "VGA Controller", Mar 07, 2018 [Online]. Available: https://www.digikey.com/eewiki/pages/viewpage.action?pageId=15925278

No comments:

Post a Comment