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

430单片机贪吃蛇

于 2023-07-30 发布 文件大小:39.78 kB
0 97
下载积分: 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 个回复

  • work
    这个代码的主要作用是练习用的,可以用它来练习,然后得到提高(The code is based on Practice,so we can use it to make some improvement and maybe it can realize some new functions)
    2011-11-06 21:05:58下载
    积分:1
  • Background-Subtraction-using-GMM-master
    背景提取 提取出视频忠的背景 使用帧差法(Background extraction)
    2018-05-14 18:45:12下载
    积分:1
  • CRC-C
    有关 C语言的CRC校验的资料,很实用,值得收藏和学习(About the C language, the CRC data, it is practical, it is worth collecting and learning)
    2014-04-15 18:33:56下载
    积分:1
  • arduino dht11
    DHT11是一款有已校准数字信号输出的温湿度传感器。 精度湿度+-5%RH, 温度+-2℃,量程湿度20-90%RH, 温度0~50℃。基本信息产品概述DHT11数字温湿度传感器是一款含有已校准数字信号输出的温湿度复合传感器使用arduino系统读取dth11 的温湿度,然后利用w5100上传到服务器上。
    2023-06-14 21:25:03下载
    积分:1
  • ses
    有限差分波动方程不加边界条件二阶正演时间切片程序。(Finite difference wave equation without boundary conditions of second-order forward time-slicing procedure.)
    2009-12-11 16:54:20下载
    积分:1
  • Delaunay
    delaunary三角剖分,在数据点较小的情况下,运行结果还算客观,但是数据点大于五万时,运行较慢。(Delaunary triangulation, data point in the case of small, the operation results is objective, but the data points is greater than fifty thousand, is running slower.)
    2014-12-09 21:44:53下载
    积分:1
  • jiqirenpaibao
    讲述了基于matlab的排爆机器人的控制与仿真,具有较好效果(About the control and simulation matlab-based EOD robot, with good results)
    2014-09-19 20:29:30下载
    积分:1
  • stm32源码
    说明:  基于stm32单片机的云台运控程序,通过控制舵机控制云台的俯仰和侧转。(Pan-and-Tilt control that is applied on STM32 single chip)
    2019-11-20 22:08:30下载
    积分:1
  • c++图书管理系统代码
    可以直接运行,适合无界面小型系统。不带数据库
    2022-01-25 17:33:00下载
    积分:1
  • VC.ppt
    第1章 Visual C++集成开发环境new 第2章 C++语言基础new 第3章 C++面向对象程序设计new 第4章 创建应用程序框架new 第5章 文档与视图new 第6章 对话框和标准控件new 第7章 MFC原理与方法new(Chapter 1, an integrated development environment Visual C++ new language based on Chapter 2 C++ new Chapter 3 C++ new object-oriented programming in Chapter 4 Creating new application framework document and view Chapter 5 Chapter 6 new dialogs and standard controls new section Chapter 7 MFC new principles and methods)
    2015-03-10 22:29:24下载
    积分:1
  • 696516资源总数
  • 106752会员总数
  • 15今日下载