四川大学锦城学院 本科生课程设计 题 目 基于单片机数字频率计的设计 系 别 机械工程系 专 业 机械电子工程 学生姓名 张 何 学 号 120930146 年级 12 级 指导老师 黄 晖 2025 年 7 月 7 日基于单片机的数字频率计的设计 专 业 : 机 械 电 子 工 程 学 生 姓 名 : 张 何 指 导 老 师 : 黄 晖 摘 要本方案主要以单片机为核心,主要分为时基电路,逻辑控制电路,放大整形电路,闸门电路,计数电路,锁存电路,译码显示电路七大部分,设计以单片机为核心,被测信号先进入信号放大电路进行放大,再被送到波形整形电路整形,把被测的正弦波或者三角波整形为方波。利用单片机的计数器和定时器的功能对被测信号进行计数。编写相应的程序可以使单片机自动调节测量的量程,并把测出的频率数据送到显示电路显示。本设计以 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 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 the 89C51 microcontroller core, microcontroller applications and control functions and arithmetic operations with LED digital display tube to the measur...