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

430单片机贪吃蛇

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

  • rpg
    说明:  一个rpg游戏源码,用vc++制作(A source rpg game with vc++ Production)
    2008-12-04 20:52:10下载
    积分:1
  • atmega16lsensor
    是一个为地铁施工现场开发的人数监控系统,使用ATMEGA16单片机做的,并用了红外传感器。(Is a subway construction site for the development of the number of monitoring systems, using ATMEGA16 microcontroller to do, and use the infrared sensor.)
    2009-09-04 20:42:08下载
    积分:1
  • 5-
    说明:  基于51单片机使用P0口流水点亮8位LED的c语言程序(Light 8 LED c language program based on 51 MCU P0 port water )
    2012-07-12 22:20:07下载
    积分:1
  • DynamicFusion-master
    本程序基于dynamicfusion的方法,对动态场景实时三维重建。(This procedure is based on dynamicfusion method, real-time three-dimensional reconstruction of dynamic scene.)
    2017-08-17 14:29:23下载
    积分:1
  • cks32f103c8t6控制步进电机与舵机
    说明:  cks32f103c8t6控制步进电机与舵机,步进电机是28byj48,舵机频率是50hz,本人小白,希望和大家一起学习(Cks32f103c8t6 controls stepper motor and steering gear. The stepper motor is 28byj48 and the steering gear frequency is 50hz.)
    2020-06-18 09:40:01下载
    积分:1
  • imageSNRPSNRMSE
    图像的SNR,PSNR以及MSE的计算源代码(The image SNR, PSNR and the source code for the calculation of MSE)
    2010-10-19 13:18:44下载
    积分:1
  • CampusCard
    一个完整的校园一卡通系统。内附所有源码。采用C#开发工具。(A complete campus card system. Containing all the source code. Using C# development tools.)
    2010-08-30 19:07:27下载
    积分:1
  • zuidouxiajiang_LMS
    在matlab上面实现lms算法的一些功能验证(matlab lms )
    2011-05-08 08:23:46下载
    积分:1
  • 网络开发平台 五子棋
    设计思路  网络五子棋游戏主要实现的目标如下: 操作简单方便,界面简洁美观; 在注册时设置注册人员的头像和性别;  进入某区的房间时,显示当前房间的人员信息; 进入和退出座位时,显示在座状态; 在对决双方的棋盘上显示棋子;  在下完棋后,高亮度显示最后下的棋子; 按五子棋的规则计算对决双方的输赢; 在服务器端对人员的分数进行顺序
    2022-02-02 12:54:27下载
    积分:1
  • kdtree
    kd树的实现,用到matlab(kd tree realization used Matlab)
    2004-11-22 10:00:08下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载