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

430单片机贪吃蛇

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

  • Arduino 韦根代码库
    Arduino 韦根代码库,利用韦根26/33 与arduino 连接,提供库应用
    2022-05-29 09:12:32下载
    积分:1
  • main
    temperature data logger-The temperature data logger is a device to read temperature and store persistent temperature and corresponding timestamp data into Flash memory. The collection of temperature data can be retrieved, and analyzed after being logged. The temperature data logger is commonly used for monitoring environmental data and shipments of temperature sensitive products such as foods, pharmaceuticals, and some chemicals. In particular, temperature data logger can operate as a stand-alone device and put in a variety of locations including office, laboratory or geographical location such as mountains, deserts,… and in manufacturing line in industry to collect temperature data over a defined period of time. It is also small enough and portable to be integrated with shipping container or directly attached to products which can be degraded due to exposure to temperature extremes to monitor their temperature
    2015-03-06 20:03:40下载
    积分:1
  • Digital-image-processing
    (2001何斌+光盘)Visual c++数字图像处理(第二版),使用VC进行数字图像处理的相关资料,十分实用!((2001 Bin+ disc the) Visual c++ digital image processing (second edition), digital image processing using VC, very practical!)
    2012-11-20 20:24:04下载
    积分:1
  • Taxicab_CCDF
    THIS IS THE MATLAB SOURCE CODE
    2014-02-25 11:50:04下载
    积分:1
  • ExcelOperateClass
    EXcel基本操作类,包括Excel的读写,替换,打开Excel文件、关闭excel进程以及文件(EXcel basic operations class, including Excel read and write, replace, open the Excel file, close the excel process and files)
    2017-08-23 11:05:38下载
    积分:1
  • -TV-platform-
    一种求解电大平台天线互耦的时域积分方程快速算法(Solving the Antenna TV platform stie fast algorithm)
    2013-12-05 19:25:04下载
    积分:1
  • 欧美M1
    说明:  只需要挂在欧美一分钟就行 无需风控,系统根据两个货币的关系进行止损 止盈(It only needs to hang in Europe and America for one minute without wind control. The system stops losses and stops earnings according to the relationship between the two currencies.)
    2020-06-19 20:00:02下载
    积分:1
  • tc-huitu
    图形程序设计 TC下的绘图程序,是一个毕业论文代码(Graphics program to design drawing program under the TC is the code of a thesis )
    2012-05-06 12:57:24下载
    积分:1
  • 15
    说明:  DNF台服源码DNF台服私服可以用可以用,下载编程(DNF data source DNF tab file belongs to the Taiwan Chinese super fishDNF data source DNF tab file belongs to the Taiwan Chinese super fish)
    2016-06-24 15:20:08下载
    积分:1
  • C# 文件上载/下载器程序源码示例
    一个挺基础的Visual C# 文件上载/下载器程序源码示例,从指定网址下载文件到本机。下载文件使用client.DownloadFile(),上传文件使用client.UploadFile(),使用指定的方法将指定的本地文件上载到指定的资源。程序要用到一个三方控件:File Downloader and Uploader.dll,请放于Debug目录下,与exe同级,运行时供调用。
    2022-02-28 16:20:26下载
    积分:1
  • 696518资源总数
  • 104225会员总数
  • 32今日下载