1、 I 摘 要 在日常的生活和工作中, 住宅与部门的安全防范、单位的文件档案、财务报 表以及一些个人资料的保存多以加锁的办法来解决。若使用传统的机械式钥匙开 锁,人们常需携带多把钥匙, 使用极不方便, 且钥匙丢失后安全性即大打折扣。随 着科学技术的不断发展,人们对日常生活中的安全保险器件的要求越来越高。为 满足人们对锁的使用要求,增加其安全性,用数字密码代替钥匙的单片机控制的 电子密码锁应运而生。 在这次毕业设计中我采用 AT89C51 单片机为核心 4*4 矩阵键盘作为输入器件, LCD1602 字符型液晶作为显示电路来制作基于单片机的电子密码锁。 该密码锁具有 可更改密码、密码掉电保护、输入
2、密码错误报警、输入密码错误三次锁定键盘的 功能。该密码锁具有操作人性化、低功耗、高保密性等一系列优点。本文详细地 介绍了系统硬件与软件的设计,以及仿真调试的详细过程。 关键词:4*4 矩阵键盘, AT89C51, 1602LCD 显示器,密码锁 II Abstract In our daily life, the security of house, company department, documents and finance forms, also some personal information always used the lock to protect them. If us
3、e the normal keys to lock out the door, we should taken many keys with us . That is so difficult to use. And if we lost the keys with careless, the security looks very easy to break out. As the developing of the technology people ask for high security machines. For satisfy this request, the cipher l
4、ock is appeared. The cipher has higher security, lower cost, lower power and easy to use. At the graduation design I AT89C51 microcontroller as the core 4 * 4 matrix as input devices, LCD1602 keyboard type LCD display circuit as a character based on single chip to make the electronic combination loc
5、k. This combination lock has may change your password, password off electricity protection, input password mistake alarm, input password mistake three times the function of lock the keypad. This combination lock have operation humanization, low power consumption, high confidentiality and so on a ser
6、ies of advantages. This paper introduced in detail the system hardware and software design, and the detailed process simulation debugging. Keywords: matrix keyboards, AT89C51, 1602LCD, combination lock I 目录目录 第 1 章 概论 . 1 1.1 设计意义 1 1.2 背景知识介绍 . 1 1.3 本文主要工作以及内容安排 2 第 2 章 系统总体方案设计 . 3 2.1 总体方案设计 3 2.1.1 实现功能: 3 2.1.2 4*4 键盘说明 4 2.2 AT89C51 单片机介绍 4 2.3 硬件设计 . 6 2.3.1 时钟电路的设计 6 2.3.2 复位电路的设计 7 2.3.3 密码存储电路的设计 8 2.3.4 键盘电路设计 9 2.3.5 显示电路的设计 . 11 2.3.6 报警电路 . 14 2.3.7 开锁电路 . 15 第 3 章 软件设计 . 16 3