网学网为广大网友收集整理了,智能小区中的电子门锁设计,希望对大家有所帮助!
论文编号:ZD1025 论文字数:12609,页数:34
摘 要
随着人们生活水平的提高,如何实现家庭防盗这一问题也变的尤其的突出。传统的机械锁由于其构造的简单,被撬的事件屡见不鲜,且始终存在门锁钥匙可复制的情况,这是机械钥匙无法避免的问题。随着电子技术的发展,人们将单片机技术、IC卡技术应用于门锁,就产生了机电一体化完美结合的产品,即IC卡锁。
本文设计的智能小区中的电子门锁,以AT24C01作IC卡,以AT89S52作为控制器,用C51语言编写软件,对IC卡进行读写。它能够实现用IC卡及密码开锁,能够很方便地重新设置密码,对新卡实现写密码的功能。这种电子门锁可用于智能小区的范围,具有普遍的现实意义。
关键词:家庭防盗、电子门锁、单片机、IC卡、密码
Abstract
With the development of the living standard of the people, how to achieve security of the family also become particularly prominent. Traditional mechanical lock because of its simple structure, prizing frequent events, and there is always the key lock can be copied, which is the mechanical problem of the key can not be avoided. With the development of electronic technology, there will be microprocessor technology, IC card technology used in door locks, have had a mechanical-electrical integration on the perfect combination of products, that is, IC card lock.
In this paper, the design of the Intelligent Community of the electronic door locks, IC card to be AT24C01, AT89S52, as a controller, with software written in C51, the IC card can be read and written. It can be achieved using IC card and unlock password can be easily re-set the password, the new card features write password. It can be achieved using IC card and unlock password can be easily re-set the password, the password for the new cards to write. This electronic door locks can be used for intelligent community of the scope of universal relevance.
Keywords:Family security、Electronic door locks、microprocessor、IC card、Password
目 录
摘要…………….…………..……………………………………………………………………..I
1 绪论…………………..………………………………………………………………………..1
1.1 选题背景及意义……….………………………………………………………….……..1
1.2 目前电子锁种类……….………………………………………………………….…......1
1.3 接触式IC卡电子锁设计方案…………………………………………………. .. .……3
2 总体设计方案……..…..….………………………………………………………….………..5
2.1 系统总体结构………….………………………………………………………….……..5
2.2 系统硬件结构………….………………………………………………………….…......5
2.3 系统总体软件流程…….…… …………………………………………………. .. .……6
3 单片机控制液晶显示.……………………………………………………………….….…8
3.1 SMC 1602A LCM 液晶概况…………..……………...……………………...….……..8
3.1.1 主要技术参数………………..………………………………………...………...8
3.1.2 引脚信号…………………………….……………………………………….…..8
3.1.3 外形尺寸…………………………….…………………………………………...8
3.2 控制器接口……………...………………………………………………………………9
3.2.1 基本操作时序…………………………………………………………………..9
3.2.2 状态字说明……………………………………………………………………..9
3.2.3 RAM地址映射…..……………………………………………………………..9
3.3 单片机控制液晶指令…………………...………………………………………………9
3.3.1 初始化设置…………..…………………………………………………..………9
3.3.2 数据控制………………………………………………………………………..10
4 4*4矩阵键盘模块………………………………………………………………………...11
4.1 键盘的介绍………………………………………………….…………………………11
4.1.1 键盘的分类…………………………………………..………………………....11
4.2 键盘去抖………………………………………………….………………………......12
4.2.1 硬件防抖技术………………………………………………………...…...12
4.2.2 软件防抖技术………………………………………………………...…...13
4.3 单片机控制矩阵键盘…….……………………………………………………………13
5 AT89C52单片机与AT24C01 EEPROM的IIC通信………………..……………………14
5.1 相关硬件介绍…………………………………………………………………………14
5.1.1 AT89C52单片机介绍………………………………………………...…...14
5.1.2 AT24C01 IC卡介绍………………………………………………………14
5.1.3 IC卡座介绍……………………………………………………….………15
5.2 IIC通信协议………………………………………………………………………..…16
5.2.1 IIC总线特点……………..…………………………………………...…...16
5.2.2 IIC总线工作原理…………………………………………………………16
5.2.3 IIC应用AT24C01…..…………………………………………………….18
6 系统的调试…………………………………………………………………………………24
6.1 数字电路、单片机部分的调试………………………………………………….……24
6.2 1602液晶显示调试………...……………………………………………………….…24
6.3 4*4矩阵键盘的调试…….…………………………………………………….………24
6.4 单片机与AT24C01 IIC通信的调试………………………………………….………24
6.5 系统的改进方向………………………………………………………………….……25
7 总结……………………………………………………………………………………..……26
致谢………………………………………………………………………………………………27