1、 XXXXXXXXXXXXXXXXXXXX XXXXXXXX 届毕业设计说明书届毕业设计说明书 六位电子密码锁控制系统的设计六位电子密码锁控制系统的设计 院 、 部: xxxxxxxxxxxxxxx 学生姓名: xxx 指导教师:xxxx 职称 xxxxxx 专 业: xxxxxx 班 级: xxxxxxxxxx 完成时间: 2013.05.29 摘 要 如今的生活中机械锁已经不能满足人们的要求了, 这样电子密码锁就广泛的 运用到了生活中,随着各式各样的密码锁诞生,对密码锁的要求也越来越高,所 以密码锁在以后的生活中有着很大的发展空间。 本次设计中的密码锁采用的是以单片机为核心的电路,设计出来
2、的安全性 高、成本低、功耗低、易操作的电子密码锁。电路中包括了键盘电路、显示电路、 报警电路、 开锁电路以及掉电存储电路。 其中键盘电路采用的是 4*4 矩阵型键盘, 该键盘电路可以为单片机节省 I/O 口的使用。为了更好的让用户知道输入的信 息, 在本设计中添加了显示电路。 显示电路使用的是使用了单片机的一个串行口, 用 74LS247 驱动数码管发光显示数码, 再使用 74LS138 控制选位信号就可以完成 该系统的显示功能。此显示模块方便而且简单。在安全性能方面,本设计中设计 出了报警电路,防止外人胡乱使用密码而产生的不良后果,在输入密码错误三次 的时候,电路就会发出报警并且会锁定键盘。
3、这样就可以更好的防止用户以外的 人胡乱操作密码锁而造成不必要的损失。在设计中因为要考虑原件成本的问题, 所以就用了发光二极管来代替密码锁开锁的功能, 根据发光二极管的指示来判断 密码锁是否开锁,在发光二极管灯亮的时候,密码锁就打开,发光二极管灯灭, 则表示密码锁打开失败。因为城市的供电一般很难保证百分百的稳定,所以考虑 到停电时给用户带来很多的麻烦,所以本设计中用到了拥有掉电存储功能的电 路,该电路中主要芯片为 AT24CO2,其中包括了电源电路、电子开关自动切换电 路、蓄电池自动充电电路。这样就在停电的情况下密码锁电路依然保持器电路功 能。 在本次设计中利用的是汇编语言,经过 keil 的编
4、译,在 protues 中仿真, 基本实现了以上的功能。 关键词关键词:单片机;4*4 矩阵型键盘;报警电路;密码锁;开锁电路 ABSTRACT Mechanical lock now life already cant satisfy peoples request, so that electronic combination lock is widely used to the life, with the birth of a variety of combination lock, also more and more high to the requirement of combi
5、nation lock, so the combination lock in later life has very big development space. This combination lock is also used in the circuit with single-chip microcomputer as the core, designed the high safety, low cost, low power consumption, easy to operate electronic combination lock. Includes the keyboa
6、rd circuit, display circuit, alarm circuit, lock circuit and electric storage circuit. The keyboard circuit USES is 4 * 4 matrix keyboard, the keyboard circuit can save MCU I/O port to use. In order to let the user know the input information, add a display circuit in the design. Display circuit using a serial port is the use of the single chip microcomputer, with 74 ls247 drive digital tube light emitting display digital, to use 74 ls138 control function