DOC PREVIEW
Berkeley COMPSCI 150 - Project Checkpoint 3 Video Interface

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

UART OverviewVideo Protocol OverviewGame Start ScreenGame Over ScreenGame Play ScreenPrelab PreparationsSerial Port ConnectionVideo Display ProgramHigh Level SpecificationsFrame RateDesign StructureDesign SpecificationsUART TransmitterMemory ModuleVideo EncoderFSM ImplementationThings To DoDesignImplementation / schematicsTestingUniversity of California at BerkeleyCollege of EngineeringDepartment of Electrical Engineering and Computer ScienceEECS 150 R. H. KatzSpring 2001 P. YanProject Checkpoint 3Video InterfaceUART OverviewA UART is a universal asynchronous receiver transmitter. In this checkpoint we will be using a UART transmitter to transmit data onto the RS232 line that is ultimately received by the video display program.The UART transmitter serially transmits one byte at a time, MSB first. Each transmission also hasa start bit (logic 0) and a stop bit (logic 1). We will be transmitting at a baud rate of 57600 bps, which corresponds to a bit length of approximately 17.36s. The line is normally high (logic 1) when idle.Video Protocol OverviewThe DreamKatz video protocol allows for three types of screens: the game start screen, the game over screen, and the game play screen.Since we are using the UART to send the video data to the computer, each piece of data is one byte. The MSB of each byte determines if that byte is a synchronization (sync) byte – a byte used to indicate the start of a new frame. The lower 7 bits are used to store the actual data.A sync bit of 1 indicates that the byte is a sync byte. Each new video frame must begin with a sync byte so that the video display program knows when the data for each video frame begins. All other data bytes have a sync bit values of 0. Since there are three types of screens, there are three valid sync bytes, each with a different data segment (lower 7 bits of the byte).start bitMSB LSBstop bitstart of tranmissionend of tranmission17.36ssync bit7 bit data segmentThe sync byte is then followed by the necessary data bytes to display that particular type of screen.game start game over game play0x81 0x80 0x82<score hi> <block 0><score lo> <block 1><block 127><mana hi><mana lo><score hi><score lo>Game Start ScreenThe game start screen only requires the sync byte, there is no other data that needs to be sent. Once the video display program receives a game start sync byte, it will display a predetermined start screen.Game Over ScreenTo display the game over screen, the final score needs to be sent so that it can be displayed, in addition to the sync byte. The score is sent in two bytes, where the first byte sent contains the higher seven bits (in the 7 bit data segment), and the second byte contains the lower seven bits. Thus, the score is a 14-bit number.Game Play ScreenThe game play screen is divided into 128 blocks, arranged in 16 rows of 8 columns. The blocks are numbered from 0 – 127, starting with the top left, moving across the columns first, and then down the rows. Also, the game play screen shows the current score and number of mana points.The block data is sent one block at a time, starting with block 0 and ending with block 127. After the block data has been sent, the mana points and score are sent, each being a 14-bit number divided into two 7-bit halves; the higher 7-bits are sent first....data byte sequence (sync byte always first)game play screen01277120mana pointsscoreThe 7-bit data segment of each block specifies a certain image to use to display that block. There are a total of 128 different blocks available for display. For example, if block 0 was sent as 0x01, then that would cause the top left block in the game play screen to be white.7-bit data segment display block0 black1 white2 red3 orange4 yellow5 green6 blue7 violet8-127 ???Prelab PreparationsThis checkpoint only requires the MAX233 chip to be wire wrapped. The MAXIM chip is just a driver used to drive the RS232 serial line.Serial Port ConnectionThe output of the MAXIM chip will be used to connect to the serial port of the computer. We will only use two lines of the serial connector:connectionVCCGNDGNDP371) Pin 2 – RX – this is the receive line (relative to the computer), which will carry the data sent out by the UART transmitter. It connects to the output of the MAX233, which is pin 5 (T1out).2) Pin 5 – GND – this is the reference ground line.Notice that there is another connector on pin 3 of the serial cable. This is the TX line, used for receiving data from the computer. This line is not used, and can just be left unconnected.Video Display ProgramThe video display program is located in U:\cs150\video. It is recommended to copy the entire program (all folder contents) to your home directory.The program will output errors if the protocol is not followed correctly. For example, if a sync byte is sent while in the middle of sending the 128 blocks’ data, an error message will be displayed. However, the program will continue as if there were no error and receive the new sync byte as if it were thebeginning of a new frame.High Level SpecificationsUpon startup, your FSM should display a blank game play screen, with score and mana points of the initial values of 0. We will not be using the game start screen or the game over screen for this checkpoint.A blank game play screen should consist of all 128 blocks being black, although you are free to choose any block you wish to be the blank block, such as white, green, etc.When a button is pressed, a 1x1 block should appear at the top of the game play area and begin to fall downwards. Also, a sound should play and the score (or mana, or both) should be incremented by 1. You are free to choose any button to perform this action, and any one of the six sounds can be played. Also, you can choose at which column the block will appear.The 1x1 block may fall at any speed, although it should not be too slow or too fast. A rate of about one row per second is probably best. As the block is falling, pressing the left and right directional buttons on the controller should move the block left or right by one block unit.If the block gets moved left past the left side of the game play area, it should wrap around to the right side. Similarly, the block should wrap around to the left side if it is moved past the right side. When the block falls past the bottom of the game play area, it should just disappear.It is possible to have more than one block falling at a time, if the button


View Full Document

Berkeley COMPSCI 150 - Project Checkpoint 3 Video Interface

Documents in this Course
Lab 2

Lab 2

9 pages

Debugging

Debugging

28 pages

Lab 1

Lab 1

15 pages

Memory

Memory

13 pages

Lecture 7

Lecture 7

11 pages

SPDIF

SPDIF

18 pages

Memory

Memory

27 pages

Exam III

Exam III

15 pages

Quiz

Quiz

6 pages

Problem

Problem

3 pages

Memory

Memory

26 pages

Lab 1

Lab 1

9 pages

Memory

Memory

5 pages

Load more
Download Project Checkpoint 3 Video Interface
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Project Checkpoint 3 Video Interface and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Project Checkpoint 3 Video Interface 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?