1 / 7
文档名称:

红外遥控器按键编码.pdf

格式:pdf   大小:224KB   页数:7
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

红外遥控器按键编码.pdf

上传人:临近再说 2022/5/11 文件大小:224 KB

下载得到文件列表

红外遥控器按键编码.pdf

文档介绍

文档介绍:淘宝网上购买的遥控器图片:(这是脉宽调制的)
按键符号 某淘宝贴出来的按键对应码 我实际测得的按键对应码
CH- 00-FF-45-BA if(temp==IR_3)
{LED1=OFF;LED2=OFF;LED3=ON;LED4=OFF;LED5=OFF;}
if(temp==IR_4)
{LED1=OFF;LED2=OFF;LED3=OFF;LED4=ON;LED5=OFF;}
if(temp==IR_5)
{LED1=OFF;LED2=OFF;LED3=OFF;LED4=OFF;LED5=ON;}
EX0 = 1;
}
}
}

#ifndef _INFRAREDRAY_H_
#define _INFRAREDRAY_H_
#include ""
//各个按键对应码定义
#define IR_CHL 93
#define IR_CH 157
#define IR_CHR 29
#define IR_PREV 221
#define IR_NEXT 253
#define IR_PP 61
#define IR_MINUS 31
#define IR_PLUS 87
#define IR_EQ 111
#define IR_0 151
#define IR_100A 103
#define IR_200A 79
#define IR_1 207
#define IR_2 231
#define IR_3 133
#define IR_4 239
#define IR_5 199
#define IR_6 165
#define IR_7 189
#define IR_8 181
#define IR_9 173#define InfraredRayPin P32
//红外接收头的链接引脚
#define IR_Start 0
#define IR_WordA 1
#define IR_WordB 2
#define IR_End 3
#define TimeStart (TR0=1)
#define TimeStop (TR0=0)
void InfraredRay_Init(void);
//初始化红外遥控功能
unsigned int backdata(void);
#endif

#include ""
/*注意:时钟 12MHz!!!!!!*/
unsigned char InfraredRay_Status=IR_Start;
unsigned char IR_Num=0;
unsigned int IR_Time=0;