欢迎来到天天文库
浏览记录
ID:40075155
大小:1.11 MB
页数:80页
时间:2019-07-19
《毕业论文--基于单片机实现的俄罗斯方块游戏》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、基于单片机实现的俄罗斯方块游戏摘 要本设计是通过AT89S52单片机来实现俄罗斯方块游戏的设计,使用C语言进行编程,并通过Proteus来进行仿真。本设计要实现的基本功能是:应用按键来控制方块的变换与移动;消除一行并计分;消除多行额外奖励记分,方块堆满时结束游戏等俄罗斯方块的基本功能。单片机在手持娱乐设备上的应用具有非常大的潜力,它能将其带入到一个新的阶段。为了解决外部电路图,必须充分了解所用液晶的显示方法和单片机的外部接口功能,和所需要处理的逻辑关系;还要理解LCD液晶的控制原理,来通过数据端口和控制端口来实现画
2、面在液晶上面的显示。程序则要求对外部电路了解的情况下完成自己所需要的功能,并将所要完成的功能用编程语言的形式来实现。然后通过Protues仿真实现通过外部按键来控制各种不同图形的方块来玩游戏,并且实现记录分数和通过过关数来改变方块下降的速度。最后将程序下载至AT89S52单片机并进行实际运行,实际运行表明,本设计可以实现基本的游戏功能,达到预期的目的。关键词:AT89S52;C语言;Proteus仿真;LCD液晶ABSTRACTThisdesignisachievedthroughtheAT89S52microcon
3、trollerTetrisgamedesign,programmingusingClanguage,andcarriedoutbyproteussimulation.Thedesigntoachievethebasicfunctionsare:applicationbuttonstocontrolthebox,changeandmovement;eliminatelineandscoring;eliminatemulti-lineincentivepoints,thegameendswhentheboxfilledw
4、ithbasicfunctionssuchasTetris.MCUintheapplicationofhandheldentertainmentdeviceshavegreatpotential,itcanbebroughttoanewstage.Inordertosolvetheexternalcircuit,wemustfullyunderstandtheliquidcrystaldisplaymethodandexternalinterfaceMCUfeatures,andtheneedtoaddressthe
5、logicalrelationship;alsounderstandthattheprincipleofLCDliquidcrystalcontroltoadataportandcontrolporttoachievetheabovetheLCDscreendisplay.Programrequiresknowledgeoftheexternalcircuitwheretheyneedtocompletethefunctionandthefunctiontobecompletedintheformofprogramm
6、inglanguageusedtoachieve.Simulationthenprotuesbuttonstocontrolanexternalboxtoplayavarietyofgraphicalgames,andachieverecordnumberofscoresandtherelationshiphadtochangethespeedofthemoduledown.Finally,theprogramdownloadedtoAT89S52MCUandtheactualoperation,theactualo
7、perationindicatethatthisdesigncanachievebasicgamefunctions,toachievethedesiredpurpose.KeyWords:AT89S52;Clanguage;Proteussimulation;LCDliquidcryst目录1绪论11.1课题背景11.2电子游戏及其分类11.3电子游戏发展现状21.3.1电子游戏国外发展现状21.3.2电子游戏国内发展现状32整体设计方案52.1系统的核心部分单片机52.1.1单片机的选择52.1.2AT89S52
8、引脚功能描述72.1.3晶振特性92.2液晶显示模块102.2.1液晶显示控制驱动器HD61202的特点102.2.2液晶显示控制驱动器HD61202的引脚功能102.2.3液晶显示控制驱动器HD61202的指令系统112.2.4HD61202的软件设计122.2.5JM12864J的电路结构特点152.2.6JM12864J的应用162.2.
此文档下载收益归作者所有