部分源程序如下:
#define enter 0x0C//确定
#define backspace 0x0F//退格
#define A 0x0a //输入密码
#define B 0x0b //修改密码
uchar idata temp5_password[6]=
{0x01,0x02,0x03,0x04,0x05,0x06};//设置初始密码为“123456”
sbit SET=P3^2;//恢复出厂密码设置键
sbit Lock_BIT=P3^3;//锁控制信号,输出低电平
sbit SPK=P3^4;//报警信号输出端
uchar int_count_1;
unsigned int int_count_2;
//================================================
void longdelay(unsigned char i)
{
unsigned int j;
for(;i>0;i--)
for(j=10000;j>0;j--);
}
//==========================================
bit compare_string(uchar *string1,uchar *string2)
{
uchar count;
for(count=0;count<6;count++)
{
if(string1[count]!=string2[count]) return(0);
}
return(1);
}
1