毕设 基于单片机指纹开打开锁密码锁系统设计protues仿真

上电后按+ 可输入密码1 2 3 4 5 6进入指纹录入模式

显示时间模式下,按- 进入查询记录模式 再按×÷上下翻阅打开记录

输入密码模式下按等于号可清除前一位输入

所有状态下按NC 可退回到显示时间状态



    #include 
    #include "1602.h"
    #include 
    #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();
    sbit LED = P3^1;


    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;
    char	shwobuf[15] = "";
    
    #define CHK_PASSWORD (password[0] == key_buf[0]) && (password[1] == key_buf[1]) && (password[2] == key_buf[2]) && (password[3] == key_buf[3]) && (password[4] == key_buf[4]) && (password[5] == key_buf[5])
    
    void Timer0Init()               /* 定时计0数器初始化 */


项目获取:

https://gitee.com/feifei1122/simulation-project

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值