目 录
1 绪论............................................................................................................................1
1.1 引言.....................................................................................................................1
1.2 课题背景和意义.................................................................................................1
2 总体设计方案的确定................................................................................................3
2.1 电子密码锁设计的具体要求.............................................................................3
2.2 总体设计方案选定.............................................................................................3
3 主要元器件介绍........................................................................................................5
3.1 主控芯片 AT89C52..............................................................................................5
3.1.1 主要特性.....................................................................................................5
3.1.2 引脚功能说明.............................................................................................6
3.2 存储芯片 AT24C02..............................................................................................7
3.2.1 管脚的描述.................................................................................................8
3.2.2 功能的描述.................................................................................................8
3.3 LCD1602 显示器..................................................................................................9
3.3.1 LCD1602 的引脚功能说明..........................................................................9
3.3.2 LCD1602 的指令说明................................................................................10
4 硬件电路的设计......................................................................................................12
4.1 最小系统的设计...............................................................................................12
4.1.1 单片机的复位电路...................................................................................12
4.1.2 单片机的时钟电路...................................................................................13
4.2 键盘电路...........................................................................................................14
4.3 显示电路...........................................................................................................15
4.4 密码锁存电路...................................................................................................16
4.5 报警电路...........................................................................................................16
5 软件系统的设计......................................................................................................17
5.1 主函数模块.......................................................................................................17
5.2 键盘扫描及识别子函数...................................................................................17
5.3 延时子函数.......................................................................................................19
5.4 LCD1602 初始化函数........................................................................................19