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

430单片机贪吃蛇

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

  • src
    银行管理程序,实现简单管理员删户开户,转账等功能(Bank management program)
    2013-05-28 13:54:49下载
    积分:1
  • CMAC
    利用C语言实现的cmac算法,该cmac基于AES。程序清晰有注释便于查看(The use of C language cmac algorithm, the cmac based AES. There are clear and easy to view program notes)
    2020-10-28 18:29:57下载
    积分:1
  • SPP
    标准单点定位程序(Standard single point positioning program)
    2019-03-23 11:04:22下载
    积分:1
  • GL12
    编写Windows 窗口应用程序,要求能实现如下功能:1.包含如下菜单项:学生管理—>管理(M) ,管理菜单项选择后要求弹出自定义对话框对学生进行管理,管理内容包括 增加学生,浏览学生信息,删除学生; 2.学生信息包括性别,专业,CET4,CET6,计算机等级考试等学习情况,要求使用Radio,CheckBox,ComboBox,Button,EditBox; 3.学生管理对话框中增加头像选择功能,头像采用cat.ico, dog.ico, boy.ico, girl.ico 文件; 4.增加菜单项:学生管理—>保存(S),读取(R) ,能将所有学生信息(包含头像信息)保存到指定的二进制文件no12.data中。(Write Windows window application requirements to achieve the following functions: 1. Contains the following menu items: Student Management- " Administrative (M), management requirements of the pop-up menu of options to customize the dialog box after the students management, management including increased student View student information, delete the student 2. student information including gender, professional, CET4, CET6, learning computer grade examinations, requires the use of Radio, CheckBox, ComboBox, Button, EditBox 3. Student Management dialog box, select the features to increase picture , head with cat.ico, dog.ico, boy.ico, girl.ico documents 4. add menu item: Student Management-> Save (S), read (R), can all student information (including picture information ) saved in the specified binary file no12.data)
    2020-07-03 02:40:01下载
    积分:1
  • Msimulatee1A
    用MATLAB实现加噪信号的消噪噪,用了三种常用方法。可直接使用。 (Using MATLAB to increase noise and signal noise cancellation noise, with three commonly used methods. Can be used directly.)
    2012-07-22 23:25:24下载
    积分:1
  • BankSystem
    刚学完VC++,试着在VS2010下编写的一个银行活期储蓄系统,用到MFC对话框、CSocket、数据库(After studying VC++, try to write in a bank Savings VS2010 system, used in MFC dialog, CSocket, database)
    2014-01-26 16:26:17下载
    积分:1
  • pwm_lcd
    说明:  在STM32开发板上实现用光敏电阻控制LCD屏幕的亮度。(The brightness of LCD screen is controlled by photoresist on STM32 development board.)
    2020-11-08 09:39:47下载
    积分:1
  • pai
    多线程计算π的程序源码 可以直接编译运行 采用了windows的多线程(Multi-threaded computation of π can directly compile and run the program source using multi-threaded windows)
    2011-04-26 21:35:05下载
    积分:1
  • AccountPluspart1
    Account plus activation part 1
    2017-08-11 09:49:26下载
    积分:1
  • garch族模型源代码
    里面涉及的garch族模型甚广,有常熟阶的,也有高阶的对条件峰度和条件偏度进行分析,寻找最优garch 模型(新生量设计高斯分布,T分布),并能模拟和预测金融时间序列,对不同分位数水平下的VAR进行评估,从而给投资者提出建议。
    2022-07-15 06:31:21下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载