#include <reg52.h> //调用单片机头文件
#define uchar unsigned char //无符号字符型 宏定义 变量范围0~255
#define uint unsigned int //无符号整型 宏定义 变量范围0~65535
uchar value,i; //变量
sbit relay = P2^2; //继电器定义
sbit beep = P3^3; //蜂鸣器定义
sbit beiguan = P2^3; //背光
uint flag_time;
uint flag_guan;
uchar smg_i;
uchar dis_smg[9]={0};
uchar password[8]={8,7,6,5,4,3,2,1}; //密码保存
uchar password_bj[8]={1,2,3,4,5,6,7,8}; //密码比较
uchar code password_r[8] = {1,1,1,1,1,1,1,1} ;
uchar code password_gl[8] = {5,2,0,0,2,5,1,1} ;
uchar password_xg[8]; //密码修改
uchar flag_password; //密码正确否
uchar flag_password_cichu1;//密码错误次数
bit flag_200ms=1; //200ms标志位
uchar key_can;
uchar menu_1,menu_i;
sbit scl = P2^1; //24C02 IO口定义
sbit sda = P2^0; //24C02 IO口定义
uchar code table_num[]="0123456789abcdefg";
sbit rs=P2^5; //寄存器选择信号 H:数据寄存器 L:指令寄存器
sbit rw=P2^6; //寄存器选择信号 H:数据寄存器 L:指令寄存器
sbit e =P2^7; //片选信号 下降沿触发
|