200 likes | 496 Views
Introduction to Experiment 5 VGA Signal Generator ECE 448 Spring 2008. 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).
E N D
Introduction to Experiment 5 VGA Signal Generator ECE 448 Spring 2008
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)
VGA Monitor 0 639 0 Horizontal Flyback Horizontal Trace Vertical Flyback 479
D/A VGA Monitor Interface Analog RGB output 6-bit digital color code for a single pixel FPGA output 64 colors board output
RC-10 Monitor Interface Use these 2 higher bits
VGA Control Signal Timing Resolution 640x480
VGA Control Signal Timing for fCLK = 48 MHz 1208 clock cycles 1253 clock cycles 1434 clock cycles 1525 clock cycles 480 lines 494 lines 496 lines 528 lines
VHDL Timing for 48MHz • Please verify that you generate correct synchronization signals using • Functional simulation • Timing simulation • Oscilloscope • before you connect your VGA output to a CRT monitor.
0 1 0 Value detector 0 1 1 xxx Detector compares the input value with the number written on the box. If the input is same as given number then it outputs 1. External control Execution Unit 12 12 Color Generator 6 +1 6 RGB [Red, Green, Blue] 64 colors 6 12 bit reg. 0 set 1524 switch 1 12 0 clear blank pixels 1207 set 1433 switch 1 clear 1252 horizontal sync 10 10 +1 Switch 10 bit reg. En set 527 switch 1 11 0 clear 479 blank lines set clk (48 MHz) 495 switch 1 clear 493 vertical sync reset VGA signal generator
Color Generator External Control 12 column_code RGB_color_code Color Generator 10 6 row 2 bits for Red component 2 bits for Green component 2 bits for Blue component • Output can be • generated on the fly, or • read from a precomputed look-up table (stored in BRAM)
Task 2 : Displaying a triangle in the cornerof the screen Triangle color Background color Joystick right and left - scrolling through 16 different colors of the triangle. Joystick up and down - scrolling through 16 different colors of the background.
Task 3 :Triangle expanding and shrinkingin time Triangle color time 2 time 1 Background color Joystick right and left - scrolling through 16 different colors of the triangle. Joystick up and down – increasing/decreasing the speed of expaning/shrinking.
Task 4 : Moving triangle Triangle color time 1 time 4 time 2 time 3 Background color Joystick right and left – Change color of triangle Joystick up and down – Change speed of triangle’s movement