可编程作息时间控制器设计与制作.doc

约44页DOC格式手机打开展开

可编程作息时间控制器设计与制作,摘 要:本文介绍了一款基于at89s52单片机数字钟的设计,通过多功能数字钟的设计思路,详细叙述了系统硬件、软件的具体实现过程。论文重点阐述了数字钟硬件中主控制模块、时钟模块、显示模块和相关控制模块等的模块化设计与制作;软件同样采用模块化的设计, 本设计实现了时间与闹钟的修改功能、语音播报...
编号:8-148335大小:639.50K
分类: 论文>通信/电子论文

内容介绍

此文档由会员 lutuozhe 发布

可编程作息时间控制器设计与制作


摘  要:
本文介绍了一款基于AT89S52单片机数字钟的设计,通过多功能数字钟的设计思路,详细叙述了系统硬件、软件的具体实现过程。论文重点阐述了数字钟硬件中主控制模块、时钟模块、显示模块和相关控制模块等的模块化设计与制作;软件同样采用模块化的设计, 本设计实现了时间与闹钟的修改功能、语音播报功能、年、月、日和星期等的显示功能。并且通过对比实际的时钟,查找出了误差的来源,确定了调整误差的方法,尽可能的减少误差,使得系统可以达到实际数字钟的允许误差范围内。
本次设计过程在硬件与软件方面是进行同步设计。硬件部分主要由AT89C52单片机,LED显示电路,以及调时按键电路等组成。在单片机的选择上本人使用了AT89C52单片机,该单片机适合于许多较为复杂控制应用场合。显示器使用2片7SEG-MPX8-CA和一片7SEG-MPX4-CA。7SEG-MPX8-CA是一种八个共阳二极管显示器,7SEG-MPX4-CA是一种四个共阳二极管显示器。为了能更轻松的控制这三片显示器,本人使用了3片74HC164来驱动。74HC164 是 8 位边沿触发式移位寄存器,串行输入数据,然后并行输出。软件方面主要包括日历程序、时间调整程序,公历转阴历程序,显示程序等。程序采用汇编语言编写,以便更简单地实现调整时间及阴历显示功能。


 
关键词:

 

 

 

ABSTRACT

This article describes an AT89S52 microcontroller based digital clock design, through multi-functional digital clock design ideas, detailed description of the system hardware and software realization process. Paper focuses on the digital clock in the main control module hardware, the clock modules, display modules and associated control modules, modular design and production; software as modular design, the design and implementation of the changes of time and alarm functions, voice broadcast function, year, month, day and week, etc. display. And by comparing the actual clock, find out the source of the error, the error of the method of determining the adjustment, as much as possible to reduce errors
Enable the system to achieve a practical digital clock within allowable error.
Hardware mainly by the AT89C52 microcontroller, LED display circuit, and the tune composed of the circuit when the button. In the SCM choice I used the AT89C52 microcontroller, which is suitable for many of the more complex control applications. Monitor the use of two 7SEG--MPX8--CA and a 7SEG--MPX4--CA. 7SEG-MPX8-CA is a total of eight-yang display 7SEG-MPX4-CA is a total of four-yang diode display. In order to more easily control the three monitors, I use three 74HC164 to drive.74HC164 is an 8-bit edge-triggered shift register, serial input data, and parallel output. The software includes calendar program, time to adjust procedures, turn the lunar calendar programs display programs. Programs written in assembly language used in order to more easily adjust the time and the realization of the lunar calendar display. All programming is complete, the wave software debugging,

 


Key words:
        Clock electric clock:DS1302;DS18B20:DYNAMIC  ;SCANSCM

 


目   录
摘要……………………………………………………………………6
ABSTRACT………………………………………………………………7
前言……………………………………………………………………10
一. 设计要求与方案探讨  …………………………………………………11
1.1 设计目的与意义 …………………………………………………………………………10
1.2 设计要求 …………………………………………………………………………………11
1.3 系统基本方案选择探讨 ………………………………………………………………11
1.3.1主控制芯片的选择方案探讨 ………………………………………………………11
1.3.2 时钟芯片的选择方案探讨 …………………………………………………………12
1.3. 3 LED显示系统选择方案探讨   ………………………………………………………13
二.硬件设计……………………………………………………………14
2.1系统电路设计框图 ………………………………………………………………………14
2.2 系统硬件设计概述   ……………………………………………………………………14
2.3系统主要基本单元电路的设计……………………………………………………………………14
2.3.1主控制系统电路的设计 ……………………………………………………………14
2.3.2时钟电路的设计 ………………………………………………………………………16
2.3.3 LED显示电路的设计  …………………………………………………………………… 17  
2. 4  系统电路原理说明 ………………………………………………………………18
三、软件设计    …………………………………………………………22
3.1程序流程框图  ……………………………………………………………………………22
3.2 子程序的设计  ……………………………………………………………………………24
 3.2.1 读、写DS1302子程序 ………………………………………………………………25
四、硬件与软件调试………………………………………………………2
4.1硬件调试  …………………………………………………………………………………25
4.2软件调试……………………………………………………………………………………27
4.3调试结果分析与结论………………………………………………………………………29
4.3.1 调试结果分析…………………………………………………………………………29
4.3.2 调试结论………………………………………………………………………………29
五、论文总结 ……………………………………………………………30
参考文献…………………………………………………………………30
附录一:系统电路图…………………………………………………………31
附录二:系统程序清单  ……………………………………………………32
致谢     …………………………………………………………………50