1、 1 课题名称:基于单片机的电子密码锁课题名称:基于单片机的电子密码锁 班级:班级: 学号:学号: 姓名:姓名: 指导老师:指导老师: 时间:时间: 2 摘要摘要 在日常的生活和工作中, 住宅与部门的安全防范、单位的文件档案、财务 报表以及一些个人资料的保存多以加锁的办法来解决。 若使用传统的机械式钥匙 开锁, 人们常需携带多把钥匙, 使用极不方便, 且钥匙丢失后安全性即大打折扣。 具有防盗报警等功能的电子密码锁代替密码量少、 安全性差的机械式密码锁已是 必然趋势。随着科学技术的不断发展,人们对日常生活中的安全保险器件的要求 越来越高。为满足人们对锁的使用要求,增加其安全性,用密码代替钥匙的密
2、码 锁应运而生。密码锁具有安全性高、成本低、功耗低、易操作、记住密码即可开 锁等优点。 目前使用的电子密码锁大部分是基于单片机技术,以单片机为主要 器件, 其编码器与解码器的生成为软件方式。 本系统由 AT89C51 单片机系统 (主 要是 AT89C51 单片机最小系统) 、4 4 矩阵键盘、1602LCD 显示和报警系统等组 成,具有设置、修改六位用户密码、超次报警、密码错误报警等功能(本设计由 P0 口控制 LCD 显示,由 P1 口控制矩阵键盘含有 0-9 数字键和 A-E 功能键。初 始密码为“123456” 。当输入 09 的数字时,可以输入密码,不超过 6 位,输入 完成后按下“
3、A”键开锁,密码正确时 LED 点亮,液晶屏显示开锁成功。其它 键功能是:B 上锁,C 重新输入密码,D 保存新密码,E 清除,重设密码时要求 先输入正确密码成功开锁) ,除上述基本的密码锁功能外,依据实际的情况还可 以添加遥控功能。本系统成本低廉,功能实用。 关键词关键词 AT89C51 1602LCD 电子密码锁 4 4 键盘 ABSTRACT In the day-to-day living and working in the residential sector and the safety precautions, units of paper files, financial s
4、tatements, and some personal information to the preservation of more than locking the solution to the problem. If the use of traditional mechanical key to unlock, people often need to carry more keys, a very inconvenient to use, and after the loss of key security that is greatly reduced. With anti-t
5、heft alarm function instead of the password is less electronic lock, security, poor mechanical lock is an inevitable trend。 With the continuous development of science and technology, in the daily lives of people on insurance safety devices increasingly demanding. To meet the requirements of the use
6、of locks to increase their security, with a password instead of the password key lock came into being. Password lock is safe, low cost, low power consumption, easy to operate, Remember the password to unlock it , and other advantages. At present the use of electronic locks are mostly based on microprocessor, main devices MCU, the encoder and decoder built into software. SCM system from the system(Mainly AT89C51 microcontroller minimum 3 system), 4 4 Matrix keyboard, LCD displa