文档介绍:闽江学院
本科毕业论文(设计)
题目基于51单片机的电子密码锁
学生姓名王颖丹
学号 3111101215
系别计算机科学系
年级 2011级
专业嵌入式应用
指导教师郑明
职称副教授
完成日期 2015-5-26
诚信承诺书
本人郑重声明:
兹提交的毕业论文(设计)《基于51单片机的电子密码锁》,是本人在指导老师郑明的指导下独立研究、撰写的成果;论文(设计)未剽窃、抄袭他人的学术观点、思想和成果,未篡改研究数据,论文(设计)中所引用的文字、研究成果均已在论文(设计)中以明确的方式标明;在毕业论文(设计)工作过程中,本人恪守学术规范,遵守学校有关规定,依法享有和承担由此论文(设计)产生的权利和责任。
声明人(签名):王颖丹
2015年 3 月 1 日
摘要
本次毕业设计我选择的是基于51单片机的电子密码锁,所选芯片为AT89C51。这个电子密码锁包括了5*4矩阵键盘模块,24C02存储模块,报警模块,1602液晶屏显示模块。使用的编程工具是keil C51,画图工具是Protell 99 SE,烧写工具是STC479。在本次毕业设计的制作过程中,我经过不断的调试,更改程序,来提高锁的使用性能,最后的调试结果,我还是比较满意的。因为它基本实现了开题报告中所提到的功能:报警功能、开锁功能、掉电存储密码功能、显示功能、键盘输入功能等。但是还是有一些遗留问题的,比如显示屏老是花屏,按键不够灵敏等。
关键词:单片机AT89C52;密码锁;5*4矩阵键盘;1602液晶屏
Abstract
This graduation design I choose is based on the 51 singlechip electronic code lock, the selected chip electronic password prises a 5 * 4 matrix keyboard module, 24C02 memory module, alarm module, LCD display module. Using the programming tool is KEIL C51, drawing tools is protell 99 SE, the programming tool is STC479. In the making process of the graduation design, I through continuous debugging and change procedures, to improve the use performance of the lock and the debug result. I was satisfied, because it basically achieved mentioned in the proposal that the function: alarm function, lock function, electric storage password function, display function, keyboard input function. But there are still some problems left, such as the display is always flower screen, buttons and other key is not sensitive.
Key words:SCM AT89C52; password lock; 5 * 4 matrix keyboard; 1602 LCD screen; safety performance。
目录
引言 5
电子密码锁的背景 5
电子密码锁设计的意义和的特点 6
2. 系统设计
8
功能设计 9
芯片的选择 9
主控芯片AT89C52单片机的简介 10
10
编程工具 12
3. 系统硬件设计
总框图 13
键盘图 13
显示模块 14
蜂鸣器模块 14
LED流水灯模块 14
密码掉电保护24C02存储模块 15
晶振时钟电路 15
复位电路设计 16
串口引脚功能介绍 16
硬件成品 17
系统软件设计流程图: 19
系统软件设计流程 20
5. 程序调试
程序调试用