首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 软件A/D所能实现的精度有限,测量电压范围是2

软件A/D所能实现的精度有限,测量电压范围是2

  • 资源大小:1,015.00 B
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: TCP/IP协议 c++

资 源 简 介

软件A/D所能实现的精度有限,测量电压范围是2-15V, 而且速度低(约1KHz),但仅用一个电容和一个电阻的诱惑 力,我想大虾您会笑纳的。用于某些场合是有用的。 原理是利用470K电阻对1uF电容充电,利用P0.0口作为检测电压, 当电压低于1/3 VCC时,P0.0读入的I/O电平为0,当充电电压超过 1/3 VCC时,P0.0读入的I/O电平为1。通过测量此过程所用的时间, 就能判断输入电压(需要换算)。 程序的编写用定时器0实现-Software A/D can achieve the accuracy is limited, measuring voltage range is 2-15V, and low-speed (approximately 1 KHz), but only a capacitance and resistance of a temptation, I think you will prawns to the heart. For certain occasions is useful. The principle is the use of 470 K resistor pairs .1 uF capacitor charging, as I use P0.0 detection voltage, When the voltage is lower than 1/3 VCC, P0.0 read into the I/O level to 0, When the charging voltage over 1/3 VCC, P0.0 read into the I/O level to 1. By measuring this process, the time spent, we will be able to judge the input voltage (need conversion). The preparation procedures used to achieve timer 0

文 件 列 表

soft_ad.c
VIP VIP
0.171784s