1、1 摘摘 要要 当今社会,单片机已经普及到我们生活、工作的各个方面,已经发展成 为一门比较成熟的技术。定时器在日常生活、工业控制、交通灯管理、检测、 报警等方面的应用越来越广泛,同时人们对定时器的要求也越来越高。本课 题设计一个基于 STC89C52 构成的实用定时器,这在某些应用中具有一定的 实用价值。 本课题设计了一个基于 STC89C52 的定时器,首先介绍了设计内容及要 求,介绍了定时器的设计思路以及功能模块的划分,并对各模块实现的具体 功能进行了说明。然后结合框图,介绍了定时器的工作原理,之后详细介绍 了定时器具体单元电路的设计与分析。 该定时器除具有基本的定时功能外,还具有定时时间
2、连续可调、倒计时 显示和定时开关功能。它造价低,功能全,整体功能性价比高,配以 LED 显 示器,它适应各种场合的定时预警之用。而且设计巧妙,体积小,功能强, 计时范围大,用途广泛,操作携带方便,是一种较理想的定时工具。 关键词:关键词:定时器; STC89C52;连续可调;倒计时显示 1 ABSTRACTABSTRACT Today, the monolithic integrated circuits has been popular in our daily life and work ,and has become a relatively mature technology.The
3、timer in our daily lives, industrial control, traffic lights management, detection, alarm and so on, while people on the timer there are increasingly high requirements. The design of a subject with a practical STC89C52 timer, which in some applications has some practical values. This paper first int
4、roduced the design of the content and requirements on the design of the timer and the delineation of functional modules, each module and the specific functions of the note. Then with diagram, on the principle of the timer, after details of the specific unit timer circuit design and analysis. The tim
5、er in addition to a basic function of the timing, but also with adjustable timing consecutive time, the countdown display and regularly switching function. it is low cost, full-featured, cost-effective overall function, together with a LED display, it is adapt to a variety of occasions for use in va
6、rieties of warning. And cleverly designed, small, strong function, wide time range, wide range of uses, easy to carry and operate, is an ideal timing tool. Keywords: Keywords: Timer; Timer; STC89C52; continuously adjustable; the countdown show 1 目目 录录 第一章第一章 绪论绪论 . 1 1.1 设计背景 . 3 1.2 论文研究内容 . 5 1.3 论文结构安排 5 第二章第二章 整体方案设计整体方案设计 6 2.1 设计任务及要求 . 6 2.2 系统设计整体方案 . 6 2.2.1 时钟计时的方案选择 . 6 2.2.2 时钟显示的方案选择 . 8 2.2.3 系统硬件的整体设计 . 8 2.2.4 主控制模块的方案选择与设计 . 9 第三章第三章 硬件电路设计硬件电路设计 10 3.1 STC 单片机 . 10 3.2 ST