没有合适的资源?快使用搜索试试~ 我知道了~
基于单片机的万年历设计安工程-学位论文.doc
0 下载量 85 浏览量
2023-07-01
20:04:33
上传
评论
收藏 624KB DOC 举报
温馨提示
试读
74页
基于单片机的万年历设计安工程-学位论文.doc
资源推荐
资源详情
资源评论
安徽工程大学毕业设计(论文)
- I -
基于单片机的万年历设计
摘 要
进入二十一世纪,电子技术无处不在,电子产品给我们生活带来便利的同时也改
变着我们的世界。基于单片机技术的电子产品已经遍及社会的每个角落。电子万年历
以其体积小,携带方便、实用,美观等优势一直占领着广阔的市场,同时也给人
们的生活带来诸多方便。
本设计由硬件设计和软件设计两大部分组成。硬件设计上,以AT89C51单片机为
控制核心,通过DS1302与DS18B20通信获得实时时间和实时环境温度,并将得到的数
据通过1602液晶显示出来,同时通过相应的按键调整相应的值。硬件部分详细介绍了
本设计所应用的各硬件接口技术和各个接口模块的功能。软件设计上,本设计采用C
语言进行软件设计,在硬件的基础上来进行各功能软件模块的编写。同时软件的设计
采用模块化结构,使程序设计的逻辑关系更加简单易懂。
由于该设计用液晶为载体来显示,所以具有良好的人机交互界面与友好的操作,
可以显示时间、日期、星期、温度并具有闹铃功能。
关键词:AT89C51单片机;万年历;液晶技术;DS1302;DS18B20
王习军:基于单片机的万年历设计
- II -
Design of Multifunctional digital Perpetual Calendar Based on MCU
Abstract
Enters for the 21st century, the electronic technology is ubiquitous, the electronic
products live for us bring the convenience at the same time also to change our world.Already
spread social based on the monolithic integrated circuit technology electronic products each
quoin.The electronic ten thousand calendars are small by its volume, the carryhome is
convenient, is practical, artistic and so on the superiority are seizing the broad market
continuously, simultaneously also gives people's life to bring conveniently many.
This design designs major part two by the hardware design and the software is
composed.The hardware designs, take AT89C51 monolithic integrated circuit as the control
core, obtains the real-time time and the real-time ambient temperature through DS1302 and
the DS18B20 correspondence, and will obtain data through 1602 liquid crystal displays,
simultaneously through corresponding pressed key adjustment corresponding value.The
hardware part introduced in detail this design applies various hardware connection
technology and each interface module function.The software designs, this design uses the C
language to carry on the software design, carries on various functions software module in the
hardware foundation the compilation.Simultaneously the software design uses the modular
structure, makes the programming the logical relations to be simpler easy to understand.
Because this design demonstrated with the liquid crystal for the carrier, therefore has
the good man-machine interaction contact surface and the friendly operation, may
demonstrate the time, the date, the week, the temperature and have the noisy bell function.
Keywords: AT89C51 monolithic integrated circuit; Ten thousand calendars; Liquid crystal
technology; DS1302; DS18B20
安徽工程大学毕业设计(论文)
- III -
目录
目录 ..........................................................................................................................................III
插图清单.................................................................................................................................VII
表格清单 ..................................................................................................................................IX
引言 ............................................................................................................................................1
第 1 章 绪论 ..............................................................................................................................2
1.1 课题的背景与意义..............................................................................................................2
1.2 电子万年历的现状与发展..................................................................................................2
1.3 设计的主要工作及章节安排..............................................................................................3
1.4 本章小结..............................................................................................................................4
第 2 章 设计方案论证...............................................................................................................5
2.1 电子万年历系统概述..........................................................................................................5
2.2 设计任务和主要内容..........................................................................................................5
2.3 设计方案论证......................................................................................................................6
2.3.1 计时方案.......................................................................................................................6
2.3.2 测温方案.......................................................................................................................6
2.3.3 显示方案.......................................................................................................................6
2.4 本章小结..............................................................................................................................7
第 3 章 系统硬件设计 ..............................................................................................................8
3.1 AT89C51 单片机介绍 .......................................................................................................8
3.2 LCD1602 液晶显示 .........................................................................................................10
3.3 DS1302 时钟芯片介绍 ....................................................................................................12
3.3.1 DS1302 有关日历时间的寄存器 ...............................................................................13
3.3.2 DS1302 控制字介绍 ...................................................................................................13
3.3.3 DS1302 单字节读写时序介绍 ...................................................................................14
3.3.4 DS1302 操作指令介绍 ...............................................................................................14
3.3.5 DS1302 与单片机接口电路 .......................................................................................15
3.4 DS18B20 芯片介绍..........................................................................................................15
3.5 语音闹铃模块....................................................................................................................18
3.6 按键接口............................................................................................................................19
3.7 单片机最小系统电路设计................................................................................................19
3.8 本章小结............................................................................................................................20
第 4 章 系统软件设计 ............................................................................................................21
4.1 主程序流程图.....................................................................................................................21
4.2 按键扫描程序流程图.........................................................................................................21
4.3 从 1302 读取日期和时间程序流程图...............................................................................22
4.4 农历转换程序设计............................................................................................................23
4.4.1 公历转农历算法研究.................................................................................................23
4.4.2 公历转农历程序.........................................................................................................24
4.5 公历与星期的换算方法....................................................................................................25
王习军:基于单片机的万年历设计
- IV -
4.6 本章小结............................................................................................................................27
第 5 章 调试仿真 ....................................................................................................................28
5.1 KEIL ΜVISION 软件简介 .....................................................................................................28
5.2 PROTEUS 软件简介 .............................................................................................................29
5.3 电子万年历的 PROTEUS 软件仿真 ....................................................................................30
5.4 系统功能测试....................................................................................................................31
结论与展望 ..............................................................................................................................33
致谢 ..........................................................................................................................................34
参考文献 ..................................................................................................................................35
附录 ..........................................................................................................................................36
附录 A 电子万年历系统整体仿真电路图..............................................................................36
附录 B 电子万年历系统 PCB 电路图 ....................................................................................37
附录 C 参考文献摘要 .............................................................................................................38
附录 D 源程序清单 .................................................................................................................40
安徽工程大学毕业设计(论文)
- V -
插图清单
图 2- 1 系统硬件结构框图 ..............................................................................................5
图 3- 1 AT89C51 引脚图 ...............................................................................................10
图 3- 2 LCD1602 内部结构 ...........................................................................................11
图 3- 3 LCD1602 电路图 ...............................................................................................12
图 3- 4 DS1302 引脚介绍 ..............................................................................................12
图 3- 5 DS1302 单字节读写时序介绍 ..........................................................................14
图 3- 6 DS1302 与单片机接口电路 ..............................................................................15
图 3- 7 DS18B20 的引脚 ...............................................................................................16
图 3- 8 DS18B20 与单片机的接口电路 .......................................................................18
图 3- 9 蜂鸣器与单片机的接口电路 ............................................................................18
图 3- 10 按键接口电路 ....................................................................................................19
图 3- 11 单片机最小系统电路图 ....................................................................................19
图 4-1 主程序流程图 .....................................................................................................21
图 4- 2 按键设置子程序流程图 ....................................................................................22
图 4- 3 1302 读取时间流程图 .......................................................................................22
图 4- 4 星期计算流程图 ................................................................................................26
图 5- 1 Keil μVision3 的程序完成界面 ........................................................................29
图 5- 2 查找 HEX 文件 .................................................................................................30
图 5- 3 实现仿真电路图 ................................................................................................31
图 5- 4 系统功能实现图 ................................................................................................32
剩余73页未读,继续阅读
资源评论
黑色的迷迭香
- 粉丝: 718
- 资源: 4万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功