c语言设置一个8位缓存区程序,基于C语言STC89C52单片机电子密码锁设计与仿真.doc...

届 别 2010 学 号 座机电话号码0123

毕业设计

基于C语言STC89C52单片机电子

密码锁设计与仿真

姓 名 系 别、 专 业 物电系 导 师 姓 名、职 称 讲师 完 成 时 间 2010-5-10 目录

摘 要I

ABSTRACTII

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单片机程序,制作智能电子密码锁。系统由矩阵键盘、单片机系统、ld显示和报警系统组成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 you can open the lock by key only and in the same time it stopping alarming. In order to ensure the convenience changing and permanent preseving of the code we use the memory chips, so that when we are under the condition of i

你可能感兴趣的:(c语言设置一个8位缓存区程序)