登录
首页 » C# » 430单片机贪吃蛇

430单片机贪吃蛇

于 2023-07-30 发布 文件大小:39.78 kB
0 123
下载积分: 2 下载次数: 2

代码说明:

采用msp430f169单片机驱动LCD12864完成的贪吃蛇游戏,共有四个独立按键,分别控制四个不同的方向。应经调试成功。单片机型号为美国TI公司的MSP430f169型。程序各部分均有头文件形式构成,对于初学者便于理解。#include "msp430x16x.h" #include //包含随机数 //液晶引脚定义 #define E_1 P5OUT|=BIT7 #define E_0 P5OUT&=~BIT7 #define RW_1 P5OUT|=BIT6 #define RW_0 P5OUT&=~BIT6 #define RS_1 P5OUT|=BIT5 #define RS_0 P5OUT&=~BIT5 #define PSB_CLR P5OUT &= ~BIT0 //PSB置低,串口方式 #define PSB_SET P5OUT |= BIT0 //PSB置高,并口方式 #define RST_CLR P5OUT &= ~BIT1 //RST置低 #define RST_SET P5OUT |= BIT1 //RST置高 #define uchar unsigned char #define uint unsigned int //按键引脚定义 #define key_state_0 0 #define key_state_1 1 #define key_state_2 2 unsigned char key_state[4]={0,0}; uchar zi[]={0xd3,0xce,0xcf,0xb7,0xbd,0xe1,0xca,0xf8};//游戏结束 uchar fen[]={0xb5,0xc3,0xb7,0xd6};//得分

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • MfengjiiA
    MATLAB风力发电机模型。。小电机模型,可以进行相关修改 (MATLAB wind turbine model. . Small motor model can modify the)
    2012-07-19 19:50:10下载
    积分:1
  • STM32OLED显示实验
    STM32进行OLED驱动,以进行验证驱动成功。(STM32 Drives OLED.To verify driver success.)
    2020-06-16 11:00:02下载
    积分:1
  • 设计模式
    全部23种设计模式源码C++实现 有备注 方便学习设计的人使用
    2022-12-30 06:15:04下载
    积分:1
  • Matlab-CPP
    Matlab C++数学库对结构阵列的操作(======================================================================== CONSOLE APPLICATION : structArrayCreate ======================================================================== AppWizard has created this structArrayCreate application for you. This file contains a summary of what you will find in each of the files that make up your structArrayCreate application. structArrayCreate.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. structArrayCreate.cpp This is the main application source file. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named structArrayCreate.pch and a precompiled types file named StdAfx.obj. )
    2011-05-06 13:32:14下载
    积分:1
  • ASCII
    ASCII码查询软件,可以查询任意字符.(ASCII code to query the software, you can query any character s ASCII code.)
    2012-07-27 23:26:10下载
    积分:1
  • SQL_SERVER2008_EXPRESS
    MFC对话框ADO连接SQL_SERVER2008(MFC dialog ADO connection SQL_SERVER2008)
    2014-01-01 21:13:34下载
    积分:1
  • C#控制雷赛板卡两轴直线插补
    雷赛板卡运动控制案例
    2020-11-29下载
    积分:1
  • 51_AD7705
    基于51单片机的AD7705的调试程序 经验证很好用 和大家一起分享(51 Microcontroller based debugger AD7705 with proven good to share with everyone)
    2021-03-30 14:09:10下载
    积分:1
  • Elliptic curve Diffie Hellman cryptography
    迪菲·赫尔曼使用了一个共享的秘密概念。两个用户都有自己的私钥或密钥,并从另一个用户接收公钥。现在使用另一个用户的公钥和自己的私钥对消息进行解密。
    2022-06-12 23:55:32下载
    积分:1
  • DocToPDF
    C#将 word 转成 PDF 2003/2007都可以(C# the word can be converted to PDF 2003/2007)
    2011-08-08 09:42:00下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载