1、 0 基于单片机的电子密码锁设计基于单片机的电子密码锁设计 摘摘 要要 随着人们生活水平的提高,如何实现家庭防盗这一问题也变得尤为突出。在 科学技术不断发展的今天,电子密码防盗锁作为防盗卫士的作用显得日趋重要。 本文从经济实用的角度出发, 系统由STC89C52与低功耗CMOS型 E PROM AT24C02 作为主控芯片与数据存储器单元,结合外围的键盘输入、LCD 显示、 报警、开锁等电路模块。它能完成以下功能:正确输入密码前提下,开锁;错误 输入密码情况下,报警;密码可以根据用户需要更改。用 C 语言编写的主控芯 片控制程序与 EEPROM AT24C02 读写程序相结合,并用 Keil软
2、件进行编译,设 计了一款可以多次更改密码,具有报警功能的电子密码控制系统。 本密码锁具有设计方法合理,简单易行,成本低,安全实用,保密性强,灵 活性高等特点,具有一定的推广价值。 关键词:电子密码锁;报警;液晶显示 1 Design of Electric Password Lock Based on MCU Abstract As peoples living standards improve, the question how to achieve home security has become particularly prominent. In science and techno
3、logy is developing continuously, electronic code lock as a security guards role is increasingly important. This article from the economical point of view, the system by the STC89C52 with low power CMOS based E PROM AT24C02 as the master chip and the data memory unit, combined with the external keybo
4、ard, LCD display, alarm, unlock and other circuit modules. It performs the following functions: enter the password correctly under the premise of unlocking; wrong password case the alarm; password can be changed according to user needs. Master in C language control program and EEPROM AT24C02 chip to
5、 read and write process are combined and compiled with the Keil software, designed a number you can change the password, the password with an electronic alarm control system. The lock has a reasonable design, simple, low cost, safe and practical, confidentiality, flexibility, and high, with some pro
6、motional value. Key Words:Electric Password lock;Alarm; LCD Display 2 目目 录录 引言引言 5 第第 1章章 绪论绪论. 6 1.1 电子密码锁的背景与研究意义 . 6 1.2 电子密码锁的现状及发展趋势 . 6 1.3 本章小结 . 8 第第 2章章 系统整体方案设计系统整体方案设计 9 2.1 设计目标 . 9 2.2 主控部分的选择 . 9 2.3 密码输入方式的选择. 9 2.4 本章小结 .10 第第 3章章 硬件系统设计硬件系统设计 . 11 3.1 系统芯片介绍. 11 3.1.1 单片机 STC89C52 功能介绍. 11 3.1.2 LCD1602 显示器介绍 .12 3.1.3 存储芯片 AT24C02 介绍 .13 3.1.4 I2C 总线介绍 13 3.2 硬件电路设计.15 3.2.1 复位电路 15 3.2.2 晶振电路 16 3.2.3 存储电路 .16 3.2.4 键盘输入电路 .17 3.2.5 显示电路 18 3.2.6 电源输入电路 .19 3.2.7