当前位置:网站首页>AT89C51 MCU digital voltmeter development, measuring range 0 ~ 5V, proteus simulation, schematic diagram, PCB and C program, etc
AT89C51 MCU digital voltmeter development, measuring range 0 ~ 5V, proteus simulation, schematic diagram, PCB and C program, etc
2022-04-23 14:25:00 【Jiang Yuzhi】
The design requirements
1. With MCS-51 Series single chip microcomputer as the core device , Design a simple DC digital voltmeter ;
2. Voltage range :0~5V;
3. Minimum resolution :0.01V;
4. Less components are used , The cost is low , And the measurement accuracy and reliability are high ;
System Overview
This design is based on Atmel 51 A digital voltmeter system based on MCU development platform and automatic control principle .
The system adopts AT89C51 Single chip microcomputer as the control core , With ADC0809 Analog to digital conversion chip , Realize range 0 To 5V Sampling of measured voltage data ;LCD1602 Character LCD displays the measured voltage value .
meanwhile , The measurement accuracy of digital voltmeter is 0.01V, It can meet the general measurement requirements , The system framework is shown in the figure below .
Simulation circuit diagram
Schematic diagram
PCB chart
Analysis of simulation results
open Proteus Simulation file , File suffix DSN. Double click the MCU , load DianYa.hex file ( be located C In the program folder ), Run the simulation , The results are shown in the following figure .
And you can see that ,LCD Show AD Switching channels IN0 voltage (Voltage) The size is 1.84V, use Proteus The software comes with a voltmeter (Volts) The result of the measurement is 1.85V, Both occasionally 0.01V The deviation of , It belongs to the normal phenomenon of simulation .
Slide the rheostat by clicking RP2 Up and down red arrows , Simulate the change of measured voltage value (0~5V Between ),LCD Real time tracking and display of voltage changes .
The figure below shows how to adjust the sliding rheostat ,LCD The displayed voltage value is 4.25V, And Volts The voltmeter shows the same result .
in summary , Digital voltmeter Proteus The running effect of simulation design meets the design requirements .
part C Code
#include"include.h"
#define TIME0H 0x3C
#define TIME0L 0xB0
uchar uc_Clock=0; // Timer 0 Interrupt count
bit b_DATransform=0;
void vShowVoltage(uint uiNumber)
{
uchar ucaNumber[3],ucCount;
if(uiNumber>999)
uiNumber=999;
ucaNumber[0]=uiNumber/100; // Store each bit of the calculated number in the array .
ucaNumber[1]=(uiNumber-100*(int)ucaNumber[0])/10;
ucaNumber[2]=uiNumber-100*(int)ucaNumber[0]-10*ucaNumber[1];
for(ucCount=0;ucCount<3;ucCount++)
{
vShowOneChar(ucaNumber[ucCount]+48); // Output one by one from the first to the last .
if(ucCount==0)
vShowOneChar('.');
}
}
void main()
{
TMOD=0x01; // Timer 0, Pattern 1.
TH0=TIME0H;
TL0=TIME0L;
TR0=1; // Start timer .
ET0=1; // On timer interrupt .
EA=1; // General interruption
vdInitialize();
vWriteCMD(0x84); // Write display start address ( The first line is 4 A place )
vShowChar("voltage");
vWriteCMD(0xC9);
vShowChar("(V)");
while(1)
{
if(b_DATransform==1)
{
b_DATransform=0;
vWriteCMD(0xC4);
vShowVoltage(uiADTransform());
}
}
}
Shared content
(1) be based on 51 MCU digital voltmeter design paper complete version ;
(2)C Program ;
(3)Proteus Simulation file ;
(4) Schematic diagram and PCB file ;
(5)Visio flow chart ;
(6) List of components ;
(7) Reference material ;
Content as shown
Say the important thing again !!!
Obtain a complete set of design data of digital voltmeter design !
WeChat search for my official account : Jiaoyuan Xiaozhi
版权声明
本文为[Jiang Yuzhi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231412471956.html
边栏推荐
- 51单片机的直流电机PWM调速控制系统(附Proteus仿真+C程序等全套资料)
- bc的用法
- A table splitting implementation scheme of MySQL and InnoDB, MyISAM and MRG_ Introduction to MyISAM and other engine application scenarios
- JS key value judgment
- Flop effect
- Debug on TV screen
- ansible及常用模块的使用
- 电子秤称重系统设计,HX711压力传感器,51单片机(Proteus仿真、C程序、原理图、论文等全套资料)
- LLVM - 生成 if-else 以及 PH
- gif转为静态图片处理
猜你喜欢
电子秤称重系统设计,HX711压力传感器,51单片机(Proteus仿真、C程序、原理图、论文等全套资料)
A table splitting implementation scheme of MySQL and InnoDB, MyISAM and MRG_ Introduction to MyISAM and other engine application scenarios
51单片机+LCD12864液晶显示的俄罗斯方块游戏,Proteus仿真、AD原理图、代码、论文等
Qt界面优化:Qt去边框与窗体圆角化
XX project structure notes
Man man notes and @ reboot usage of crontab
关于在vs中使用scanf不安全的问题
统信UOS卸载php7.2.24,安装php7.4.27 ;卸载再安装为PHP 7.2.34
查找水仙花数-for循环实践
555定时器+74系列芯片搭建八路抢答器,30s倒计时,附Proteus仿真等
随机推荐
C语言知识点精细详解——初识C语言【1】——你不能不知的VS2022调试技巧及代码实操【1】
Docker篇 (五) MySQL的安装
Preview CSV file
Proteus simulation design of DC adjustable regulated power supply (with simulation + paper and other data)
JS recursion (1)
How to do a project easily
数组模拟队列进阶版本——环形队列(真正意义上的排队)
Some little records~
TLS/SSL 协议详解 (28) TLS 1.0、TLS 1.1、TLS 1.2之间的区别
js 抛物线运动方法封装
TUN 设备原理
SHT11传感器的温度湿度监控报警系统单片机Proteus设计(附仿真+论文+程序等)
Docker (V) MySQL installation
Use the executors class to quickly create a thread pool
AT89C52单片机的频率计(1HZ~20MHZ)设计,LCD1602显示,含仿真、原理图、PCB与代码等
LLVM - 生成局部变量
51单片机的花卉、农田自动浇水灌溉系统开发,Proteus仿真,原理图和C代码
基于单片机的DS18B20的数字温度监控报警系统设计【LCD1602显示+Proteus仿真+C程序+论文+按键设置等】
js 格式化时间
Solve the problem of SSH configuration file optimization and slow connection