基于C语言STC89C52单片机电子密码锁设计与仿真.doc
文本预览下载声明
届 别 2010
学 号 200614060123
毕业设计
基于C语言STC89C52单片机电子
密码锁设计与仿真
姓 名
系 别、 专 业 物电系
导 师 姓 名、职 称 讲师
完 成 时 间 2010-5-10
目录
摘 要 I
ABSTRACT II
1 概述 1
1.1电子密码锁的研究现状及前景 1
1.2电子密码锁的基本构件及优点 1
2 系统硬件构成 2
2.1硬件电路主要芯片(MCS-52) 2
2.2 1602液晶显示 4
3 功能分析 6
3.1 中断 6
3.2键盘 9
3.3C总线 11
4 程序分析 13
5 系统电路与Proteus仿真 25
5.1Proteus简介 25
5.2仿真步骤 25
5.3系统仿真电路(如下图) 25
5.4 仿真结果 26
6结论 26
参考文献 27
致 谢 27
摘 要
密码锁是现代生活中经常用到的工具之一,常用于各类保险柜、房门、防盗门等。电子密码锁, 克服了传统的机械式密码锁密码量少、安全性能差的缺点。特别是使用微处理器制作的智能电子密码锁, 它除具有电子密码锁的功能外, 还可引入了智能化管理功能, 从而使密码锁具有更高的安全性和可靠性。
本文介绍如何使用C语言编写8051单片机程序,制作智能电子密码锁。系统由矩阵键盘、单片机系统、lcd显示器和报警系统组成。该智能电子密码锁主要可由使用者自己设定一个6位数的密码, 将密码锁上锁。只有在按“PUT IN CODES”码后12秒内输入和设定的密码相同时, 才能将锁打开,否则报警,报警后只有通过使用钥匙才能打开并停止报警。为了保证密码的更改方便与永久保存, 使用了存储芯片,这样, 在断电条件下, 其内部密码数据则可保持100年不丢失。
本程序已经在proteus仿真以及开发板用行成功。
关键词:电子密码锁;单片机;矩阵键盘;lcd显示器;报警
ABSTRACT
Code-Lock, one of the tools used in various types of insurance to resist, doors, security doors, is already extensively used in modern life.The electronic lock replacing the traditional mechanical locks overcome the limited password number and the poor security of the mechanical lock. Particularly, the intelligent electronic lock produced by microprocessors, which, in addition with an electronic code lock function, but also introducing a intelligent management feature to let the code-lock possess a higher security and reliability. This article describes how to use the C language program 8051 to make the intelligent electronic code-lock. The System consists of matrix keyboard, SCM system, lcd display and alarm system components. The intelligent electronic lock provide the user to set a six-digit password himself and let the password lock locked. Only in accordance with PUT IN CODES yards input the right code within 12 seconds you can open the lock, or it will alarm, after which
显示全部