基于单片机的俄罗斯方块游戏.pdfVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
基于单片机的俄罗斯方块游戏 摘 要 俄罗斯方块作为最经典的电子游戏之一,它曾经引起的轰动真是不容小觑。本 设计是在12C5A60SR 单片机的基础上利用C 语言编程,做出实物电路图来模拟俄 罗斯方块小游戏的设计。游戏需要利用按键控制方块运动,玩家可以以90 度为单位 旋转方块,以格子为单位左右移动方块,当区域中某一行全部由方块填满时,则该 行会消失并记分,同时消除的列数越多,得分越多;当方块堆到区域最上方而无法 消除时,游戏结束 游戏设计主要分为硬件电路设计和源代码编写两部分。对于硬件电路,有必要 充分了解核心单片机的外部接口功能,液晶显示器需要处理的逻辑关系和它控制原 理,以及键盘设置所需的程序。而对于编程方面首先定义一个二维数组确定整个区 域,了解游戏中所需要用到的一些特殊的函数,然后判断区域是否有方块,还要判 断方块落下后,一行的空格是否填满或者整个区域是否填满等,不断的按照这样的 方法循环扫描 实际运行表明,该设计可以实现基本的游戏功能,达到游戏的目的 【关键词】12C5A60SR;LCD 液晶;C 语言 I Tetris game based on single chip microcomputer Abstract Tetris is one of the most classic electronic game, it had caused a sensation is really can not be underestimated. This design is the use of C programming language based on 12C5A60SR microcontroller, design the physical circuit diagrams to model the Tetris game. The game needs to use the keys to control block movement, game player can be 90 degrees rotate, by a lattice units moving boxes around, when the region in a row are filled by the box, the guild to disappear and score, the number of columns, and eliminate scores more; when the box at the top of pile to areas not to eliminate, the end of the game. Game design is divided into hardware circuit design and source code in two parts. For the hardware circuit, it is necessary to fully understand the external interface functions of the core MCU, LCD need logic processing and its control principle, and procedures required for keyboard settings. For programming the entire region defined first determine a two-dimensional array, understand some special function required in the game, and then determine whether to judge the regional block, block falls, a row space is filled or the whole area is filled, circular in accordance wi

文档评论(0)

130***1990 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档