基于AT89S52单片机的频率计设计--毕业论文.doc
文本预览下载声明
简易频率计的设计
中 文 摘 要
频率测量是电子学测量中最为基本的测量之一。频率计主要是由信号输入和放大电路、单片机模块、分频模块及显示电路模块组成。AT89S52单片机是频率计的控制核心,来完成它待测信号的计数,译码,显示以及对分频比的控制。利用它内部的定时/计数器完成待测信号频率的测量。
在整个设计过程中,所制作的频率计采用外部分频,实现10Hz~2MHz的频率测量,而且可以实现量程自动切换流程。以AT89S52单片机为核心,通过单片机内部定时/计数器的门控时间,方便对频率计的测量。其待测频率值使用四位共阳极数码管显示,并可以自动切换量程,单位分别由红、黄、绿3个LED指示。本次采用单片机技术设计一种数字显示的频率计,具有测量准确度高,响应速度快,体积小等优点。
关键词:频率计;单片机;计数器;量程自动切换
The design of simple Frequency Measurement
ABSTRACT
Frequency measurement is the most basic measurement in Electronic field. A simple frequency meter mainly by the signal input and amplifying circuit, microcontroller module, sub-frequency circuit module and display module. AT89S52 MCU is the control core frequency of dollars to complete its count of the signal under test, decoding, display and control of the frequency division ratio. Using its internal timer or counter to complete the signal of the under test cycle / frequency of measurement.
Throughout the design process, periodic measurement of the frequency meter application and the corresponding mathematical treatment to achieve 10Hz ~ 2MHz frequency measurements, and can automatically switch the flow to achieve scale. To the core of AT89S52 microcontroller, with the MCU internal timer / counter gate time, it can be easier for frequency measurement. The use of microcomputer technology to design a digital display of frequency meter, have a measurement of high accuracy, fast response, small size and so on.
KEY WORD: Frequency meter; single chip; counter; range automatically switch
目录
第一章 前言 1
1.1频率计概述 1
1.2频率计发展与应用 1
1.3频率计设计内容 1
第二章 系统总体方案设计 2
2.1测频的原理 2
2.2总体思路 3
2.3具体模块 3
第三章 硬件电路具体设计 5
3.1 AT89S52主控制器模块 5
3.1.1 AT89S52的介绍 5
3.1.2 复位电路及时钟电路 6
3.1.3 引脚功能 7
3.1.4 单片机引脚分配 8
3.2 电源模块 9
3.2.1 直流稳压电源的基本原理 9
3.2.2 电源电路设计 10
3.3放大整形模块 11
3.4 分频设计模块 11
3.4.1 分频电路分析 11
3.4.2 74LS161芯片介绍 12
3.4.3 74LS151芯片介绍 13
3.4.4 分频电路 14
3.5 显示模块 14
3.5.1 数码管介绍 15
3.5.2 频率值显示电路 15
3.5.3 档位转换指示电路 16
第四章 系统的软件设计 17
4.1 软件模块设计 17
4.2 中断服务子程序 18
4.3
显示全部