多功能电子密码锁的设计与制作
[摘要]本次毕业设计是基于单片机的多功能电子密码锁电路,完成密码的存储与更改、密码数字的显示、密码是否正确的LED灯提示,暴力破解密码的蜂鸣器警报的功能,完成proteus仿真。不仅实现简单的密码判断,还添加了修改密码的功能,可以使用户随意的修改密码从而提高密码的保密性,添加液晶显示功能,能够使用户看到各种提示信息和密码的实际输入情况,添加紧急报警中断功能,对连续输入错误密码的行为,密码锁会进行自锁、蜂鸣器报警操作。
本次多功能电子密码锁的功能需求分析到控制系统的硬件系统设计(电路图的设计和绘画、各部分电器件的选择)、软件系统设计(主程序和各功能子方法的函数设计、编写、调用和键盘的键盘监听)以及各个功能模块的组成到程序的模拟仿真,以STC89C51单片机为核心进行系统设计,在实现密码锁基本的判断密码正确性的基础上,根据实际需求添加修改密码、报警中断、防键盘抖动、抬手检测等实用功能。
[关键词]多功能;电子;密码锁;单片机;仿真
Design and Fabrication of Multi-function Electronic Cryptography Lock
Bian Xinyu
1601 Electrical Technology (this)
[Abstract]The graduation design is based on the single-chip microcomputer multi-function electronic password lock circuit,complete password storage and change,password number display,password whether correct LED lamp prompt,violent decipher password buzzer alarm function,complete proteus simulation. It not only realizes the simple password judgment,but also adds the function of modifying the password,which can make the user modify the password at will so as to improve the confidentiality of the password,and add the function of liquid crystal display. Can enable users to see a variety of prompt information and the actual input of the password,add emergency alarm interrupt function,continuous input error password behavior,password lock will be self-locking,bee Alarm operation.
The functional requirements of the multi-function electronic password lock are analyzed to the hardware system design of the control system (circuit diagram design and drawing,the selection of each part of the electric device),the software system design (the main program and the function design of each function sub-method,compile,write). The system is designed with STC89C51 single chip microcomputer as the core,on the basis of realizing the password lock to judge the correctness of password,the simulation of each function module is made up to the program simulation,and the system is designed on the basis of realizing the basic judgement of the password correctness of the password lock. Add password modification,alarm interrupt,anti-keypad jitter,hand-lift detection and other practical functions according to the actual requirements.
Key words: multi-function;electron;cipher lock;single chip microcomputer;simulation
目 录
第一章 绪论 1
1.1 课题背景和意义 1
1.2 多功能电子密码锁发展趋势 2
第二章 总体设计方案的确定 3
2.1 多功能电子密码锁设计的具体要求 3
2.2 总体设计方案选定 3
第三章 系统硬件设计 5
3.1 设计原理 5
3.2 单片机STC89C51简介 5
3.3 AT24C02存储芯片 9
3.4 LCD显示模块 10
3.5 键盘设计 12
3.6 声音提示模块 14
3.7 继电器控制模块 15
第四章 系统软件设计 17
4.1主程序模块 17
4.2 键盘扫描子程序 18
4.3 系统模块密码设置子程序 18
4.4开锁子程序 20
4.4软件调试 20
第五章 系统制作及调试 24
5.1 注意事项 24
5.2 硬件调试问题及解决方法 25
第六章 结论 26
参考文献 27
附录一 原理图 28
附录二 仿真图 29
附录三 多功能电子密码锁程序源代码 30