AVR TETRIS

Andy Chao
Nate Hill

Department of Electrical Engineering
Stanford University

 

INTRODUCTION

 

The Game

Tetris is a popular computer game that was developed by Alexey Pajitnov, Dmitry Pavlovsky, and Vadim Gerasimov in 1985-86. The rule of the game is quite simple and as follows: Blocks of bricks each fail down in a play field, and a player can rotate and move the block sideways.  When the block hits the ground or another block below, this piece stays at that position.  If any line of bricks is full, then the line is removed from the play field.  As a result, the player gains points.  Furthermore, the speed of the falling bricks increments as the player gains more scores.  The player then has less time to make decisions about where and how to fill lines of bricks.  Consequently, the game becomes more interesting and challenging.

 

Our Project

We developed an AVR Tetris game system that allows a player to play Tetris via an Atmel microprocessor.  The AVR ATmega163 microprocessor, a graphics LCD display, a few push buttons, and a speaker are integrated into the system.  We selected Atmega163’s Port A to interface with the push buttons, Port B & C to interface with the LCD, and Port D to the speaker in order to generate Pulse Width Modulated (PWM) signal.  We developed our hardware interface by first designing block diagrams for each system component, as well as the interconnections among these subsystems.  Second, we implemented our design by building circuits and testing functionalities for each system block.  Third, we integrated our system by soldering each component to the microprocessor and powering up the chip.  On the other hand, we developed our software interface by first designing the high-level software architecture and define functionalities.  Second, we wrote C codes and tested each subroutine.  Finally, we integrated and debugged the source codes and optimized the memory consumption.

Details

hardware

software design

conclusions

references

Pictures