基于单片机的电子密码锁设计摘要由于现在的人们生活质量不断在提高,平时日常住所的贵重物品与工作部门的一些需要保密的资料或不可泄漏的个人信息的保存等许多需要防盗的问题变得越发重要。传统的机械锁其构造极其简单,容易被恶意损坏,在防盗方面存在很多的隐患,此外携带方面也导致许多的不便问题。因此,在相关科技的支持下,密码锁这种不需要实际钥匙的锁随之诞生,通过它的成本低且消耗低、方便操作、安全性能有一定的保证等一系列的优点,慢慢地取代机械锁原来的位置,受到越来越多的人喜欢。此电子密码锁的设计是基于单片机技术,分为硬件和软件两个部分。硬件部分由STC89C52单片机最小系统、AT24C02存储、矩阵键盘、LCD1602显示和蜂鸣器提示等组成;通过软件部分的设计,具备的功能有设置和修改开锁密码(六位密码)、超次报警并锁定(密码错误次数超过两次)。上述的功能是密码锁的基本功能,还能根据使用情况添加相应的功能,本设计低成本却实用。关键词:STC89C52 LCD1602 AT24C02 矩阵键盘 IAbstractAs people's quality of life continues to improve, it becomes increasingly important to protect valuables in daily homes and some confidential or undisclosed personal information in the residential sector. The structure of traditional mechanical lock is extremely simple, easy to be damaged by malicious, and there are many hidden dangers in the aspect of security. In addition, the carrying aspect also causes many inconvenience problems. Therefore, with the support of relevant science and technology, the electronic password lock is produced which does not need a key. It has a series of advantages, such as low cost and low consumption, convenient operation, safety performance and so on, so the mechanical lock is gradually replaced.Therefore, electronic password locks are becoming more and more popular. The design of this electronic password lock are mostly based on microprocessor, which is divided into two parts: hardware and software. The hardware part is composed of STC89C52 microc...