基于单片机的推箱子游戏设计

上传人:cl****1 文档编号:497816908 上传时间:2023-04-05 格式:DOC 页数:44 大小:1.35MB
返回 下载 相关 举报
基于单片机的推箱子游戏设计_第1页
第1页 / 共44页
基于单片机的推箱子游戏设计_第2页
第2页 / 共44页
基于单片机的推箱子游戏设计_第3页
第3页 / 共44页
基于单片机的推箱子游戏设计_第4页
第4页 / 共44页
基于单片机的推箱子游戏设计_第5页
第5页 / 共44页
点击查看更多>>
资源描述

《基于单片机的推箱子游戏设计》由会员分享,可在线阅读,更多相关《基于单片机的推箱子游戏设计(44页珍藏版)》请在金锄头文库上搜索。

1、基于单片机的推箱子游戏设计摘 要本论文主要介绍了基于单片机的推箱子游戏的规则、硬件结构、软件代码的编写及工作原理、基于T6963C内核的液晶模块PG160128A的详细介绍以及指令集。模拟出Windows系统下的推箱子游戏,具有任意关数选择、难度依次加大、游戏步数记录、游戏时间记录、按键发声、系统低功耗、可实现在线调试等特点。本系统是以单片机为其控制核心,以有源晶振构成的电路作为时钟信号,通过方向键的选择向单片机控制系统发出人物移动控制命令,控制系统接收命令后做出一系列必要的判断后,控制人物及箱子的移动。本设计已通过了实验仿真,运行稳定,基本上没有规则方面的错误。论文主要分为两大块:一块为游戏

2、的硬件电路组成部分,一块为软件程序设计部分。在硬件电路里主要包括有源晶振部分、方向控制部分及液晶显示部分等与单片机的接线设计;软件编程方面主要是子程序和主程序的编写,包括:初始化代码、液晶驱动代码、方向按键代码、过关判断代码、步数记录代码、时间记录代码、按键发声代码、关数选择代码及表格数据代码等等。所有这些在文中都有详细说明。关键词:单片机;推箱子;PG160128A; T6963C内核;指令集AbstractThis paper introduces the single-chip based on the rules of the game Sokoban, the structure o

3、f hardware, software code writing and working principle, based on the core T6963C LCD module PG160128A, as well as details of the instruction set. Simulate the system under Windows Sokoban game, an arbitrary number of related options, in turn increase the difficulty of the game a few step-by-step re

4、cord time of the game record, sound button, low-power system can achieve on-line debugging and so on. The system is based on its single-chip control of the core, consisting of active crystal clock circuit clock signal sent through the arrow keys to select the single-chip control system to control mo

5、bile command characters, the control system after receiving an order to make a Series to determine the necessary, to control the movement of people and boxes. This design has been adopted by the simulation experiments, stable, rules virtually no mistakes. The main thesis is divided into two blocks:

6、one for the games hardware components of the circuit, as a part of the software programming. In the hardware circuitry, including the main active part of the crystal, the direction and control of some of the liquid crystal display and other parts of the single-chip wiring design; software programmin

7、g side of the main subroutine is the main program and the preparation, including: initialization code, LCD Driver code, the direction of key code, customs code to determine, step-by-step record of the number of code, record time code, voice button code, customs code and select a number of forms of d

8、ata code and so on. All of these are in the text in detail.Key words: MCU; Sokoban; PG160128A; T6963C core; instruction set 目录摘要.Abstract.1 前言.1.1 课题的来源.1.2 课题研究的意义.1.3 课题国内研究现状.1.4 课题研究的目的和主要内容.2 推箱子游戏方案论证. 2.1 游戏能否在单片机上实现. 2.2 单片机、液晶屏的选择.3 推箱子游戏的硬件部分设计.3.1 PG160128A液晶屏介绍.3.2 T6963C及其指令集介绍.3.3 晶振、复位电路.3.4 液晶显示屏与单片机接口电路.3.5 控键、喇叭与单片机接口电路.4 推箱子游戏的软件部分设计.4.1 游戏流程图.4.2 液晶屏驱动代码设计.4.3 初始化代码设计.4.4 游戏时间代码设计.4.5 游戏选关代码设计.4.6 步数、关数更新代码设计.4.7 游戏过关代码设计.4.8 图形显示子程序.4.9 中断代码设计.4.10 方向控制代码设计.5 推箱子游戏的系统仿真.

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号