毕业设计题目:基于单片机的电子密码锁设计与实现姓名:王东雪学号:2010080403204学院:信息学院专业:电子信息工程指导教师:张巧杰协助指导教师:2012年5月20日北京联合大学毕业设计I摘要近年来,随着改革开放的深入发展,电子电器的飞速发展。人民的生活水平有了很大提高。各种高档家电产品和贵重物品为许多家庭所拥有。然而不法分子也是越来越多,原因在于大部分人防盗意识还不够强,造成偷盗现象屡见不鲜。越来越多的居民家庭对财产安全问题十分担忧。因此,出于安全方便等方面的需求,电子密码锁相继问世。本设计是以单片机AT89S51为主控芯片,并结合外围液晶显示LCD1602、存储芯片AT24C02、红外遥控HS0038,以及键盘输入、复位、电源等电路组合而成。系统能够完成开锁、报警、修改密码等基本功能,还能够通过红外来控制单片机的开锁,以及掉电储存密码的功能。整个设计在Keil开发环境下,用C语言编写主控芯片的控制程序来实现具有多功能的电子密码锁。关键词:密码锁AT89S51储存显示红外北京联合大学毕业设计IIAbstractInrecentyears,withthedeepeningofreformandopening-up,withtherapiddevelopmentofelectronicappliances.Thepeople'slivingstandardhasbeengreatlyimproved.Avarietyofhigh-gradehouseholdelectricalappliancesandthevaluableshaveformanyfamilies.Howevercriminalsarealsomoreandmore,becausemostpeoplesecurityawarenessisnotstrongenough,causingstealphenomenonitisoftenseen.Moreandmorehouseholdsinpropertysafetyisconcernedabout.Therefore,forthesafeandconvenientandotheraspectsofthedemand,electronicpasswordlockinsuccession.ThedesignisbasedonSCMAT89S51asmaincontrolchip,andthecombinationofperipheralLCD1602liquidcrystaldisplay,memorychipAT24C02,infraredremotecontrolHS0038,andkeyboardinput,reset,powercircuitassembly.Thesystemcancompletethelock,alarm,modifypasswordsandotherfunctions,canalsothroughinfraredtocontrolchiplock,andpower-downsavepasswordfunction.ThewholedesignintheKEILdevelopmentenvironment,usingClanguagemastercontrolchipcontrolprocedurestoachievemultifunctionalelectroniccipherlock.KeyWords:PasswordlockAT89S51StorageDisplayInfrared北京联合大学毕业设计III目录摘要.........................................................................................................................IAbstract.........................................................................................................................II引言..........................................................................................................................11概述............................................................................................................................21.1课题背景和意义..............................................................................................21.2电子密码锁的发展趋势...................................................................................22系统总体设计思路....................................................................................................32.1系统设计要求..................................................................................................32.2系统设计方案...................................................................................................33系统硬件设计与实现................................................................................................43.1主控芯片AT89S51..........................................................................................43.2存储模块AT24C02.........................................................................................73.3红外模块HS0038............................................................................................93.4显示模块LCD1602.......................................................................................103.5电源电路模块................................................................................................113.6键盘输入模块................................................................................................123.7报警电路........................................................................................................133.8开锁电路........................................................................................................133.9复位电路........................................................................................................143.10串行通信电路...............................................................................................143.11系统整体原理图..........................................................................................164系统软件设计...........................................................................................................174.1主程序设计....................................................................................................174.2键值判断设计.................................................................................................18北京联合大学毕业设计IV4.3开锁设计.........................................................................................................194.4密码修改设计.................................................................................................204.5红外遥控设计................................................................................................224.6Keil编程软件介绍.........................................................................................245仿真设计..................................................................................................................275.1Protues仿真软件概述....................................................................................275.2Protues与Keil的连调...................................................................................285.3Protues与Keil的连调的仿真结果.........................................