摘要 摘要
本文介绍了基于STC89C52单片机的多功能电子万年历的硬件结构和软硬件设计方法。本设计由数据显示模块、温度采集模块、时间处理模块和调整设置模块四个模块组成。系统以STC89C52单片机为控制器,以串行时钟日历芯片DS1302记录日历和时间,它可以对年、月、日、时、分、秒进行计时,还具有闰年补偿等多种功能。温度采集选用DS18B20芯片,万年历采用直观的数字显示,数据显示采用1602A液晶显示模块,可以在LCD上同时显示年、月、日、周日、时、分、秒,还具有时间校准等功能。此万年历具有读取方便、显示直观、功能多样、电路简洁、成本低廉等诸多优点,具有广阔的市场前景。
关键字:万年历 温度计 液晶显示
I
ABSTRACT ABSTRACT
This paper introduces the based on STC89C52 multi-function electronic calendar of the hardware structure and software and hardware design method. This design by data display module, temperature acquisition module, time processing module and set module four modules. With STC89C52 single-chip microcomputer system for the controller to serial clock calendar chip DS1302 record calendar and time, it can be to date and time, minutes and seconds for the time, also has a leap year compensation and other functions. Temperature gathering choose DS18B20 chip, calendar by using object digital display, data showed that the 1602 A liquid crystal display module, can be in the LCD shows at the same time year, month, day, Sunday, when, minutes and seconds, still have time calibration etc. Function. This calendar has read the convenient, direct display, functional diversity, simple circuit, low cost, and many other advantages, has a broad market prospect.
Key words:Perpetual Calendar thermometer LCD display
II
目录 目录
摘要 ..................................................... I ABSTRACT ................................................ II 前言 .................................................... IV 1 绪论 ................................................... 1
1.1 课题研究的背景 .................................... 1 1.2课题的研究目的与意义 .............................. 1 1.3课题解决的主要内容 ................................ 1 2 系统的方案设计与论证 ................................... 2
2.1单片机芯片设计与论证 .............................. 3 2.2按键控制模块设计与论证 ............................ 3 2.3时钟模块设计与论证 ................................ 3 2.4温度采集模块设计与论证 ............................ 4 2.5显示模块模块设计与论证 ............................ 4 3 系统硬件的设计 ......................................... 5
3.1 STC89C52单片机 ................................... 5 3.2时钟芯片DS1302接口设计与性能分析 ................. 8 3.3温度芯片DS18B20接口设计与性能分析 ............... 11 3.4 LCD显示模块 ..................................... 16 3.5按键模块设计 ..................................... 17 3.6复位电路的设计 ................................... 18 4 系统的软件设计 ........................................ 20
4.1主程序流程图的设计 ............................... 20 4.2 程序设计 ......................................... 21 5 系统的机体设计 ........................................ 27
5.1系统的模块组成 ................................... 27 5.2 功能实现 ......................................... 27 结论 .................................................... 29 参考文献 ................................................ 30 致谢 .................................................... 31 附录 .................................................... 32
III