1、 1 摘摘 要要 如今的科技已是飞跃的进步,然而定时器的应用永远不会退休。 “定时器” 总的来说有两种类型,一种以机械时钟形式的产品,这种定时器功能简单,应用 于成本比较低的产品中,如比较古老的滴水计时器、传统的电风扇。当然滴水计 时已被淘汰,而低价的风扇中还是不会淘汰这种机械运转的精度不高的定时器。 另一种是基于电子电路数字技术的新一代产品,这种产品功能强,精度高,控制 和使用都比较直观而灵活,是前者的替代之物。 本设计开发了一种基于单片机的专用定时器。它造价低,功能全,整体性价 比高,可适应很多的场合做为保护或定时预警系统中。 此设计是最典型且经典的单片机定时功能应用设计, 设计中使用了单
2、片机定 时器的设计、单片机中断使用方法、LED 显示技术等。可以实现在 100 小时内的 任意时间定时,另可外控负载和提示报警等。 设计中的硬件电路主要含盖了 STC89C51RC 单片机、有源蜂鸣器、LED 数字 显示数码管等。在硬件的设计基础上,通过软件进行数码管的数值显示、键扫描 程序、蜂鸣器的提示音效和报警音效的处理。 关键词:关键词:定时器、STC89C51 单片机、LED 数字显示数码管 2 ABSTRACT Today, technology is a leap of progress, however, the application of the timer never re
3、tired. “Timer“ In general there are two types, a mechanical clock in the form of products, such a simple timer function, used in low-cost products, such as the old drip timer, traditional fans . Of course, dripping timing has been eliminated, and cheap fan or accuracy of this mechanical operation of
4、 the timer will not be eliminated. Another is based on a new generation of electronic circuits digital technology products, this product features high precision, control and use more intuitive and flexible, the former alternative material. The design and development of a microcontroller-based dedicated timer. It is low cost, full-function, and overall cost-effective, and can be adapted to many occasions as a protection or in the timing early warning system. This design is the most typical and