基于AT89C51单片机的电子万年历设计

发布时间 : 星期一 文章基于AT89C51单片机的电子万年历设计更新完毕开始阅读

黑龙江东方学院本科生毕业论文(设计)任务书

姓名 吴玉新 学号 074110120 专业班级 计算机科学07级1班 毕业论文(设计)题目: 电子万年历 毕业论文(设计)的立题依据 电子万年历是一种非常广泛日常计时工具,对现代社会越来越流行。它可以对年、月周日、时、分、秒进行计时,对于数字电子万年历采用直观的数字显示,可以同时显示年日、周日、时,还具有时间校准等功能 主要内容及要求 主要内容是实现INT中断 ,实现RB电平变化中断 要求是实现数码块的多功能显示演示 进度安排 2010年9月20日 选题 2010年9月21日~2011年5月13日 接受指导教师的指导 2010年9月21日~2010年9月30日拟定论文大纲 2010年10月1日~2010年10月31日搜集、查阅、整理相关资料 2011年3月1日~2011年3月28日初稿形成 2011年3月29日~2011年4月5日 初稿审定 2011年4月6日~2011年4月10日 第一次修改 2011年4月11日~2011年4月14日 第一次审定 2011年4月15日~2011年4月20日 第二次修改 2011年4月21日~2011年5月4日 定稿 2011年5月5日~2011年5月13日 论文评阅小组评审论文(设计) 2011年5月14日 毕业论文(设计)答辩 学生签字: 指导教师签字: 年 月 日 黑龙江东方学院本科生毕业论文(设计)

电子万年历的设计

摘 要

随着社会、科技的发展,人类得知时间,从观太阳、摆钟到现在电子钟,不断研究、创新。为了在观测时间的同时,能够了解其它与人类密切相关的信息,比如温度、星期、日期等,电子万年历诞生了,它集时间、日期、星期和温度功能于一身,具有读取方便、显示直观、功能多样、电路简洁等诸多优点,符合电子仪器仪表的发展趋势,具有广阔的市场前景。

该电子万年历主要采用AT89C51单片机作为主控核心,由DS1302时钟芯片提供时钟、LED动态扫描显示屏显示。AT89C51单片机是由Atmel公司推出的,功耗小,电压可选用4~6V电压供电;DS1302时钟芯片是美国DALLAS公司推出的具有涓细电流充电功能的低功耗实时时钟芯片,它可以对年、月、日、星期、时、分、秒进行计时,还具有闰年补偿等多种功能,而且DS1302的使用寿命长,误差小;数字显示是采用的LED液晶显示屏来显示,可以同时显示年、月、日、星期、时、分、秒和温度等信息。此外,该电子万年历还具有时间校准等功能。

关键词:时钟电路; DS1302;LED动态扫描; AT89C51;MAX7219

I

黑龙江东方学院本科生毕业论文(设计)

Perpetual Calendar

Abstract

With the society, science and technology, mankind learned that time, from the view of the sun, to the present electronic clock pendulum clock, continuous research and innovation. Observation time in

the same time, be able to understand other human beings is closely related to information, such as temperature, week, date and so on, the birth of the electronic calendar, and it set the time, date, week and temperature-in-one, with easy to read, intuitive display functional diversity, and many other advantages of simple circuit with the electronic instrumentation of the development trend of the. market prospects are broad

The main use of the electronic calendar AT89C51 single-chip microcomputer as the main core, provided by the DS1302 clock chip clock, DS18B20 the temperature chip acquisition transition temperature, LED display shows the dynamic scan. AT89C51 single-chip microcomputer is introduced by Atmel Corporation, a small power consumption, voltage can be selected 4 ~ 6V power supply voltage; DS1302 clock chip is introduced DALLAS fine with trickle charge function of current low-power real-time clock chip, which can of the year, month, day, week, hour, minute, second for time, also has multiple functions, such as a leap year compensation, and long life of the DS1302, a small error; DS18B20 temperature chip is a digital temperature sensor with a measurement accuracy high, a simple circuit to connect the characteristics of such sensors only need a data cable for data transmission; digital LED display is used to display LCD screen, can display year, month, day, week, hour, minute, second and temperature, etc. information. In addition, the electronic calendar is also a time-calibration functions.

Keywords:clock circuit; DS1302; LED dynamic scanning; AT89C51; MAX7219

II

目 录

摘 要 ................................................................. I ABSTRACT ................................................................ II 第1章 绪论 .............................................................. 1 1.1 背景知识介绍 ............................................................................................................... 1 1.2 课题任务及要求 ........................................................................................................... 2 第2章 万年历时钟设计方案 ................................................ 3 2.1 简述设计思路 ............................................................................................................... 3 2.2 构成框图 ....................................................................................................................... 3 第3章 硬件电路设计 ...................................................... 4 3.1 单片机的选择 ............................................................................................................... 4

3.1.1 单片机选择论证 .................................................................................................. 4 3.1.2 单片机参数介绍 .................................................................................................... 4 3.2 时钟功能的实现 ............................................................................................................. 7 3.3 复位电路 ..................................................................................................................... 8 3.4 时间调整电路 ............................................................................................................... 10 3.5 时间显示电路 ............................................................................................................. 10 3.5.1 扫描方式 .............................................................................................................. 10 3.5.2 LED数码管的选择 ............................................................................................... 12 3.5.3 显示电路的整体实现 .......................................................................................... 13 第4章 系统程序设计与软件仿真 ........................................... 14 4.1 主程序的设计 ............................................................................................................... 14 4.2 程序代码 ....................................................................................................................... 16 4.3 仿真实验 ....................................................................................................................... 17 第5章 PCB板制作与调试 .................................................. 18 5.1 原理图的绘制与PCB的制作 ..................................................................................... 18

5.1.1 原理图的绘制 ...................................................................................................... 18 5.1.2 PCB的绘制 ........................................................................................................... 19 5.2元件安装焊接................................................................................................................ 20 5.3系统的调试.................................................................................................................... 21 结论 .................................................................... 23 参考文献 ................................................................ 24 附 录A ................................................................. 25 附 录B ................................................................. 26 附 录C ................................................................. 27 致 谢 .................................................................. 35

联系合同范文客服:xxxxx#qq.com(#替换为@)