文档介绍:基于单片机的数字频率计的设计
专业电子信息工程
学生姓名
班级 08电子信息工程(1)班
学号
指导教师
完成日期
目录
摘要 3
前言 1
第一章绪论 2
2
课题研究的目的和意义 2
2
第二章数字频率计总体方案设计 3
3
4
4
第三章数字频率计的硬件系统设计 5
数字频率计的硬件系统框架 5
数字频率计的主机电路设计 5
8
9
12
15
第四章数字频率计软件系统设计 16
软件设计规划 16
16
16
17
18
18
18
中断流程 20
第五章数字频率计的仿真调试 22
参考文献 23
致谢 24
附录(程序) 25
附录:数字频率计的系统原理图 28
摘要
本方案主要以单片机为核心,主要分为时基电路,逻辑控制电路,放大整形电路,闸门电路,计数电路,锁存电路,译码显示电路七大部分,设计以单片机为核心,被测信号先进入信号放大电路进行放大,再被送到波形整形电路整形,把被测的正弦波或者三角波整形为方波。利用单片机的计数器和定时器的功能对被测信号进行计数。编写相应的程序可以使单片机自动调节测量的量程,并把测出的频率数据送到显示电路显示。
本设计以89C51单片机为核心,应用单片机的算术运算和控制功能并采用LED数码显示管将所测频率显示出来。系统简单可靠、操作简易,能基本满足一般情况下的需要。既保证了系统的测频精度,又使系统具有较好的实时性。本频率计设计简洁,便于携带,扩展能力强,适用范围广。
[关键词]单片机,运算,频率计,LED数码管
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 ing 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 the 89C51 microcontroller 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 an