电子万年历实训报告

河南工程学院

单片机 实训报告

学 院 电气信息工程学院 专 业 电气工程及其自动化 组员及学号 李 东 盼 201250712138

高 辉 201250712216 屈 海 兴 201250712213

设计题目 电子万年历的设计制作 指导教师 翁 嘉 民

内容: 电子万年历能显示阳历年、月、日、星期、小时、分、

秒和阴历月、日以及实时温度。

实现的功能及要求

基本要求

A、具有年、月、日、星期、时、分、秒等功能; B、具有年、月、日、星期、时、分、秒校准功能 C、校准时具有闪烁功能。 D、具有实时温度显示功能。

摘要

本文通过一个基于单片机的能实现数字显示功能万年历的设计,从而达到学习、了解单片机相关指令在各方面的应用。系统由主控制器AT89S52、时钟电路DS1302.、显示电路、按键电路和复位电路等各部分构成,能实现时钟日历显示功能,能进行时、分、秒的显示。

关键词:单片机,农历查询,万年历

Abstract

Based on a micro controller based on the will to achieve calendar of a multi-functional electronic clock design.thereby achieve studying and understanding the relevant directives SCM in all aspects of the application. By main control AT89C51、clock circuit DS1302、display circuit、key stroke circuit and in store circuit componented ,to achieve clock calendar display function can be carried out, hours seconds of the show and real-time temperature display.

Key words Monolithic single-chip, lunar calendar demand, perpetual calendars

目录

1 、绪 论 .......................................................................................................................................5 2 、引 言 .......................................................................................................................................6 2.1课题的背景、研究意义 ...................................................................................................... 6 2.2实现的功能及要求 .............................................................................................................. 6

2.3方案论证.....................................................................................................................6 3、系统硬件电路设计......................................................................................... 7

3.1 单片机控制系统原理 ......................................................................................................... 7 3.2 硬件的设计总框图 ............................................................................................................. 8 3.3 各功能模块硬件设计及实现 ............................................................................................. 9 3.3.1、 AT89S52 ................................................................................................................... 9 3.3.2、 DS1302实时时钟芯片 .......................................................................................... 14 3.3.3、 温度模块 .................................................................................................................. 6 3.3.4、 1602液晶显示器 ................................................................................................... 20 3.4 电路总图: ....................................................................................................................... 24

4、 系统程序设计 ....................................................................................................................... 25 4.1主程序流程图 .................................................................................................................... 25 4.2 中断服务程序 ................................................................................................................... 14 5、 心得体会 ............................................................................................... 错误!未定义书签。 6、参考文献 ................................................................................................................................. 16 7、 附录 ....................................................................................................................................... 16 第1节 系统程序设计 ............................................................................. 错误!未定义书签。

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4