嵌入式 > 嵌入式开发 > 详情

51单片机红外遥控点阵贪食蛇程序

发布时间:2025-07-10 发布时间:
|


完整的源码和制作资料下载:/zixunimg/eepwimg/www.51hei***/bbs/dpj-20623-1.html

/****************工程包含的头文件*************************/
#include
#include
#include"define.h"
#include"delay.h"
#include"zm.h"
#include"32x12matrix.h"
#include"menu.h"
#include"MySnake.h"
#include"ds1302.h"
#include"ds18b20.h"
#include"i2c.h"
#include"radio.h"
#include"ir.h"


/*---------------------------------------------------------
函数功能:Timer0初始化
调用形式:Timer0_Init();
参数:无
备注:用于产生具有随机性质的贪食蛇游戏食物的坐标位置
---------------------------------------------------------*/
void Timer0_Init()
{
TMOD|=0x02;//重装初值计数模式,TL0:0->255
IE|=0X82;
TH0=0;
TL0=0;
TR0=1;//开启内部Timer0
}

/*---------------------------------------------------------
函数功能:ExtInt1初始化
调用形式:ExtInt1_Init();
参数:无
返回值:无
备注:下降沿
---------------------------------------------------------*/
void ExtInt1_Init(void)
{
IT1=1;
EA=1;
EX1=1;
}


/*---------------------------------------------------------
函数功能:主函数
调用形式:无
参数:无
返回值:无
修改时间:13.4.17
备注:无



『本文转载自网络,版权归原作者所有,如有侵权请联系删除』

热门文章 更多
CANopen 总线插头接线的注意事项