成都理工大学工程技术学院毕业论文基于AT89C51的电子号码锁设计学生姓名:2B专业名称:测控技术与仪器指导教师:2B讲师基于AT89C51的电子号码锁设计I摘要随着人们的生活水平的提高,如何实现家庭防盗这一问题也变的尤其的突出,传统机械锁由于结构简单,被撬事件屡见不鲜;电子锁由于其保密性高,使用灵活性好,安全系数高,受到了广大用户的青睐,本课题具有实际应用价值。本设计以单片机AT89C51作为密码锁监控装置的检测和控制核心,分为主机控制和从机执行机构(本设计重点介绍主机控制),实现钥匙信息在主机上的初步认证注册、密码信息的加密、钥匙丢失报废等功能。根据51单片机之间的串行通信原理,这便于对密码信息的随机加密和保护。而且采用键盘输入的电子密码锁具有较高的优势。采用数字信号编码和二次调制方式,不仅可以实现多路信息的控制,提高信号传输的抗干扰性,减少错误动作,而且功率消耗低;反应速度快、传输效率高、工作稳定可靠等。软件设计采用自上而下的模块化设计思想,以使系统朝着分布式、小型化方向发展,增强系统的可扩展性和运行的稳定性。测试结果表明,本系统各项功能已达到本设计的所有要求。经实验证明,该密码锁具有设计方法合理,简单易行,成本低,安全实用等特点,符合住宅、办公室用锁要求,具有推广价值。关键词:单片机密码锁单片机设计电子锁基于AT89C51的电子号码锁设计IIAbstractAspeople'slivingstandardenhancement,howtorealizethefamilyguardagainstthefthasbecomeaparticularlyprominent,thetraditionalmechanicallockbecauseofitssimplestructure,prizingeventsitisoftenseen.;electroniclockhighbecauseoftheirconfidentiality,theuseofflexibilitygood,highsafetyfactor,bythefavorofthemajorityofusers,thispaperhaspracticalvalue.Thedesignofsingle-chipAT89C51ascipherlockmonitoringdeviceforthedetectionandcontrolofthecore,thehostisdividedintocontrolandtheslaveactuator(thissetfocusesoncontrolofthehost),realizethekeyinformationinahostofpreliminaryregistration,passwordinformationencryption,keylossandfunction.Accordingtothe51single-chipserialcommunicationbetweentheprinciple,itisconvenientforthepasswordinformationrandomencryptionandprotection.Andtheuseofkeyboardinputoftheelectroniccodelockhashighadvantage.Digitalsignalencodingandthetwomodulationmodes,whichcannotonlyrealizethemultiplexedinformationcontrol,toimproveanti-interferencesignaltransmission,reducethemistakeaction,andlowpowerconsumption;fastreactionspeed,hightransmissionefficiency,suchasstableandreliablework.Thesoftwaredesignusesatop-downmodulardesignconcept,tomakethesystemdistributedtowardsminiaturization,thedirectionofdevelopment,enhancethesystem'sscalabilityandstability.Thetestresultsshowthat,variousfunctionsofthissystemhasreachedthedesignrequirementsforall.Provedbyexperiment,thelockhasadesignmethodisreasonable,simple,lowcost,safetyandpracticality,withresidential,officelockrequest,havepromotionvalue.keyword:Singlechipmicrocomputer,cryptogramlock,Singlechipdesign,electroniclock.基于AT89C51的电子号码锁设计III目录摘要...................................................................................................................IAbstract.........................................................................................................II目录................................................................................................................III1绪论...............................................................................................................11.1引言....................................................................................................11.2电子密码锁的背景............................................................................11.3电子锁设计的特点............................................................................21.4电子锁设计的意义............................................................................31.5电子号码锁的发展趋势....................................................................31.6本设计的特点....................................................................................42系统设计.......................................................................................................52.1初步设计思路....................................................................................52.2系统总设计结构图............................................................................52.3开锁机构设计....................................................................................63系统硬件设计...............................................................................................73.1PROTEUS软件介绍..............................................................................73.2系统电路设计.....................................................................................83.2.1单片机AT89C51简介..............................................................83.2.2晶振电路................................................................................113.2.3复位电路................................................................................123.2.44×4矩阵键盘设计................................................................123.2.5数码管及LED显示电路........................................................133.2.6开锁电路................................................................................143.2.7其他引脚................................................................................153.3电路图的绘制..................................................................................153.4系统仿真结果..................................................................................164软件设计.....................................................................................................184.1KEILC51简介..................................................................................184.2系统软件设计整体思路..................................................................184.3系统软件设计总流程图........................................................