基于单片机的电子密码锁设计摘要随着人们生活水平的提高,如何实现家庭防盗这一问题也变得尤为突出。在科学技术不断发展的今天,电子密码防盗锁作为防盗卫士的作用显得日趋重要。本文从经济实用的角度出发,系统由STC89C52与低功耗CMOS型E²PROMAT24C02作为主控芯片与数据存储器单元,结合外围的键盘输入、LCD显示、报警、开锁等电路模块。它能完成以下功能:正确输入密码前提下,开锁;错误输入密码情况下,报警;密码可以根据用户需要更改。用C语言编写的主控芯片控制程序与EEPROMAT24C02读写程序相结合,并用Keil软件进行编译,设计了一款可以多次更改密码,具有报警功能的电子密码控制系统。本密码锁具有设计方法合理,简单易行,成本低,安全实用,保密性强,灵活性高等特点,具有一定的推广价值。关键词:电子密码锁;报警;液晶显示DesignofElectricPasswordLockBasedonMCUAbstractAspeople'slivingstandardsimprove,thequestionhowtoachievehomesecurityhasbecomeparticularlyprominent.Inscienceandtechnologyisdevelopingcontinuously,electroniccodelockasasecurityguard'sroleisincreasinglyimportant.Thisarticlefromtheeconomicalpointofview,thesystembytheSTC89C52withlowpowerCMOSbasedE²PROMAT24C02asthemasterchipandthedatamemoryunit,combinedwiththeexternalkeyboard,LCDdisplay,alarm,unlockandothercircuitmodules.Itperformsthefollowingfunctions:enterthepasswordcorrectlyunderthepremiseofunlocking;wrongpasswordcasethealarm;passwordcanbechangedaccordingtouserneeds.MasterinClanguagecontrolprogramandEEPROMAT24C02chiptoreadandwriteprocessarecombinedandcompiledwiththeKeilsoftware,designedanumberyoucanchangethepassword,thepasswordwithanelectronicalarmcontrolsystem.Thelockhasareasonabledesign,simple,lowcost,safeandpractical,confidentiality,flexibility,andhigh,withsomepromotionalvalue.KeyWords:ElectricPasswordlock;Alarm;LCDDisplay目录引言.........................................................................................................................................................1第1章绪论.......................................................................................................................................21.1电子密码锁的背景与研究意义............................................................................................21.2电子密码锁的现状及发展趋势............................................................................................21.3本章小结.......................................................................................................................................4第2章系统整体方案设计..........................................................................................................52.1设计目标.......................................................................................................................................52.2主控部分的选择.........................................................................................................................52.3密码输入方式的选择...............................................................................................................52.4本章小结.......................................................................................................................................6第3章硬件系统设计....................................................................................................................73.1系统芯片介绍........................................................................................................................