Microchip
直播中

许莹

7年用户 206经验值
私信 关注
[问答]

如何使用ADC读取i/o引脚电压

IAM使用PIC32 MX795F512LMI设备I/O与MIL连接器引脚连接,能帮助我计算I/O引脚上的输出电压吗?

以上来自于百度翻译


      以下为原文

    Iam using PIC32MX795F512L
my device i/o's are connected with MIL connector pins,can any one help how to calculate output voltage on my I/O pin?

回帖(1)

李铭鑫

2019-4-18 06:33:01
HI,ADC将工作,并且可以用于测量端口B上任何I/O引脚的电压,ADC将在所有情况下测量引脚上的电压,不管引脚是如何配置的,作为输入或输出,数字或模拟。您可以设置ADC和测量引脚上的电压,作为FA。当ADC能够工作时,或者您可以在程序中的某个事件中开始ADC转换。如果按顺序进行多个测量,可以将ADC值存储在数据存储器中的数组中,然后使用调试器查看这些值。为什么在IPEwilliam hill官网 中发布这些问题?你正在使用IPE进行实验,因为MPLAB X IDE很可怕吗?或者还有其他原因吗?问候,Mysil

以上来自于百度翻译


      以下为原文

    Hi,
The ADC will work, and may be used to measure voltage on any of the I/O pins of port B, at any time.
The ADC will measure the voltage on the pin in all cases, regardless of how the pin is configured,
as Input or Output, Digital or Analog.
 
You may set up the ADC and measure Voltage on the Pin, as fast as the ADC is able to work,
or you may start a ADC conversion at some event in your program.
If you do several measurements in sequence, you may store ADC values in a array in data memory,
and look at the values using debugger afterwards.
 
Why are you posting these questions in IPE forum?
Are you using IPE for your experiments, because MPLAB X IDE is scary confusing?
or is there some other reason?
 
Regards,
   Mysil
 
举报

更多回帖

发帖
×
20
完善资料,
赚取积分