当前位置:网站首页>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
边栏推荐
- 翻牌效果
- 剑指offer刷题(2)--面向华为
- Design of single chip microcomputer Proteus for temperature and humidity monitoring and alarm system of SHT11 sensor (with simulation + paper + program, etc.)
- 基础正则表达式
- C语言知识点精细详解——数据类型和变量【1】——进位计数制
- 统信UOS卸载php7.2.24,安装php7.4.27 ;卸载再安装为PHP 7.2.34
- 如何5分钟上手使用OCR
- MySQL-InnoDB-事务
- 处理 mkdir:无法创建目录“aaa“:只读文件系统
- Introduction to loan market quotation interest rate (LPR) and loan benchmark interest rate
猜你喜欢
Nacos作为配置中心(四) 使用Demo
流程控制之分支语句
基于单片机的DS18B20的数字温度监控报警系统设计【LCD1602显示+Proteus仿真+C程序+论文+按键设置等】
循环队列的基本操作,你学会了吗?
TLS/SSL 协议详解 (30) SSL中的RSA、DHE、ECDHE、ECDH流程与区别
剑指offer刷题(1)--面向华为
uni-app消息推送
C语言知识点精细详解——初识C语言【1】——你不能不知的VS2022调试技巧及代码实操【1】
Nacos uses demo as configuration center (IV)
51单片机的直流电机PWM调速控制系统(附Proteus仿真+C程序等全套资料)
随机推荐
elk安装
555定时器+74系列芯片搭建八路抢答器,30s倒计时,附Proteus仿真等
Redis源码分析之HSET流程与ziplist
百度笔试2022.4.12+编程题目:简单整数问题
Returns the subscript after array sorting
Qt界面优化:鼠标双击特效
差分隐私(背景介绍)
tcp_diag 内核相关实现 1 调用层次
Five ways of using synchronized to remove clouds and fog are introduced
循环队列的基本操作,你学会了吗?
C语言知识点精细详解——初识C语言【1】
Web page, adaptive, proportional scaling
Use the executors class to quickly create a thread pool
关于在vs中使用scanf不安全的问题
Qt实战:云曦聊天室篇
Man man notes and @ reboot usage of crontab
数组模拟队列进阶版本——环形队列(真正意义上的排队)
Golang 对分片 append 是否会共享数据
爬虫练习题(一)
Gif to still image processing