内容发布更新时间 : 2024/11/8 0:38:19星期一 下面是文章的全部内容请认真阅读。
摘要
自从人类开始制造锁以来长期所使用的锁都是机械锁,通俗的讲就是弹子芯锁。而传统的弹子芯锁,由于其本身锁芯密齿的有限加之开锁工具钥匙的容易复制性,使得其安全性大大降低,随着人们生活质量的提高,如何实现安全有效的防盗这一问题受到越来越多人的关注。传统的机械锁由于安全性能太差,被撬的事件屡见不鲜,相比之下,电子密码锁因其保密性强,使用灵活性好,安全系数高,受到了广大用户的欢迎。电子密码锁作为一种新型的锁,不仅拥有海量的密齿,通常从10000到10000000不等,还省去了传统机械锁的钥匙,使用者只要记得其密码,便可以开启,从而大大提高了防盗功能,
本文主要设计了一种以单片机89C51为核心的电子密码锁,详细的介绍了该电子密码锁完整的设计过程以及外围的开锁电路和报警电路的设计。电子密码锁主要由三部分组成:键盘接口电路、电子密码锁的控制电路、输出八段显示电路。键盘接口电路包括时序产生电路、键盘扫描电路、弹抖消除电路、键盘译码电路。电子密码锁控制电路设计包括数字按键的数字输入、存储和清除、功能按键的功能设计、移位寄存器的设计和控制、密码清除、变更、存储、报警信号产生电路密码核对、解除电锁电路。输出八段显示电路包括数据选择电路、八段显示器扫描电路。
关键词:电子密码锁,89C51,键盘接口,输出八段显示
1
Abstract
Ever since mankind started making locks since locks are used in long-term mechanical lock, the popular talk is marbles core lock. The traditional marbles core lock cylinder due to its own limited addition fine-toothed tool for unlocking the key to easy reproduction, so their safety is greatly reduced, as people improve the quality of life, how to achieve safe and effective anti-theft problem by growing concern. Because traditional mechanical locks poor safety performance, was a common occurrence pry contrast, electronic locks for its confidentiality, use good flexibility, high safety factor, the majority of users. Electronic code lock as a new type of lock, not only has a mass of fine-toothed, usually ranging from 10,000 to 10,000,000, also eliminates the traditional mechanical key to the lock, the user just remember their password, they can open, thus greatly improving anti-theft feature, this paper designed a 89C51 microcontroller core with an electronic lock, a detailed description of the complete electronic locks to unlock the design process and the external circuit and alarm circuit. Electronic code lock consists of three parts: the keyboard interface circuit, electronic lock control circuit, the output Ba Duan display circuit. Keyboard interface circuit including the timing generating circuit, the keyboard scanning circuit, bounce elimination circuit, the keyboard decoder circuit. Electronic code lock control circuit design, including digital key digital input, storage and clean, functional design of function keys, shift register design and control, password remove, change, to step down, storage, alarm signal generating circuit password check, the lifting power locks circuit. Ba Duan display circuit including the output data selection circuit, eight out display scanning circuit. Keywords: electronic code lock, 89C51, keyboard interface, the output shows eight out
2
目录
第一章 绪 论 ......................................................... 4 1.1几种常见的密码锁 ...................................................................................................... 4 1.2研究背景 ...................................................................................................................... 4 1.3国内外研究现状和发展趋势 ...................................................................................... 5 1.4本文研究的主要内容 .................................................................................................. 5 第二章 方案论证 ....................................................... 6 2.1方案 .............................................................................................................................. 6 2.2功能设计及其设计思路 .............................................................................................. 7 第三章 电路的功能单元设计 ............................................. 7 3.1 AT89C51单片机介绍 ................................................................................................. 7
3.1.1AT89C51芯片简介 ....................................................................................... 7 3.1.2 引脚说明 ..................................................................................................... 8
3.2开锁机构 .................................................................................................................... 11 3.3按键电路设计 ............................................................................................................ 12 3.4显示电路设计 ............................................................................................................ 13 3.5 AT24C02掉电存储单元的设计 ............................................................................... 14
3.5.1AT24C02 ...................................................................................................... 14 3.5.2掉电存储电路 ............................................................................................ 15
3.6密码锁的电源电路设计 ............................................................................................ 15 3.7设计整体电路图 ........................................................................................................ 16 第四章 程序设计 ...................................................... 17 4.1主程序流程图 ............................................................................................................ 17 4.2详细程序 .................................................................................................................... 18 结束语 ............................................................... 28
3