基于51单片机的数字频率计设计说明

基于51单片机的数字频率计设计说明
基于51单片机的数字频率计设计说明

毕业论文

课题:基于单片机的数字频率计的设计

摘要

本方案主要以单片机为核心,主要分为时基电路,复位电路,显示电路三大部分,设计以单片机为核心,利用单片机的计数器和定时器的功能对被测信号进行计数。编写相应的程序可以使单片机自动调节测量的量程,并把测出的频率数据送到显示电路显示。

本设计以89C51单片机为核心,应用单片机的算术运算和控制功能并采用LED数码显示管将所测频率显示出来。系统简单可靠、操作简易,能基本满足一般情况下的需要。既保证了系统的测频精度,又使系统具有较好的实时性。本频率计设计简洁,便于携带,扩展能力强,适用围广。

[关键词]单片机,运算,频率计,LED数码管。

*********************************************************************

*********************************************************************

*专抠专欢迎*

*业抠为您的*

*代群大加入*

*做 2 学*

*毕 4 生*

*设 6 服*

* 3 务*

* 8 解*

* 2 决*

* 2 问*

* 3 题*

* *

***********************************************************************

***********************************************************************

Abstract

The program mainly microcontroller as the core, are divided into time-base circuit, the logic control circuit, amplifier shaping circuit, the gate circuit, the counting circuit, latch circuit, decoding circuit most of the seven shows, design a microcontroller as the core, the measured signal the first amplifier to amplify the incoming signal, and then was sent to the waveform shaping circuit surgery, the measured sine wave or triangle wave shaping as a square wave. Counter and timer microchip features of the signal count. Write the corresponding program can automatically adjust the measurement range of SCM, and the frequency of the measured data to the display circuit displays.

The design of the89C51microcontroller core, microcontroller applications and control functions and arithmetic operations with LED digital display tube to the measured frequency is displayed. System is simple, reliable, easy to operate and can basically meet the general needs. Both to ensure the accuracy of the system frequency measurement, but also the system has good real-time. The frequency meter design is simple and easy to carry, expansion capability, wide application.

[Key words] microcontroller, operation, frequency meter, LED digital tube。

前言

*********************************************************************

*********************************************************************

*专抠专欢迎*

*业抠为您的*

*代群大加入*

*做 2 学*

*毕 4 生*

*设 6 服*

* 3 务*

* 8 解*

* 2 决*

* 2 问*

* 3 题*

* *

***********************************************************************

***********************************************************************在电子测量领域中,频率测量的精确度是最高的,可达10—10E-13数量级。因此,在生产过程中许多物理量,例如温度、压力、流量、液位、PH 值、振动、位移、速度、加速度,乃至各种气体的百分比成分等均用传感器转换成信号频率,然后用数字频率计来测量,以提高精确度。

国际上数字频率计的分类很多。按功能分类,测量某种单一功能的计数器。如频率计数器,只能专门用来测量高频和微波频率;时间计数器,是以测量时间为基础的计数器,其测时分辨力和准确度很高,可达ns数量级;特种计数器,它具有特种功能,如可逆计数器、予置计数器、差值计数器、倒数计数器等,用于工业和白控技术等方面。数字频率计按频段分类(1)低速计数器:最高计数频率<10MHz;(2)中速计数器:最高计数频率10—100MHz;(3)高速计数器:最高计数频率>100MHz;(4)微波频率计数器:测频围1—80GHz或更高。

单片机自问世以来,性能不断提高和完善,其资源又能满足很多应用场合的需要,加之单片机具有集成度高、功能强、速度快、体积小、功耗低、使用方便、价格低廉等特点,因此,在工业控制、智能仪器仪表、数据采集和处理、通信系统、高级计算器、家用电器等领域的应用日益广泛,并且正在逐步取代现有的多片微机应用系统。单片机的潜力越来越被人们所重视。特别是当前用CMOS工艺制成的各种单片机,由于功耗低,使用的温度围

大,抗干扰能力强、能满足一些特殊要求的应用场合,更加扩大了单片机的应用围,也进一步促使单片机性能的发展。

1 绪论 (1)

1.1课题背景 (1)

1.2 课题研究的目的和意义 (1)

1.3数字频率计设计的任务与要求 (1)

2 数字频率计总体方案设计 (2)

2.1方案比较 (2)

2.2方案论证 (3)

2.3方案选择 (3)

3 数字频率计的硬件系统设计 (4)

3.1 数字频率计的硬件系统框架 (4)

3.2 数字频率计的主机电路设计 (5)

3.3数字频率计显示电路的设计 (9)

4 数字频率计软件系统设计 (12)

4.1中断控制 (12)

4.2定时器/计数器 (12)

4.2.1定时工作方式0 (13)

4.3程序流程图设计 (14)

4.3.1主程序流程 (14)

4.3.2 中断流程 (15)

5 数字频率计的仿真调试 (16)

相关主题
相关文档
最新文档