课程设计(论文)说明书题目:基于单片机的电子密码锁设计院(系):专业:学生姓名:学号:指导教师:职称:2011年12月10日桂林电子科技大学课程设计(论文)报告用纸第1页共3页摘要本文详细介绍了一种基于单片机电子密码锁的设计方案。描述了电子密码锁的总体结构、主要功能及工作原理等内容。传统的机械锁由于安全性能太差,被撬的事件屡见不鲜,相比之下,电子密码锁因其保密性强,灵活性好,安全系数高,受到了广大用户的欢迎。电子密码锁作为一种新型的锁,省去了传统机械锁的钥匙,使用者只要记得其密码,便可以开启,从而提高了防盗功能,本文主要设计了一种以单片机89S52为核心的电子密码锁,详细的介绍了该电子密码锁完整的设计过程以及外围的开锁电路。电子密码锁主要由三部分组成:键盘接口电路、电子密码锁的控制电路、输出八段显示电路。键盘接口电路包括时序产生电路、键盘扫描电路、弹抖消除电路、键盘译码电路。电子密码锁控制电路设计包括数字按键的数字输入、清除、功能按键的功能设计、输出八段显示电路包括数据选择电路、八段显示器扫描电路。关键词:电子密码锁;89S52;键盘接口;输出八段显示。AbstractThisarticleparticularlyintroducesthedesign89S51microcontrollercorewithanelectroniclock,describetheoverallstructureofelectroniclock,mainfunctionandworkingprinciples.Becausetraditionalmechanicallockspoorsafetyperformance,it’seasyforsomeonetopickalock.Electroniclocksforitsconfidentialityusegoodflexibility,highsafetyfactor,themajorityofusers.Electroniccodelockasanewtypeoflock,eliminatesthetraditionalmechanicalkeytothelock,theuserjustremembertheirpassword,theycanopen,thusgreatlyimprovinganti-theftfeature.Electroniccodelockconsistsofthreeparts:thekeyboardinterfacecircuit,electroniclockcontrolcircuit,theoutputoferectiondigitaltubecircuit.Keyboardinterfacecircuitincludesthetiminggeneratingcircuit,keyboardscanningcircuit,bounceeliminationcircuit,thekeyboarddecodercircuit.Electroniccodelockcontrolcircuitdesign,includingdigitalkeydigitalinput,functionaldesignoffunctionkeys,shiftregisterdesignandcontrol,passwordremove,change,tostepdown,storage,alarmsignalgeneratingcircuitpasswordcheck,theliftingpowerlockscircuit.Keywords:electroniccodelock;89S52;keyboardinterface;outputofeightdigitaltube桂林电子科技大学课程设计(论文)报告用纸第2页共3页目录引言...................................................................................................................11.关于课题...................................................................................................................................11.1几种常见的密码锁...............................................................................................................11.1.1普通密码锁....................................................................................................................11.1.2机械密码锁....................................................................................................................11.1.3电磁/卡片式密码锁...................................................................................................11.1.4指纹密码锁....................................................................................................................11.2研究背景及意义...................................................................................................................21.3本设计主要内容及功能描述.............................................................................................22.系统总体方案设计..............................................................................................................23.硬件电路设计.........................................................................................................................33.1AT89S52介绍.........................................................................................................................33.1.1芯片介绍.........................................................................................................................33.1.2引脚排列及其功能.......................................................................................................43.2按键电路设计........................................................................................................................53.3LED显示电路.........................................................................................................................63.4开锁电路................................................................................................................................73.5复位电路................................................................................................................................74.软件设计...................................................................................................................................84.1软件设计思路........................................................................................................................84.2软件主程序流程图...............................................................................................................94.3中断服务子程序流程图....................................................................................................105.系统调试................................................................................................................................106.总结..........................................................................................................................................11谢辞...............................................................................................................................................12桂林电子科技大学课程设计(论文)报告用纸第3页共3页参考文献..........................................................................................................................................13附录.......