文件名称:AD
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:734byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
/*软件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 (about 1KHz), but only one capacitor and a resistor of temptation, I think you will accept my gift of prawns. Is useful for certain occasions. Principle is to use 470K resistor to the 1uF capacitor, using P0.0 port as the test voltage, when the voltage is less than 1/3 VCC when, P0.0 read into the I/O level to 0, when the charging voltage over 1/3 VCC time, P0.0 read the I/O level to 1. By measuring the time spent in this process, we can determine the input voltage (with translation). The preparation process to achieve with Timer 0
而且速度低(约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 (about 1KHz), but only one capacitor and a resistor of temptation, I think you will accept my gift of prawns. Is useful for certain occasions. Principle is to use 470K resistor to the 1uF capacitor, using P0.0 port as the test voltage, when the voltage is less than 1/3 VCC when, P0.0 read into the I/O level to 0, when the charging voltage over 1/3 VCC time, P0.0 read the I/O level to 1. By measuring the time spent in this process, we can determine the input voltage (with translation). The preparation process to achieve with Timer 0
相关搜索: 充电 程序
(系统自动生成,下载前可以参看下载内容)
下载文件列表
AD.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.