#include #define uint unsigned int
#define uchar unsigned char
unsigned char table[] = { 0xEB, 0x60, 0xC7, 0xE5, 0x6C, 0xAD, 0xAF, 0xE0, 0xEF,
0xED };
#define BIAS 0x52 //0b1000 0101 0010 1/3duty 4com
#define SYSDIS 0X00 //0b1000 0000 0000 关振系统荡器和LCD偏压发生器
#define SYSEN 0X02 //0b1000 0000 0010 打开系统振荡器
#define LCDOFF 0X04 //0b1000 0000 0100 关LCD偏压
#define LCDON 0X06 //0b1000 0000 0110 打开LCD偏压
#define XTAL 0x28 //0b1000 0010 1000 外部接时钟
#define RC256 0X30 //0b1000 0011 0000 内部时钟
#define TONEON 0X12 //0b1000 0001 0010 打开声音输出
#define TONEOFF 0X10 //0b1000 0001 0000 关闭声音输出
#define WDTDIS1 0X0A //0b1000 0000 1010 禁止看门狗
#define SECOND 20
#define SYSTEM_CLOCK
uchar Data_Length=3,counter=0,sec=0;
uchar LED_STATUS=1,RXD_STATUS=1; //显示状态
uint RXD_COM[3],LED_COM=0,LCD_COM=0,LCD_COM_TIME=0; //
//-----------------------------------------------------------------------------------------
//函数名称:Delay()
//功 能:延时子程序
//-----------------------------------------------------------------------------------------
void Delay(uchar us) //5,7,9
{
while (--us)
;
}
//-----------------------------------------------------------------------------------------
//函数名称:DelayMS()
//功 能:延时子程序
//-----------------------------------------------------------------------------------------
void DelayMS(uint iMs) {
uint i, j;
for (i = 0; i < iMs; i++)
for (j = 0; j < 65; j++) {
Delay(1);
}
}
//-----------------------------------------------------------------------------------------
//函数名称:Ht1621