摘要自人们有“住所”的概念以来,锁就与人们的生活密不可分。最开始出现的机械锁简单方便,能很大程度的满足人们对锁的需求,但其弊端在于钥匙太多,或易丢失,锁的最基本功能——安全性还有待提高,特别是现代社会中,人们对于私密空间越来越重视,同时对自身财务,公司集体财物等安全的警惕性也越来越高,此时传统的机械锁显然已经落后于时代。红外电子密码锁则很好的解决了传统机械锁留下的问题,红外电子密码锁密码的输入形式多样化,完美结合了红外设备稳定不易受干扰的特点,能满足现代人对密码锁更严苛的要求。本设计密码锁采用 STC89C51 单片机做主系统,能实现自定义六位数密码、修改密码、红外输入密码、红外开锁、密码错误触动警报、显示密码错误与否等功能,全面满足不同人不同工作对密码锁的不同要求。关键词:STC89C5、红外密码锁AbstractSince people have the concept of "residence" , lock has been inseparable from people's life. The first mechanical locks were simple and convenient, and could satisfy people's needs for locks to a great extent, but their disadvantages were that there were too many keys, or they were easy to lose, and the basic function of locks -- safety -- needed to be improved, especially in Modern Society People pay more and more attention to the private space, at the same time, they are more and more alert to the safety of their own financial and company's collective property. The infrared electronic code lock solves the problem left by the traditional mechanical lock very well. The input form of the infrared electronic code lock is diversified, which perfectly combines the characteristics of the infrared equipment which is stable and not easy to be interfered Can meet the modern people to the password lock more stringent requirements. This design password lock uses the STC89C51 Monolithic Integrated Circuit as the main system, can realize the self-definition six-digit Password, the revision password, the infrar...