文档详情

单片机课程设计密码锁.doc

发布:2025-03-31约1.66万字共29页下载文档
文本预览下载声明

《单片机技术》课程设计说明书

密码锁

院、部:电气与信息工程学院

学生姓名:

指导教师:王韧职称副教授

专业:电气工程及其自动化

班级:

完成时间:2014.6.9

摘要

本文是基于12864液晶系统设计的密码锁课程设计,以AT89S52为核心的单片机控制方案,利用单片机灵活的编程设计和丰富的I/O端口,及其控制的准确性,通过AT89S52模拟I2C总线和AT24C02通讯,实现基本的密码锁功能。

本设计主要硬件由三部分组成:4×4行列式键盘接口电路、密码锁的控制电路、液晶显示电路。初步设计思路如下:

(1)具有系统原始密密码通过行列式键盘输入,若密码正确,则将锁打开。

(2)用户可以自定义密码。开锁后,用户可对原始密码进行修改

(3)具有超级密码,用于处理非常情况;

(4)密码输入时应处于保密显示状态,密码输入正确时应显示密码输入正确提示信息,否则,显示密码输入错误提示信息,三次输入密码错误,则不允许输入并报警。

(5)系统崩溃后重启,变为原来初始状态

软件的设计主要包括键扫子程序,液晶显示程序,密码比较程序,AT24C02读写程序,报警程序和开锁显示程序等。

经实验证明,该密码控制系统具有设计方法合理,简单易行,成本低,安全使用等特点,符合车辆、办公室用锁要求,具有推广价值。

关键词:密码锁;12864液晶系统;行列式键盘;AT89S52;AT24C02

ABSTRACT

Thispaperisbasedonthe12864LCDsystemdesigncodedlockcurriculumdesign,withAT89S52asthecoreofthesinglechipmicrocomputercontrolscheme,usingthesinglechipmicrocomputertoagileprogrammingdesignandrichI/Oport,andthecontrolaccuracy,throughtheAT89S52simulationofI2CbusandAT24C02communication,realizethebasictricklockfunction.

Thisdesignmainhardwareconsistsofthreeparts:4x4determinantkeyboardinterfacecircuit,codedlockcontrolcircuit,liquidcrystaldisplaycircuit.Preliminarydesignideaisasfollows:

(1)istheoriginalpasswordsystempasswordthroughthedeterminantkeyboardinput,ifthepasswordiscorrect,willopenthelock.

(2)theusercancustomizethepassword.Unlocked,theusercanmodifytheoriginalpassword

(3)havesuperpassword,usedforprocessingvery;

(4)thepasswordinputshouldbeinconfidentialdisplaysastatus,thepasswordinputthecorrectpasswordinputshoulddisplaythecorrectpromptinformation,otherwise,showthepasswordinputerrormessageinformation,threeinputpasswordmistake,donotallowinputandalarm.

(5)systemcollapseafterrestart,intotheoriginalinitialstate

Softwaredesignmainlyincludeskeyandsubroutine,liquidcrystaldisplayprogram,thepasswordisAT

显示全部
相似文档