当前位置:网站首页>AT89C52 MCU frequency meter (1Hz ~ 20MHz) design, LCD1602 display, including simulation, schematic diagram, PCB and code, etc
AT89C52 MCU frequency meter (1Hz ~ 20MHz) design, LCD1602 display, including simulation, schematic diagram, PCB and code, etc
2022-04-23 14:25:00 【Jiang Yuzhi】
The design requirements
1. With MCS-51 Series single chip microcomputer is the control device , use C Language for program development , Combined with peripheral electronic circuits , Design a digital frequency meter ;
2. Can be right 1HZ~20MHZ Sine wave 、 Triangle wave 、 The frequency of periodic signals such as square wave signal is measured ;
3. Measurement error : lower than 0.1%;
4. The frequency measurement results are LCD1602 Liquid crystal display (LCD) ;
System Overview
This design gives a method to AT89C52 The design scheme of digital frequency meter with single chip microcomputer as the control core . The plan is made up of 6 Component composition , They are power modules 、 Minimum system of single chip microcomputer 、 Signal amplification module 、 Shaping module 、 Frequency division module and display module .
Working principle is : The power module provides stable power supply for the whole system 5V Working voltage , The user inputs a periodic signal through the signal source , The input signal is amplified by triode circuit and shaped by Schmidt trigger , Become a square wave that can be recognized by single chip microcomputer , Complete the square wave division circuit 100 Double the frequency .
When the frequency of the input signal is lower than 200KHZ when , The single chip microcomputer directly reads and calculates the unit time before frequency division (1S) Number of signal pulses collected in , Is the signal frequency ;
When the frequency of the input signal exceeds 200KHZ when , The single chip microcomputer reads and calculates the number of signal pulses after frequency division , Then it is converted into the actual frequency through data processing .
Last , The single chip microcomputer outputs the frequency measurement value to LCD1602 Real time display on the display .

Simulation circuit diagram


Schematic diagram

PCB chart

Physical drawing of frequency meter

Analysis of simulation results
open Proteus Simulation file , File suffix DSN. Double click the MCU , load Program.hex file ( be located C In the program folder ), Run the simulation , The results are shown below , The frequency of the measured signal is 13HZ.

Simulation runtime , Will pop up VSMCounter Timer and VSM Signal Generator Two windows ,VSM Counter Timer Used to display the standard frequency .
In the simulation , When the measured signal voltage is greater than 5V when ,VSM Counter Timer To work properly . It doesn't mean that , In the physical test of the actual frequency meter , The measured signal source voltage shall be greater than 5V Talent .
actually , The measured signal voltage is in tens of mV, You can also check the display on the oscilloscope , It does not affect the measurement of frequency , This is just the limitation of simulation .
VSM Signal Generator Used to adjust the frequency of the measured signal , It has four knobs , Their functions and uses are shown in the table below .

In the simulation , Mainly regulate Centre and Frequency knob , After setting the frequency gear , turn Centre The knob changes the frequency ,LCD1602 The display will follow the display .
When the measured signal frequency is 390HZ、5.6KHZ and 19063HZ when , The simulation results are as follows .



When the measured signal frequency is 19063HZ, The measurement result is 19051HZ, The frequency measurement error is calculated as :

The frequency of the measured signal is tens of 、 A few hundred HZ when , The frequency can be measured quickly ; When the frequency reaches KHZ when , Due to the limited computing performance of single chip microcomputer , It may take a few minutes to get the simulation results .
When the frequency reaches MHZ When above , For example, the frequency of the measured signal is set to 1.17MHZ when , Single chip microcomputer operation cost 12 About minutes , To calculate the frequency value . The operation process is as follows , The figure below 1 Because the single chip microcomputer is in the process of operation , The measurement results have not been obtained ; chart 2 by 1.17MHZ Set frequency of , The result measured by single chip microcomputer is 1169700HZ.


The frequency measurement error is calculated as :

in summary , The frequency meter simulation design meets the range requirements 、 Error and other requirements .
Resource content
(1) be based on 51 MCU digital frequency meter design paper complete version ;
(2)C Program ;
(3)Proteus Simulation ;
(4) Schematic diagram and PCB file ;
(5)Visio Flow chart file ;
(6) List of components ;
(7) Translation of English documents ;
(8) References and Literature ;
Resource screenshot







Say the important thing again !!!
Because the frequency meter design is my original design , Get a full set of information ,
WeChat search for my official account : Jiaoyuan Xiaozhi
版权声明
本文为[Jiang Yuzhi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231412471864.html
边栏推荐
猜你喜欢

1分钟看懂执行流程,永久掌握for循环(附for循环案例)

Visio画拓扑图随记

After entering the new company, the operation and maintenance engineer can understand the deployment of the system from the following items

uni-app消息推送

sar命令详解

C语言知识点精细详解——初识C语言【1】——你不能不知的VS2022调试技巧及代码实操【2】

金九银十,入职字节跳动那一天,我哭了(蘑菇街被裁,奋战7个月拿下offer)

流程控制之分支语句

flannel 原理 之 TUN模式

asp.net使用MailMessage发送邮件的方法
随机推荐
How does void * exist?
Introduction to the use of semaphore for inter thread control
TLS/SSL 协议详解 (30) SSL中的RSA、DHE、ECDHE、ECDH流程与区别
C语言p2选择分支语句详解
交通灯系统51单片机设计(附Proteus仿真、C程序、原理图及PCB、论文等全套资料)
Proteus simulation design of DC adjustable regulated power supply (with simulation + paper and other data)
LotusDB 设计与实现—1 基本概念
统信UOS卸载php7.2.24,安装php7.4.27 ;卸载再安装为PHP 7.2.34
本以为能躺着进华为,结果陆续收到京东/滴滴/爱奇艺offer的我迷茫了
Five ways of using synchronized to remove clouds and fog are introduced
操作系统常见面试题目:
Introduction to loan market quotation interest rate (LPR) and loan benchmark interest rate
51单片机的直流电机PWM调速控制系统(附Proteus仿真+C程序等全套资料)
八路抢答器系统51单片机设计【附Proteus仿真、C程序、原理图及PCB文件、元器件清单和论文等】
Detailed explanation of SAR command
Qt界面优化:Qt去边框与窗体圆角化
Upgrade of openssh and modification of version number
C语言知识点精细详解——数据类型和变量【1】——进位计数制
一篇博客让你学会在vscode上编写markdown
C语言知识点精细详解——初识C语言【1】——你不能不知的VS2022调试技巧及代码实操【2】