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

430单片机贪吃蛇

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

  • TTS
    语音合成软件,输入文字,自动生成声音文件,全部是源码(Speech synthesis software, input text, automatic generation of sound files, all the source code)
    2020-10-26 20:29:59下载
    积分:1
  • 02 Data Sheet
    TC275快速入门数据手册,可以快速了解内部功能模块与资源分配(TC275 Quick Start Data Manual, can quickly understand the internal function modules and resource allocation)
    2020-12-08 22:49:19下载
    积分:1
  • matlab-a-VC
    Vc+_+调用matlab的一个实例,包括matlab源文件,VC源文件,以及word和pdf文件说明(Vc+_+ call matlab one instance, including the matlab source file, VC source files, as well as word and pdf file description)
    2013-07-13 16:10:42下载
    积分:1
  • STM32F103MQTT
    说明:  在STM32F103RET6测试,FreeRTOS版本V10.0.1,STM32固件版本V3.5。 连接MQTT正常订阅接收数据,修user_mqtt.h头文件即可使用。(In stm32f103ret6 test, FreeRTOS version v10.0.1, STM32 firmware version v3.5. Connect to mqtt, subscribe to receive data normally, and repair user_ The mqtt. H header file can be used.)
    2020-09-23 11:15:42下载
    积分:1
  • ddc112
    it is using texas instruments ddc112
    2009-08-09 17:34:14下载
    积分:1
  • tcpserver
    说明:  C++ TCP/IP server TCP/IP 服务器端程序(C++ TCP/IP server code)
    2019-04-01 18:37:46下载
    积分:1
  • DES_C
    基本的DES加密算法,可以实现一些基本的功能,但是大型计算不适合(The basic DES encryption algorithm)
    2013-08-15 01:48:09下载
    积分:1
  • 利用随机数实现投骰子反复,记录值…
    用随机数实现投掷骰子多次,记录计算各个点值并打印其出现的概率。-Using random numbers to achieve cast dice repeatedly, recording the value of the calculation and print the various points of its probability.
    2023-02-28 12:05:03下载
    积分:1
  • BP
    说明:  误差反向传播(Error Back Propagation, BP)算法 (Back Propagation (Error Back Propagation, BP) algorithm)
    2010-10-21 19:22:24下载
    积分:1
  • UDF_03_Files
    说明:  用C语言编写的Fluent UDF实例,包含Adjust宏,profile宏等八个实例教程,快速上手(The UDF is for computational fluid dynamics software Fluent, it concludes the Profile.c,the Adjust.c)
    2019-05-11 00:02:23下载
    积分:1
  • 696518资源总数
  • 106265会员总数
  • 10今日下载