单片机实验设计

  • 格式:doc
  • 大小:155.50 KB
  • 文档页数:19

下载文档原格式

  / 19
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

摘要:20世纪末,电子技术获得了飞速的发展,在其推动下,现代电子产品几乎渗透了社会的各个领域,有力地推动了社会生产力的发展和社会信息化程度的提高,同时也使现代电子产品性能进一步提高,产品更新换代的节奏也越来越快。现代生活的人们越来越重视起了时间观念,可以说是时间和金钱划上了等号。对于那些对时间把握非常严格和准确的人或事来说,时间的不准确会带来非常大的麻烦,所以以数码管为显示器的时钟比指针式的时钟表现出了很大的优势。数码管显示的时间简单明了而且读数快、时间准确显示到秒。而机械式的依赖于晶体震荡器,可能会导致误差。数字钟是采用数字电路实现对“时”、“分”、“秒”数字显示的计时装置。数字钟的精度、稳定度远远超过老式机械钟。在这次设计中,我们采用LED数码管显示时、分、秒,以24 小时计时方式,根据数码管动态显示原理来进行显示,用12MHz的晶振产生振荡脉冲,定时器计数。在此次设计中,电路具有显示时间的其本功能,还可以实现对时间的调整。数字钟是其小巧,价格低廉,走时精度高,使用方便,功能多,便于集成化而受广大消费的喜爱,因此得到了广泛的使用。

关键词:单片机数字电子钟

Abstrac t:

The late 20th century, electronic technology has been rapid development in its promotion, p enetration of modern electronic products will almostFields, a strong impetus to the develop ment of social productive forces and social improvement in the level of information, while also further improve the performance of modern electronic products, replacement products have become increasingly fast pace. Growing emphasis on modern life from the time the c oncept of time and money can be said to draw the equal sign. For those who are very strict and accurate grasp of time and things, time will not exactly bring a very big trouble, so as t o control the display of digital clock than the clock pointer showed a big advantage. Digital display of time reading simple and fast, accurate display of time to seconds. The mechanica l oscillator depends on the crystal may lead to errors. Digital Clock is a digital circuit imple mentation of the "when", "sub", "seconds" The figures show the timing device. Digital cloc k precision, stability, far more than the old mechanical clock. In this design, we use LED di gital display hours, minutes, seconds, to 24-hour time mode, according to digital control the ory to dynamic display to display, use the 12MHz crystal oscillation pulse, the timer count. In this design, the circuit has a display time of the this function, you can also realize the tim e adjustment. Digital clock is its compact, low cost, travel time and high precision, easy to use, features and more, easy integration and loved by the general consumer, so widely used.

Keywords: digital electronic clock SCM

前言

时钟,自从它发明的那天起,就成为人类的朋友,但随着时间的推移,科学技术的不断发展,人们对时间计量的精度要求越来越高,应用越来越广。怎样让时钟更好的为人民服务,怎样让我们的老朋友焕发青春呢?这就要求人们不断设计出新型时钟。

现今,高精度的计时工具大多数都使用了石英晶体振荡器,由于电子钟,石英表,石英钟都采用了石英技术,因此走时精度高,稳定性好,使用方便,不需要经常调校,数字式电子钟用集成电路计时时,译码代替机械式传动,用LED显示器代替显示器代替指针显示进而显示时间,减小了计时误差,这种表具有时,分,秒显示时间的功能,还可以进行时和分的校对,片选的灵活性好。

时钟电路在计算机系统中起着非常重要的作用,是保证系统正常工作的基础。在一个单片机应用系统中,时钟有两方面的含义:一是指为保障系统正常工作的基准振荡定时信号,主要由晶振和外围电路组成,晶振频率的大小决定了单片机系统工作的快慢;二是指系统的标准定时时钟,即定时时间,它通常有两种实现方法:一是用软件实现,即用单片机内部的可编程定时/计数器来实现,但误差很大,主要用在对时间精度要求不高的场合;二是用专门的时钟芯片实现,在对时间精度要求很高的情况下,通常采用这种方法,典型的时钟芯片有:DS1302,DS12887,X1203等都可以满足高精度的要求。

本文主要介绍用单片机内部的定时/计数器来实现电子时钟的方法,本设计由单片机AT89S51芯片和LED数码管为核心,辅以必要的电路,构成了一个单片机电子时钟。