Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 448: Lab 6 VGA Display (mini chess game). Video Graphic Array (VGA) Resolution: 640x480 Display: 16 colors (4 bits), 256 colors (8 bits) Refresh Rate:

Similar presentations


Presentation on theme: "ECE 448: Lab 6 VGA Display (mini chess game). Video Graphic Array (VGA) Resolution: 640x480 Display: 16 colors (4 bits), 256 colors (8 bits) Refresh Rate:"— Presentation transcript:

1 ECE 448: Lab 6 VGA Display (mini chess game)

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

3 VGA 15 Pin

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

5 VGA Control Signal Timing Resolution 640x480 32 us 30.08 us 26.24 us 25.6 us 32 us 30.08 us 26.24 us 32 us 30.08 us 15.36 ms 15.68 ms 16.8ms 15.744 ms

6 VGA Control Signal Timing Resolution 640x480 32 us 30.08 us 26.24 us 640 clock cycles 32 us 30.08 us 656 clock cycles 800 clock cycles 752 clock cycles 480 lines 490 lines 525 lines 492 lines Frequency 25Mhz

7 PINs on Board NET "HS" LOC = "J14" | DRIVE = 2 | PULLUP ; NET "VS" LOC = "K13" | DRIVE = 2 | PULLUP ; NET "OutRed " LOC = "F13" | DRIVE = 2 | PULLUP NET "OutRed " LOC = "D13" | DRIVE = 2 | PULLUP ; NET "OutRed " LOC = "C14" | DRIVE = 2 | PULLUP ; We do not use this pin. NET "OutGreen " LOC = "G14" | DRIVE = 2 | PULLUP; NET "OutGreen " LOC = "G13" | DRIVE = 2 | PULLUP ; NET "OutGreen " LOC = "F14" | DRIVE = 2 | PULLUP ; We do not use this pin. NET "OutBlue " LOC = "J13" | DRIVE = 2 | PULLUP ; NET "OutBlue " LOC = "H13" | DRIVE = 2 | PULLUP ;

8 Color Generator External Control y_pixel x_pixel 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)

9 Task 1: Displaying chessboard (2pts single person, 1.5pts teams) 80 pixels 60 lines Button 0 : cycle through 16 colors for color 1 Button 1 : cycle through 16 colors for color 2 Color 2 Color 1

10 Task 2: Displaying piece on the chessboard (2pts single person, 1.5pts teams) 80 pixels 60 lines Button 0 : cycle through 16 colors for color 1 Button 1 : cycle through 16 colors for color 2 Button 2 : cycle through 16 colors for color 3 Color 2 Color 1 Piece Color 3 Circle represents a bishop Square represents a rook

11 Task 3: Moving piece (one-space) on the chessboard (rook selected) 80 pixels 60 lines Switch(7)=‘0’ Button 0 : cycle through 16 colors for color 1 Button 1 : cycle through 16 colors for color 2 Button 2 : cycle through 16 colors for color 3 Color 2 Color 1 Piece Color 3 Switch(7)=‘1’ Button 0 : Move piece one square up Button 1 : Move piece one square down Button 2 : Move piece one square left Button 3 : Move piece one square right

12 Task 3: Moving piece (one-space) on the chessboard (bishop selected) entire task 3: (2pts single person, 1.5pts teams) 80 pixels 60 lines Switch(7)=‘0’ Button 0 : cycle through 16 colors for color 1 Button 1 : cycle through 16 colors for color 2 Button 2 : cycle through 16 colors for color 3 Color 2 Color 1 Piece Color 3 Switch(7)=‘1’ Button 0 : Move piece diagonally to the upper left Button 1 : Move piece diagonally to the upper right Button 2 : Move piece diagonally to the lower left Button 3 : Move piece diagonally to the lower right

13 Task 4: Moving piece (multi-spaces) on the chessboard (rook selected) 80 pixels 60 lines Switch(7)=‘0’ Button 0 : cycle through 16 colors for color 1 Button 1 : cycle through 16 colors for color 2 Button 2 : cycle through 16 colors for color 3 Color 2 Color 1 Piece Color 3 Switch(7)=‘1’ Button 0 : Move piece one square up Button 1 : Move piece one square down Button 2 : Move piece one square left Button 3 : Move piece one square right

14 Task 4: Moving piece (multi-spaces) on the chessboard (bishop selected) entire task 4: (2pts bonus single person, 1.5pts required for teams) 80 pixels 60 lines Switch(7)=‘0’ Button 0 : cycle through 16 colors for color 1 Button 1 : cycle through 16 colors for color 2 Button 2 : cycle through 16 colors for color 3 Color 2 Color 1 Piece Color 3 Switch(7)=‘1’ Button 0 : Move piece diagonally to the upper left Button 1 : Move piece diagonally to the upper right Button 2 : Move piece diagonally to the lower left Button 3 : Move piece diagonally to the lower right

15 Task 5 (2pts bonus single person, 1.5pts bonus for teams) Add a Knight to the possible pieces if switch (3) =‘1’ Use the buttons however you see fit to allow the knight to move in the 8 legal ways.

16 Rules If a movement cannot be done (e.g. the move would cause the piece to go off the board) LED 7 should light up and the piece should not move from its previous location. Other than LED 7 all led and Seven Segment displays can be used to print out any information on the state of the execution.

17 Switch functions Switches 0-1 determine current task “00” task 1 “01” task 2 “10” task 3 “11” task 4 or 5 Switches 2 and 3 determine the type of piece selected. Sw(3) ‘0’sw(2) selects between bishop (0) and rook (1) ‘1’ piece is a Knight (task 5)

18 Switch functions (continued) Switches 4-6 determine movement amount in tasks 4 and 5 Switch 7 selects between change color mode and move piece mode. If sw(7) = ‘0’ then up down buttons change only the color. If sw(7)=‘1’ then the buttons give the direction of the movement.

19 Button Functions Button 0 – up or upper left Button 1 – down or upper right Button 2 – left or lower left Button 3 – right or lower right


Download ppt "ECE 448: Lab 6 VGA Display (mini chess game). Video Graphic Array (VGA) Resolution: 640x480 Display: 16 colors (4 bits), 256 colors (8 bits) Refresh Rate:"

Similar presentations


Ads by Google