One of the first digital games created was a two-dimensional electronic table tennis game, which was named Pong. This project creates an implementation of Pong which is controlled by two players using knobs, and displays the game on a 640x480 pixel VGA monitor. The knobs control potentiometers, which send an analog signal to the analog ports of the microcontroller. The microcontroller handles the game mechanics, including tracking the position of the ball and paddles, and keeping score. Using parallel ports, the microcontroller communicates the positions and score to the FPGA, which sends the necessary signals to a VGA monitor in order to display the game.Introduction:This system is an implementation of the game of Pong on the PIC microcontroller and Xilinx II FPGA. This game is a two-dimensional digital table tennis game in which a ball bounces between two paddles, each one controlled by one of the players, and off the top and bottom of the rectangular playing area.The players control their paddle using knobs attached to potentiometers. These potentiometers are powered by the 3.3 V output from the Harrisboard. The controllers are connected to the board across RJ-11 cables, in which we use 3 of the wires to carry the ground, high voltage, and potentiometer output. The output voltages from the potentiometers are directly connected to two of the analog ports of the PIC microcontroller.The PIC then uses its analog to digital converter to determine the position of each of the paddles as directed by the current position of the knobs on the potentiometers. The PIC also determines the current position of the ball based on its previous position and its current velocity. The vertical velocity of the ball is modified by the movement of each paddle when the ball strikes them and is inverted whenever the ball strikes the top or bottom edge of the play area. The horizontal velocity of the ball is inverted and its increased in magnitude each time the ball strikes a paddle.The PIC communicates the data for position and size of all play elements as well as the score of the game to the FPGA using Ports C and D for parallel communication. Of these sixteen pins, six of them are used to determine the use of the current value being sent, and the other ten carry the value. The FPGA uses these values to determine the color of each pixel of the screen as it needs to be displayed. The outputs of the FPGA are three bits ofcolor to the VGA monitor and two bits of HSync and VSync which are determined by the FPGA and are used to coordinate the FPGA and the monitor.
đang được dịch, vui lòng đợi..