基于单片机的游戏机设计与实现毕业设计.doc
文本预览下载声明
摘 要
从十九世纪末到二十世纪五、六十年代,投币游戏机一个娱乐业革命也在酝酿之中。以及。具有、低功耗、可实现在线调试等特点。本系统以为控制核心,向发出控制命令接收命令后。本设计已通过了Abstract
From the 19th century to the twentieth century 1950s 1960s, from the content of the single slot game to advanced technology of computer games a revolution in the brewing industry. This system mainly based on single-chip microcomputer is the game tetris, design of the main parts of the game tetris know the rules of the game, the whole system design of the hardware structure and physical welding, write software code and debugging. As the display part of the kernel is based on KS0108 LCD module FG12864E, so it is necessary to clarify FG12864E LCD KS0108 details and instruction set. The system simulates the Tetris game, with the increasing order of difficulty, speed, turn speed up, key voice, low-power system can be realized online debugging and so on. The system is based on the core of its control MCU to active crystal form of the circuit as a clock signal, through the choice of keys issued to the microcomputer control system blocks move control command, the control system receives a command to make the necessary judgments , the control blocks the movement and rotation. Then through an array of control, the LCD screen shows the game screen, through the liquid crystal display screen, showing the movement and rotation blocks. This design has already passed the test of the operation of the system, hardware. In this system, the design of hardware structure can run on display are required in other games, such as the Snake, Boxy Pocket, backgammon
Key Words:AT89S52 SCM Russian square; KS0108; FG12864E LCD display; C language
目 录
1 引 言 1
2 课题任务及方案论证 2
2.1主要任务 2
2.2 方案论证 2
2.2.1 主控制器的选择 2
2.2.2 液晶屏的选择 4
3 系统的硬件组成及接口介绍 6
3.1电源部分 6
3.2单片机部分 7
3.2.1 AT89S52单片机的介绍 7
3.2.2 复位电路 7
3.2.3 晶振电路 8
3.3液晶显示芯片与单片机接口电路 9
3.4控键、蜂鸣器与单片机接口电路 9
4 软件部分设计及调试 10
4.1 C语言程序设计 10
4.1.1 C语言简介 10
4.1.2 C语言特点 10
4.2游戏运行方式 11
4.2.1游戏规则介绍 11
4.2.2流程图 11
4.3部分子程序 13
4.3.1液晶屏初始化函数 13
4.3.2液晶屏写指令和写数据函数 13
显示全部