上电后按+ 可输入密码1 2 3 4 5 6进入指纹录入模式
显示时间模式下,按- 进入查询记录模式 再按×÷上下翻阅打开记录
输入密码模式下按等于号可清除前一位输入
所有状态下按NC 可退回到显示时间状态
#include <reg52.h> #include "1602.h" #include <stdio.h> #include "KEY4X4.h" #include "eeprom2.h" static bit flag; /* 定义刷新标志 */ volatile uchar Key_Value = 0xff; uint count; /* 定义计数标志 */ uchar input_state = 0; /* 输入状态 0显示时间 1输入密码 2指纹录入 */ extern void DS1302Init(); extern void read_time( uchar curr_time[] ); extern void set_time( uchar *pSecDa ); /*typedef struct Timer{ * uchar year; * uchar month; * uchar day; * uchar hour; * uchar min; * }Timer; * Timer Timer_now;*/ uchar getTimebuf[7]; /* 存放时间数据 */ uchar position_input = 0; uchar key_buf[6]; uchar password[6]; uchar mode;