Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Experiment 5 VGA Signal Generator ECE 448 Spring 2009.

Similar presentations


Presentation on theme: "Introduction to Experiment 5 VGA Signal Generator ECE 448 Spring 2009."— Presentation transcript:

1 Introduction to Experiment 5 VGA Signal Generator ECE 448 Spring 2009

2 Video Graphic Array (VGA) Resolution: 640x480 Display: 16 colors (4 bits), 256 colors (8 bits) Refresh Rate: 25Hz, 30Hz (frames / second) RGB: Red, Green and Blue colors Monitor technology: Cathode Ray Tube (CRT)

3 Horizontal TraceHorizontal Flyback Vertical Flyback 0 639 479 0 VGA Monitor

4 6-bit digital color code for a single pixel Analog RGB output D/A VGA Monitor Interface FPGA output 64 colors board output

5 Use these 2 higher bits RC-10 Monitor Interface

6 VGA Control Signal Timing Resolution 640x480

7 VGA 15 Pin

8 VGA Control Signal Timing for f CLK = 48 MHz 1208 clock cycles 1253 clock cycles 1434 clock cycles 1525 clock cycles 480 lines 494 lines 496 lines 528 lines

9 VHDL Timing for 48MHz Please verify that you generate correct synchronization signals using 1.Functional simulation 2.Timing simulation 3.Oscilloscope before you connect your VGA output to a CRT monitor.

10 Pseudocode x = 0; y = 0; repeat forever { if x == 1207 then hblank = 0; if x == 1252 then { hsync = 0; if y == 479 then vblank = 0; if y == 493 then vsync = 0; if y == 495 then vsync = 1; if y == 527 then vblank = 1; if y == 527 then y = 0; else y++; } if x == 1433 then hsync = 1; if x == 1524 then hblank = 1; if x == 1524 then x = 0; else x++; if ( hblank == 0) OR (vblank == 0) then RGB = 0; else RGB = color_generator(x, y, external control); }

11 Pseudocode Your datapath should reflect the following pseudocode. The pseudocode is composed of sequential statements, but your circuit should perform as many independent operations in parallel as possible. x and y signals should change only at the rising edge of the clock.

12 Color Generator external control x y 12 10 RGB_color_code 6 2 bits for Red component 2 bits for Green component 2 bits for Blue component Color Generator Output can be generated on the fly, or read from a precomputed look-up table (stored in BRAM)

13 RC-10 Board FPGA-VGA Pins

14 Task 1: Displaying 4 Rectangular Blocks with Different Colors Joystick left – cycle through each rectangle and background (1=>2=>3=>4=>5) Joystick right – cycle through 16 different colors of the currently active area Enter – reset to initial state

15 Task 2 : Expansion and shrinking of variable color rectangles Joystick left – cycle through each rectangle and background (1=>2=>3=>4=>5) Joystick right – cycle through 16 different colors of the currently active area Joystick up – increase the speed of expansion/shrinking of the rectangles Joystick down – decrease the speed of expansion/shrinking of the rectangles Enter – reset to initial state

16 Task 3 : Ellipse in the Middle of the Screen Joystick left – cycle between the ellipse and the background Joystick right – cycle through 16 different colors of the currently active area Enter – reset to initial state Ellipse equation:

17 Task 4 : Expanding and Shrinking Ellipse Joystick left – cycle between the ellipse and the background Joystick right – cycle through 16 different colors of the currently active area Joystick up – increase the speed of expansion/shrinking of the ellipse Joystick down – decrease the speed of expansion/shrinking of the ellipse Enter – reset to initial state Ellipse equation:

18 Task 5 : Bouncing Ellipse Joystick left – cycle between the ellipse and the background Joystick right – cycle through 16 different colors of the currently active area Joystick up – cycle through 4 bouncing speeds Joystick down – cycle through 5 modes of operation (stop, horizontal, vertical, right diagonal, left diagonal) Enter – reset to initial state


Download ppt "Introduction to Experiment 5 VGA Signal Generator ECE 448 Spring 2009."

Similar presentations


Ads by Google