毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

单片机数字时钟设计

更新时间:2010-2-2:  来源:毕业论文

单片机数字时钟设计
目录
摘要……………………………………………………………………………1

第一章 数字时钟硬件框图…………………………………………………4
      
1.1数字时钟硬件框图……………………………………………4
      
1.2 8051引脚功能………………………………………………4

第二章 程序总体设计与规划………………………………………………5
      
2.1总体介绍………………………………………………………5
      
2.2数据调整………………………………………………………5
      
2.3中断方式应注意的问题………………………………………6
    
  2.4定时准确性的讨论……………………………………………6
      
2.5软件消抖………………………………………………………6
      
2.6数字时钟的操作………………………………………………8
      
2.7主程序…………………………………………………………13

结束语 ………………………………………………………………………17

参考文献 ……………………………………………………………………18

第三章 附录 ………………………………………………………………19
单片机数字时钟设计

【摘要】本文介绍了基于单片机的数字钟的设计,详细讨论了它从软件上实现的过程,重点在时钟调整的方式:查询和中断的比较,时钟有两方面的含义:一是指为保障系统正常工作的基准振荡定时信号,主要由晶振和外围电路组成,晶振频率的大小决定了单片机系统工作的快慢;二是指系统的标准定时时钟,即定时时间,它通常有两种实现方法:一是用软件实现,即用单片机内部的可编程定时/计数器来实现,但误差很大,主要用在对时间精度要求不高的场合;二是用专门的时钟芯片实现.然后,对数字钟的稳定性和精确性作了相关的讨论。在文章的最后,给出了采用中断方式实现的数字钟的源程序。时钟电路在计算机系统中起着非常重要的作用,是保证系统正常工作的基础。

【关键字】单片机,数字钟,数据缓冲区,中断,定时,消抖
 
[Abstract]This article introduced based on the monolithic integrated circuit digital clock design, discussed it in detail the process which realizes from the software, key way which adjusts in the clock: The inquiry and the interrupt comparison, the clock has two aspect meanings: One, refers for the safeguard system normal work datum vibration timing signal, mainly is composed by the crystal oscillator and the periphery electric circuit, the crystal oscillator frequency size has decided the monolithic integrated circuit system work speed; Two, refers to the system the standard fixed time clock, namely fixed time the time, it usually has two realization methods: One, with the software realization, namely realizes with the monolithic integrated circuit interior programmable fixed time/counter, but the error is very big, mainly uses in requests not the high situation to the time precision; Two, realizes with the special clock chip. Then, has made the related discussion to the digital clock stability and the accuracy.In article final, gave has used the interrupt way realization the digital clock source program.The clock electric circuit is playing the extremely vital role in the computer system, is guarantees the system normal work the foundation.

[Key words]The monolithic integrated circuit, the digital clock, the data buffer, the interrupt, fixed time, disappears shakes
第一章  数字时钟硬件框图
1.1数字钟硬件框图  如图(1.1)
1.2 8051引脚的功能:
8051共有四个并行的I/O端口,每个端口都有8条端口线,用于传送数据/地址。由于每个端口的结构各有不同,因此它们在功能和用途上有比较大的区别。现对它们的综述如下:
P0.7~P0.0这一组共有8条引脚线,为P0号口所专用,其中P0.7是最高位,P0.0是最低位,用于CPU的输出/输入数据,这时,输出数据不可以得到数据锁存,可以不用外接锁。输入的数据可以得到缓冲增加了数据的可靠性。其中P1.0~P1.7这8条引脚和P0口的相类似,以P1.7为最高位,P1.0为最低位.当P1口作为通用I/O使用时P1.7~P1.0的功能和P0口的第一功能相同,也用于传送用户的输入/输出数据.P1口还有第二功能,即它在编程/校验时用于输入片内EPROM的低8位地址.在P2.7~P2.0这组引脚和上述两功能相同.P3.7~P3.0这组引脚的功能和其它三组相同.

控制线(5)条:
1.ALE/PORG:地址锁存线允许/编程线,配合P0口引脚的第二功能使用,在P0.7~P0.0引脚线上输出片外存储低8位地址的同时还在ALE/PORE线个输出一高电平脉冲,其下降沿用于把这个片外存储器低8位地址锁存到外部专用地址锁存器以便空出P0.7~P0.0引脚线支传送随后而来的片外存储器读写数据.在不访问片外存储器时,8051自动在ALE/PROG线上输出频率Fosc/6的脉冲序列.此脉冲可以用作外部时钟源或作为时脉冲源使用.
2.EA/VPP:允许访问片外存储器/编程电源线.可以控制电源8051使用片内ROM还是使用片外的ROM.如果EA=1,则允许使用片内ROM,如果EA=0则允许使用片外ROM.
3.RTS/VPD:复位/备用电源线,可以使8051处于复位工作状态..8051的复位有两种复位,有自动和人工复位两种.
4.PSEN:片外ROM选通线,在执行访问片外ROM的指令MOVC时,8051自动在PSEN/线上产生一个负脉冲使和片外ROM芯片的选通.727

[1] [2] [3] [4] [5] 下一页

单片机数字时钟设计下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。