-0-金华职业技术学院毕业教学成果目录摘要...............................................................................................................................................................1英文摘要......................................................................................................................................................2引言...............................................................................................................................................................31概述........................................................................................................................................................42系统硬件设计......................................................................................................................................42.1硬件组成及工作原理.............................................................................................................42.2单片机选型...............................................................................................................................52.3时钟电路....................................................................................................................................52.4复位电路....................................................................................................................................62.5密码存储电路...........................................................................................................................72.6矩阵式键盘电路设计.............................................................................................................72.7报警电路....................................................................................................................................82.8显示电路....................................................................................................................................83系统软件方案......................................................................................................................................93.1设计与分析...............................................................................................................................94系统调试..............................................................................................................................................114.1硬件调试...................................................................................................................................114.2软件调试...................................................................................................................................11结论与谢辞................................................................................................................................................12参考文献..................................................................................................................................13附件1:元器件清单...............................................................................................................14附件2:系统软件...................................................................................................................15附件3:电路图.......................................................................................................................22附件4:PCB图.......................................................................................................................23-1-基于单片机和串行EEPROM的智能密码锁的设计与制作信息工程学院应用电子专业摘要:传统的门锁既要备有大量的钥匙,又要担心钥匙丢失后的麻烦。随着单片机的问世,出现了带微处理器的密码锁,它除具有电子密码锁的功能外,还引入了智能化、科技化等功能,从而使密码锁具有很高的安全性、可靠性,受到了广大用户的亲睐。本文介绍一种基于单片机和串行EEPROM的智能密码锁,对系统硬件设计和软件实现进行了详细的描述。该系统采用STC89C51单片机和AT24C02串行EEPROM,通过STC89C51模拟I2C总线和AT24C02通讯来读取存储的密码,用户通过键盘输入的密码,实现密码锁的功能。关键词:智能密码锁STC89C51AT24C02-2-Single-chipEEPROMandserial-basedIntelligentDesignandlockstheproductionofMajorofAppliedElectronicTechnologyInformationandEngineeringCollegeyingjunqingAbstract:Bothtraditionallockshavealotofkeys,butalsoworriedaboutthetroubleafterthelossofkeys.Withtheadventofsingle-chip,amicroprocessorwiththepasswordlock,whichinadditiontothefunctionsofelectroniclocks,butalsotheintroductionofintelligent,technologyandotherfunctions,sothatlockswithhighsecurity,reliability,themajorityofusershavebeenpro-gaze.ThispaperpresentsasinglechipandserialEEPROM-basedsmartlocksonthesystemhardwaredesignandsoftwareimplementationdescribedindetail.ThesystemusesSTC89C51andAT24C02single-chipserialEEPROM,throughtheI2CbusandSTC89C51simulationAT24C02communicationtoreadstoredpasswords,userpasswordthroughthekeyboardinputtoachievethefunctionoflocks.Keywords:smartlocksSTC89C51AT24C02-3-引言随着社会物质财富的日益增长和人们生活水平的提高,安全成为现代居民最关心的问题之一。此外电子技术的飞速发展,给传统的机械锁带来了巨大的变革,现代的电子技术与机械技术相结合,产生了一大批智能锁:指纹锁、IC卡辨识、遥控锁、声控锁等先进的锁具。虽然这类产品安全性高,但是这类产品的特点是针对特定指纹或有效卡,只能适用于保密要求高且仅供个人使用的箱、柜、房间等。而且卡片式IC卡还有易丢失等特点,加上其生产成本高,安装使用不方便,一定程度上限制了这类产品的普及和推广。本文介绍的是一种基于ST89C51单片机和AT24C02串行EEPROM的智能密码锁的硬件设计和软件实现方法,这种电路设计具有防试探按键输入、智能控制上锁、开锁、报警、修改密码等多种功能。密码长度可变,保密性强,灵活性高,外接各种执行机构,可广泛用于车辆、大门、保险柜等各种需上锁的场合。-4-1概述本设计中,智能密码锁工作时分为两种工作状态,分别是正常状态和锁定状态。锁定状态时,输出锁定信号,供外部执行机构使用,实现上锁功能;正常状态时,锁定信号消失,供外部执行