Tuesday, January 3, 2012

§5x7 AVR Pong Game

 
Pong is one of the first computer game that ever created, this simple "tennis like" game features two paddles and a ball, the goal is to defeat your opponent by being the first one to gain10 point, a player gets a point once the opponent misses a ball. The game can be played with two human players, or one player against a computer controlled paddle. The game was originally developed by Allan Alcorn and released in 1972 by Atari corporations. Soon, Pong became a huge success, and became the first commercially successful game, On 1975, Atari release a home edition of Pong (the first version was played on Arcade machines) which sold 150,000 units. Today, the Pong Game is considered to be the game which started the video games industry, as it proved that the video games market can produce significant revenues.

To know more interesting facts about PONG and to play this game visit: 
http://www.ponggame.org/ 

In this post I am going to explain 5x7 pong game using AVR. In my previous post I will explain working and interfacing of 5x7 LED matrix display with AVR. Now this time we will use it again to make PONG!!!.Ok!! Let’s make:

Circuit Diagram:
 

Making Steps:
Step1: First of all you have to make this circuit. You can make this circuit on zero PCB or download PCB layout from here which I design in “PCB Wizard”.


If you want to design this PCB at home then Read this post: 


Note: You can download PCB layout in PDF. If you are going to design this PCB then open the PDF and set its zoom to 75.1% and then take it's current view print.

Step2: Paste all the components and jumper wires:
 

Step2: Make 5x7 LED matrix display. To know how to make this and its working. read this post:



 
 
Step4: Connect LED matrix display with PCB using burg-strip.





 
Step5: Complete Setup
 

Step6: Connect 12Volt adapter for power supply

 
How to Play:
After powering the circuit, press “game” (right hand side UP) button to play game and press “Alfa”( (right hand side DOWN ) to see alphabets and numbers.

 
Initially it will display two paddles and a ball. This is a two player game. Each player has two buttons for up and down. Press the button to move paddles up and down. Ball bounces between two paddles.You have to defeat your opponent two times to win the game. If you miss the ball you lost a point and opponent gets one point. LED will indicate one point, the first who gain two points will win the game.

Source code: I adopt the code from http://heim.ifi.uio.no/haakoh/avr/   download code from this link.

Downloads: PCB layout, circuit diagram, compiled .hex file for Atmega8.

Video:


                                                                                                                         ~Pratyush Gehlot

3 comments:

  1. how to feed program to the micro controller?

    ReplyDelete
  2. can u pls send me the header files?

    ReplyDelete
  3. could you please send me the HEX file , i can't download it , thanks

    ReplyDelete

PID Controlled Self balancing Robot using ESP8266 and MPU6050

This ROBOT is made using ESP8266 Node MCU and MPU6050 accelerometer. Motor used here is normal gear motor of 150 rpm with TB6612FNG motor dr...