摘 要:人们平时的生活和工作都无法避免对时间的精确掌握。随着科技的进步与发展,电子万年历成为了最常用的计时工具。迄今,市面上的万年历功能强大,种类繁多,简单直观,给人们的生活带来极大的便利。由于电子万年历应用广泛,因此本文设计的基于51单片机的多功能万年历则显得尤为重要。93164
此万年历在硬件设计方面采用STC89C52单片机作为控制核心,由1602LCD作为液晶显示屏,DS1302时钟芯片提供时钟,DS18B20作为传感器模块。STC89C52单片机是由Atmel公司研发的低功耗单片机,其供电电压为4~6V;1602LCD液晶显示屏可以显示直观的数字,且其具有能同时显示年、月、日、星期、时、分、秒等信息的功能。DS1302时钟芯片为美国DALLAS公司研发的低功耗实时时钟芯片,它能对年、月、日、星期、时、分、秒实时计时,且其误差较小,使用寿命较长;DS18B20为美国DALLAS半导体公司研发的第一片支持“一线总线”接口的温度传感器,具有功耗低,精度高等特点。另外,此电子万年历还具有校准时间、设置闹钟、显示温度等功能。在软件设计方面主要包括日历程序、时间校准程序、显示程序,闹钟设定程序、温度检测程序等几个部分。
毕业论文关键词:万年历;单片机;时间校准;闹钟设置;温度检测
Abstract:People's daily life and work can not avoid the precise grasp of time。 With the development of science and technology, electronic calendar has become the most commonly used timing tool。 So far, the market of the calendar is powerful, variety, simple and intuitive, and brings great convenience to people's life。 The electronic calendar is widely used, so the design of multi function calendar based on MCU 51 is particularly important。
This calendar in the hardware design using STC89C52 microcontroller as the control core, 1602LCD as a liquid crystal display, DS1302 clock chip to provide the clock, DS18B20 as a sensor module。 STC89C52 MCU is composed of a low power MCU developed by Atmel, the supply voltage is 4 ~ 6V; 1602LCD LCD screen can display intuitive figures, and it has to simultaneously display year month day week, when, minutes and seconds and other information function。 DS1302 clock chip for the United States DALLAS company developed low-power real-time clock chip, it can on year month day week, when, minutes and seconds in real time, and the error is small, long service life; the temperature sensor DS18B20 as the first to support the "American DALLAS semiconductor company developed a line bus interface。 With low power consumption, high accuracy。 In addition, the electronic calendar also has the calibration time, set alarm clock, display temperature and other functions。 In the software design, including calendar procedures, time calibration procedures, display procedures, alarm clock settings, temperature detection procedures and other parts。
Keywords: Calendar; Single chip microcomputer; Time calibration; Alarm settings; Temperature detection
目 录
1 绪论 7
1。1 课题背景 7
1。2 课题意义 7
2 系统总体方案设计 9
2。1 设计要求 9
2。2 方案选择和论证 9
2。2。1 单片机的选择 9
2。2。2 显示方案的选择 9
2。2。3 时钟模块的选择