CSE 397 Computer Engineering Lab I

CSE 397 Computer Engineering Lab I

CSE 397 Computer Engineering Laboratory I

Fall Semester 2013 Experiment #4

Video Driver

Implementation due Date:

Final Report due Date:

Creating the proper Horizontal and Vertical Sync signals

Build a circuit using VHDL and your DE2 board to synchronize an SVGA image on your computer’s monitor. The data sheet for the monitor you use in class suggests various display formats that it is equipped to sync with. The table is on page 34. One of the specified formats is an SVGA with a pixel clock of 50MHz. Because we conveniently have a 50MHz clock, this will be a good format to choose. The DE2 user manual also has some information about using its VGA system, starting on page 37.

You will need to create the horizontal and vertical sync signals (VGA HS and VGA VS). The VGA SYNC signal should be tied to ground for our application. Notice the color information for VGA systems (VGA R, VGA G, and VGA B) is coded with analog signals. In other words, a higher voltage on the red line means a more red color, while same is true for green and blue. Fortunately, the DE2 board is equipped with a digital to analog converted chip, the ADV7123. This chip takes a 10-bit digital input for the red color and converts it to the proper red voltage. All you need to do is provide the 10-bit code for the amount of red you want for a given pixel. You can simultaneously provide the proper 10-bit code for the green and blue data. When all thirty bits are set to one, the display will show the brightest white color and when all thirty bits are zero the display will show the darkest black. Make your circuit display any solid color of your choice on the screen and have the instructor sign off.

Displaying 16 colors

Use four of the switches on the DE2 board to set 16 different colors for the screen. Demonstrate the screen changing color to the instructor.

Playing with colors on the screen

Design a modification to your circuit to split the screen into 2 different colors. The design will use a total of 13 switches from your DE2 board to control the split screen. The switches are divided into 4 groups; 3 groups of 4, plus 1.

The single switch will control if the screen is split vertically or horizontally. When you throw the switch, the screen will instantly change from a vertical to a horizontal split and vice-versa when you throw the switch back.

Two groups of 4 switches will control the color on either side of the split. As you change the color code, the display on one side of the split (or the other) will instantly change color.

The final group of 4 switches will control the position of the split. As you change these switches, the split in the screen will move left or right (or up and down). It is NOT necessary to make the split occur at 16 equally spaced locations. The number of pixels in each division may be different if the total across the screen does not divide into 16 evenly.

Have the instructor sign off on your colorful and dynamic piece of video art.