I. Reasons for true color display:
As mentioned above, we should have a rough understanding of VGA. I think, even if you have been very handsome, you will still be very upset. Because, after all, this is a computer LCD. Why can't we make color pictures like a computer? It's just a simple display of lines and characters. I still feel like playing lcd1602 and lcd12864. It's uncomfortable, uncomfortable, and gray. The big VGA is really unwilling to do anything decent.
The visual impact, the temptation of true colors, and the inner action. If you are not willing to give up and do not show the true colors, I think you should not be so steadfast; if you are an impulsive person with a monotonous VGA drive, you will never be reconciled. Bingo was so uncomfortable in the past. For that moment, taking one step and taking another step for a long time, and finally one day in a certain month, the vision was temporarily on the screen, the temptation of color, the previous world is blocked, and history is no longer fixed.
This chapter describes the design of VGA true color display, including hardware design, software design, and various solutions. It also analyzes a project of bingo's true color display; looking forward to the future, we will continue to take the next step. We cannot stop our vision for the time being. We will have more to do next. In fact, this is the real start.
Ii. Requirements for true color display 1. Data Circulation
To display a color image on a VGA, you must have sufficient conditions. To put it simply, you must have an image data source, cache data, and fl the VGA screen with a standard sequence. Shows the overall process:
(1) external data source captured by CPU
(2) data captured by CPU, cache and memory such as SRAM or SDRAM
(3) The VGA status is controlled by the CPU, and the VGA screen is refreshed in a fixed time series.
With regard to the standard time series for VGA screen swiping, that is, the above (3), Bingo has already made it very clear in the previous two pictures that some friends can use freely. In the previous article, the VGA driver does not have a data source (for the time being, the data in the MIF file is described in the logic circuit). We only use the circuit described in the FPAG logic to display fixed content for the VGA fixed coordinates. Therefore, the key of this chapter is to analyze the VGA Image Display Technology by analyzing the data source and data cache processing of the VGA screen.
2. Color Recognition
The image formats include JPEG, BMP, and PNG, it also has monochrome, 4 gray, 256 color, 4096 color, 16 real color, 24 real color, 32 real color.
One way is to directly read images stored on SD cards, USB flash drives, and other mobile data, and obtain image data through image decoding. FPGA parallel data output, after digital-to-analog conversion (Resistance Network conversion or video conversion chip), obtains more than 16 VGA data. The human eyes cannot tell the limit, at least 16 real colors are required. 16 or more data, 24 or 32 bits, cannot be clearly identified by human eyes. Therefore, if the requirement is not high, the 16-bit true color is sufficient.
The most basic resolutions of the VGA driver mentioned above are as follows:
(1) vga_640_480_60fps_25mhz
(2) vga_800_600_72fps_50mhz
(3) vga_1024_768_60fps_65mhz
Visible, at least 25 MHz Speed Screen flushing, we need to implement the function of video card screen flushing in the software; in the minimum image capacity that is (1) in this mode, the data volume is 640*480*16 = 4915200 bits = 600kb. In (3) mode, the data volume is 1024*768*16 = 1.5 MB. Such a large cache area is required for image data.
In summary, that is to say, to achieve a true color image VGA display, the first needs more than 16 VGA drive circuit, and the second needs enough capacity to store pictures.
3. Summary of various solutions 1. Static Data sources
A static data source is a data source that has been stored in the system and cannot be changed. To display a true color image, we can store the image data in SDRAM or flash to read the image data stored on the IC and display the data in SRAM, use the VGA portable module designed by bingo to drive screen flushing to display real-color images. The basic architecture is:
FPGA +Static Data Source + SDRAM/SRAM + VGA
Of course, the data here is stored in SDRAM. We can store the data in arrays with the c of the niosii and download the data through JTAG. The data in flash can be configured with the flash programmer in the niosii. Bingo will describe the most basic and simple method for storing image data in SDRAM to implement true color images.
2. Dynamic Data sources
The so-called dynamic data source is the data source that can be transmitted in real time to change the display. This is related to the data transmission terminal and the data transmission channel. The basic architecture is:
FPGA +Dynamic Data Source + SDRAM/SRAM + VGA
(1) Write UART/USB hard core as described in Bingo in the previous chapter, or directly use the UART/USB soft core of the system on the top of quatus II as a dynamic data channel. Here, we can use a PC as a smart terminal to process, output image data, update the SDRAM/SRAM content, and fl the screen in real time to update the VGA content. Of course, UART cannot achieve real-time display due to bandwidth restrictions, while USB can achieve real-time transmission, but it is slightly more complicated than the definition of UART interface.
(2) Of course, it is not ruled out that network transmission is used as a channel for dynamic data sources to Display Dynamic Real-color images. However, it may be difficult, but it is only a matter of time.
(3) store the image data on the SD card, cache the image data through the drive SD card, and then display the true color image on the screen.
(4) If you have played a camera or want to play a camera, we can also use the camera as an external data source to collect images and transmit them to SDRAM/SRAM for VGA screen flushing, it is a good solution. The key of this solution lies in the camera driver and Data Processing. When the hardware meets the requirements. Real-time display is favored by many people. The following is the software design flowchart for real-time display of data collected by cameras:
This solution has already been used in many practical scenarios. Bingo will detail video image acquisition, recognition, and processing in the future. Please wait ......
3. Online Nb links
VGA Digital Photo Frame DIY-privileged's blog-always loyal to your dreams when you are young!
Http://blog.ednchina.com/ilove314/33563/category.aspx
Shen Ku! The CPLD + SDRAM solution controls the information about the 800480 7-inch screen, and the stm32 underlying function driver
Http://www.ourdev.cn/bbs/bbs_content.jsp? Bbs_sn = 4355445 & bbs_id = 3020
The CPLD + sdram tft controller, which has been hit by many people, has been successfully implemented.
Http://bbs.21ic.com/images/default/qq.gif
Congratulations to the CPLD + SRAM perfect reality tftscreen driver! Video witness Effect
Http://www.ourdev.cn/bbs/bbs_content.jsp? Bbs_sn = 4269377 & bbs_page_no = 1 & bbs_id = 1029
Finally, I saw my hope-crazybingo-blog garden. MHT
Http://www.cnblogs.com/crazybingo/archive/2010/12/01/1892610.html
Finally, I saw my hope-the beautiful VGA system architecture-crazybingo-ouravr Forum
Http://www.ourdev.cn/bbs/bbs_content.jsp? Bbs_sn = 4437397 & bbs_page_no = 1 & search_mode = 3 & search_text = hanbin08041813 & bbs_id = 9999
Iv. Bingo Design 1. Hardware Design
(1) 16 bits RGB channel: VGA Interface for true color data. Chapter 1 describes the VGA Interface Design. To obtain the true color data, you can use a resistor network simulation or a video conversion chip to obtain multiple digital channels. Here, Bingo uses the video conversion chip adv7120kst50, and its schematic is as follows:
(2) SDRAM: the memory storage chip of the nio ii, Bingo uses hy57v641620 SDRAM here. The hardware schematic is as follows:
(3) SRAM: VGA screen data display and storage IC, here using the issi IS61LV51216AL-10TI as high-speed display chip.
2. Software Design
As shown in, Bingo-designed true color images display engineering RTL diagrams.
This should be the simplest Design of true color display. We can download the image data with the JTAG configured by niosii and then read the specific value of SRAM. We can screen the screen to display the VGA of the true color image. The software architecture of this project is as follows, mainly using the following modules:
|
System_ctrl |
Asynchronous signal synchronization such as PLL and reset to ensure system stability |
|
Vga_clk_core |
The CPU soft-core of the Nios II processes the image data in the pre-stored SDRAM and transmits the data to the FPGA design module. The sram_clrl stores the data into the SRAM. |
|
Sram_ctrl |
Accept the image data sent by the niosii soft core and cache it into the SRAM |
|
Vga_driver |
Use the above bingo to drive the VGA of the result, read the data in the SRAM, and directly fl the screen |
3. Notes
For the sram_ctrl module, Bingo uses the analog 6800 bus protocol to exchange and process data. Of course, if you have a better solution, you can design the Protocol by yourself, and you can design the Protocol in a flexible way.
With regard to clock processing, due to the design of a large amount of data transmission, the timing needs to be rigorous, therefore, it is necessary to strictly handle the coordination between the CPU and the inter-clock of the Tilde, VGA screen-flushing clock, reset signal, etc., as well as the steady-state sub-steady state, and even time series constraints.
Questions about this design will not be explained too much here. Please refer to the post of bingo of ouravr Forum. The project is included in this post, and the description and analysis of the problem are clear. As the design was relatively early, the module did not fully follow the instructions described earlier in this book, please forgive me. The Post URL is as follows:
Finally, I saw my hope-the beautiful VGA system architecture-crazybingo-ouravr Forum
Http://www.ourdev.cn/bbs/bbs_content.jsp? Bbs_sn = 4437397 & bbs_page_no = 1 & search_mode = 3 & search_text = hanbin08041813 & bbs_id = 9999
V. Various
Vi. Network reference
(Original) how to produce gray images in real time? (SOC) (de2) (TRDB-DC2)
Http://www.cnblogs.com/oomusou/archive/2008/08/23/de2_cmos_gray.html
(Original) how to design a digital photo frame? (SOC) (Quartus II)
Http://www.cnblogs.com/oomusou/archive/2010/08/14/de2_70_photo_frame.html
(Original) how to use standard library for image processing? (C/C ++) (Image Processing)
Http://www.cnblogs.com/oomusou/archive/2007/02/04/639740.html
(Original) how to design an SD card WAV player? (SOC) (Quartus II)
Http://www.cnblogs.com/oomusou/archive/2010/08/13/de2_70_sd_player.html
Shen Ku! The CPLD + SDRAM solution controls the information about the 800 480 7-inch screen, the stm32 underlying function driver, the application documentation, and the IP core supporting the CPLD! Show all
Http://www.ourdev.cn/bbs/bbs_content.jsp? Bbs_sn = 4355445 & bbs_id = 3020