单片机设计实验报告
201X年小学期单片机设计实验报告
题目:基于16F877的电子密码锁
班 级: 班内序号: 实验组号: 学生姓名: 指导教师:
1
单片机设计实验报告
期中检查 教师评语 指导教师签字: 年 月 日
2
单片机设计实验报告
基于16F877的电子密码锁
实验摘要
在日常的生活和工作中, 住宅与部门的安全防范、单位的文件档案、财务报表以及一些个人资料的保存多以加锁的办法来解决。若使用传统的机械式钥匙开锁,人们常需携带多把钥匙, 使用极不方便, 且钥匙丢失后安全性即大打折扣。具有防盗报警等功能的电子密码锁代替密码量少、安全性差的机械式密码锁已是必然趋势。随着科学技术的不断发展,人们对日常生活中的安全保险器件的要求越来越高。为满足人们对锁的使用要求,增加其安全性,用密码代替钥匙的密码锁应运而生。密码锁具有安全性高、成本低、功耗低、易操作、记住密码即可开锁等优点。
目前使用的电子密码锁大部分是基于单片机技术,以单片机为主要器件,其
编码器与解码器的生成为软件方式。
本系统由16F877单片机系统(主要是16F877单片机最小系统)、4×4矩阵键盘、LCD1602显示和报警系统等组成,具有设置、修改四位用户密码、输入提示音、密码错误报警等功能(本设计由单片机控制LCD显示,密码正确显示password ok! 密码错误显示wrong,please reset!用户reset后进行重新输入。由单片机控制矩阵键盘含有0-9数字键和A-F功能键。按F键,则进行密码重置功能)。本系统成本低廉,功能实用。
(宋体 五号)
Abstract
In daily life and work, the department of housing and security, unit documents, financial statements and some personal information to save more in order to lock the ways to solve. If use the traditional mechanical key to open the lock, people often need to carry multiple keys, use very convenient, and the key missing after security is compromised. With anti-theft alarm function such as electronic combination lock instead of password quantity
3
单片机设计实验报告
is little, security, poor mechanical combination lock is inevitable trend. With the continuous development of science and technology, people in daily life the demand is higher and safety insurance device. To meet the requirements of people on the use of the lock, its safety, use the password instead of the key combination lock arises at the historic moment. Combination lock with high safety, low cost, low power consumption, easy operation, remember password lock, etc.
Currently use electronic combination lock is mostly based on single chip microcomputer technology, single chip microcomputer as the main device, the encoder and decoder for software.
This system consists of 16 f877 microcontroller system (mainly minimum 16 f877 microcontroller system), 4 * 4 matrix keyboard, LCD1602 display and alarm system, etc, and has set up four, modify user password, password, input prompt error alarm functions (this design by the single chip microcomputer control LCD display, the password correctly display the password ok! Wrong password shows wrong, both please reset! The user to enter again after reset. By single-chip microcomputer control matrix keyboard contains 0-9 number keys and A - F function keys. Press the F key, then carries on the password reset function). This system is low cost, function and practical.WM function to control its turn. And this is so called navigating aptitudinally .
关键字
单片机——microcontroller 芯片——CMOS chip
16F877
一、PIC16F877系列单片机简介
PIC16F87X ( 含873P874P876P877) 是美国微芯(Microchip) 公司推出的高性能单片机,除具有单片机的通用资源外,该系列单片机还采用哈佛总线结构、二级指令流水线取指方式、精简指令集(RISC)和内部具有E2 PROM 数据存储器及FLASH 结构的程序存储器、仅35 条单字节单周期指令、在系统串行编程技术和在线调试技术。 因此采用该系列单片机的产品具有低成本、低功耗、高速度、高可靠性、体积小、性价比高等特点。 其芯片引脚图如图1 所示。 另外,它内部的E2 PROM 数据存储器不仅具有掉电保护数据的功能,更重要的是它的读写操作均是由单片机内部时序控制,即外部电路无法对其进行访问, 因而具有极高的数据保密性,这使得PIC16F87X在加密性产品如智能IC 卡、密码锁、电子防盗系统等方面有很广泛的应用。
4
单片机设计实验报告
二.实验论证与比较
1.总体系统组成
电源电路 复位电路 晶振电路 报警电路 电路主要分8个模块,即电源电路、复位电路、晶振电路、报警电路、键盘电路、LCD显示电路、开/关锁电路、声音电路。由单片机主要控制、实现密码锁功能。
键盘电路 单 片 机 LCD显示电路 开/关锁电路 显示电路 16F877 1.1电源电路模块
5
相关推荐: