📄 define.h
字号:
/*********************************************************************************************************
**
**
**
** (c) Copyright 2005-2007, gl
** All Rights Reserved
**
** V1.00.2
**
**
**--------------文件信息--------------------------------------------------------------------------------
**文 件 名: define.h(picc)
**创 建 人: gl
**最后修改日期: 2006年12月20日
**描 述:
**
**--------------历史版本信息----------------------------------------------------------------------------
** 创建人: gl
** 版 本: V1.00.1
** 日 期: 2006年12月17日
** 描 述:
**
**--------------当前版本修订------------------------------------------------------------------------------
** 修改人: gl
** 日 期: 2006年12月20日
** 描 述:
**
**------------------------------------------------------------------------------------------------------
********************************************************************************************************/
static volatile unsigned char flag0 @ 0x1f;
/* FLAG1 bits */
static volatile bit POWERFLAG @(unsigned)&flag0*8+0;
static volatile bit BEEPFLAG @(unsigned)&flag0*8+1;
/* input define */
#define IR_PIN RA1 //红外信号输入引脚定义(直接接一个一体化的红外接收头加一个上拉电阻)
//
//a:422us
#define _2A (844/7) //0x02//844us
#define _3A ((1266/7)+30) //0x02//844us
#define _4A (1688/7) //0x04//1.6879ms
#define _60A (2530/5) //0x60//25.319ms
//----------------------------------------------------------
#define beep RA0
/* led define */
#define LEDIO PORTC
//数码管选择位
#define LEDSEC1 RB7//数码管个位选择,
#define LEDSEC2 RB6//数码管十位选择
/* time const define */
#define TIMEDEFINE 0x0a
/* value define */
volatile unsigned char key_word,DATACOUNT;
volatile unsigned char timecount,have_count;
volatile unsigned char second,timeminute;
volatile unsigned char hightcount,lowcount,irbitcount;//,ircode_L,ircode_H;
volatile unsigned int irsignalstartcount,ircode;
bank1 volatile unsigned char ledsec,programtimecount;
bank1 volatile unsigned int millisecond;
//-----------------------------------------------------------
const unsigned char ledcodetable[10] = {0xed,0x24,0xdc,0xd9,0x71,0xb9,0xbd,0xc1,0xfd,0xf9};//共阴极数码管码值
//
const unsigned int ircodetable[18] = //红外12位码值
{0x0920,0x0910,0x0908,0x0904,0x0902,0x0901,
0x08a0,0x0890,0x0888,0x0884,0x0882,0x0881,
0x0860,0x0850,0x0848,0x0844,0x0842,0x0841};
/*********************************************************************************************************
** End Of File
********************************************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -