Microchip
直播中

李滢芝

8年用户 229经验值
私信 关注
[问答]

如何只将MUX A输入连接到ADC?

芯片是PIC24FV32KA304。我想把一个单一的输入(如AN12)连接到ADC,所以我想我会选择MUX A正输入的输入。然而,在FRM示例中,它表明要做到这一点,我应该将AD1CHS设置为0x000c,如果我正确地读取数据表,它将AN12连接到MUX A,将AN0连接到MUX B。这意味着人们不会使用此设置。所以我猜我的问题是,如何只将MUX A输入连接到ADC?谢谢,鲍伯

以上来自于百度翻译


      以下为原文

    Chip is PIC24FV32KA304.

I'd like to connect a single input (say AN12) to the ADC so I thought I would select that input for MUX A positive input.  However in the FRM example, it shows to do this I should set AD1CHS to 0x000c which, if I'm reading the data sheet correctly, connects AN12 to MUX A and AN0 to MUX B.

I'm tempted to set it to 0x110c (AN12 on MUX A, "No channels connected" on MUX B) but the datasheet says that this is used for CTMU, implying that one wouldn't use this setting otherwise.

So I guess my question is, how does one connect only MUX A input to the ADC?

Thanks,
Bob

回帖(2)

李铭鑫

2019-6-28 08:23:10
嗨,AD1CHS寄存器有4个不同的字段,这些字段可以相互独立地设置。其他寄存器中有一些控件,用于确定来自MUXA或MUXB的信号是否被测量,或者测量值是否在MUXA和MUXB之间交替:参见:AD1CON2.ALTS=0;总是使用选择的信道输入对于MUX A,在这种情况下,在AD1CHS.CH0SB中设置并不重要。AD1CHS.CH0SB=17并不意味着“没有输入”,而是来自另一个外围设备的输入,而不是模拟输入引脚。无论如何,如果MUXB的信号没有测量,这无关紧要。而且,AD1CHS寄存器中的设置不影响模拟或数字输入引脚缓冲器的性能,这由ANSA、ANSB和ANSC寄存器控制。

以上来自于百度翻译


      以下为原文

    Hi,
The AD1CHS register have 4 different fields that may be set independently of each other.
There are controls in other registers that determine whether signal from MUXA or MUXB are measured, or if measurements alternate between MUXA and MUXB:
See: AD1CON2.ALTS = 0; Always uses channel input selected for MUX A.
When this is the case, setting in AD1CHS.CH0SB do not matter.
AD1CHS.CH0SB = 17 do not mean 'No input', it is an input from another peripheral that is not an analog input pin. This do not matter if the signal from MUXB is not measured anyway.
Also, settings in AD1CHS register do not influence the properties of analog or digital input pin buffers, this is controlled by ANSA, ANSB and ANSC registers.
 
Regards,
   Mysil
举报

刘政玮

2019-6-28 08:30:54
Mysil,这就是我在数据表中寻找的,但是没有找到。多谢!——鲍伯

以上来自于百度翻译


      以下为原文

    Mysil,
 
That's what I was looking for in the datasheet but missed. Thanks much!
 
-- Bob
举报

更多回帖

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