Microchip
直播中

孔朱磊

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

PIC16F688比较器和VREF如何连接

PIC16F68 8的数据表没有说明内部电压基准是如何连接到比较器-倒相或非倒相输入的?http://WW1.Microchip .com……N/DeviceDoc /4120 3E.PDFAL,我只想使用一个比较器,但我不希望输出在外部引脚上——我只需要在代码中看到它,无论是通过中断还是轮询。“一个独立的比较器CM & lt;2:0& gt;=101”将输出放在外部引脚上。我不想为比较器的输出浪费一个引脚。有可能吗?综上所述,我想使用一个带有内部电压基准的比较器,并用软件处理比较器输出。

以上来自于百度翻译


      以下为原文

    The datasheet for the PIC16F688 does not say how the internal voltage reference is connected to the comparators - inverted or non-inverted inputs?
http://ww1.microchip.com/...n/DeviceDoc/41203E.pdf

Also, I would like to use only one comparator but I do not want the output on an external pin - I only need to see it in code, whether by an interrupt or by polling.
"One Independent Comparator CM<2:0> = 101" puts the output on an external pin.
And I do not want to waste a pin for the comparator output. Is it possible?

So, to sum up, I want to use a single comparator, with internal voltage reference, and process the comparator output in software.
Total I/O pins used: 1


Thanks.

回帖(11)

蒋喜玲

2019-2-12 13:14:06
似乎模式“四个输入多路复用到两个比较器CM & lt;2:0&gt=010正好是你想要的,顺便说一下,CM=101没有输出。只有一个输出是110。

以上来自于百度翻译


      以下为原文

    seems like mode "Four Inputs Multiplexed to Two Comparators CM<2:0> = 010 is exactly what you want
 
and, by the way, cm=101 does not have an output. The only one with outputs is 110.
举报

徐小婷

2019-2-12 13:32:42
好的,谢谢。我忽略了图中的“来自CVREF模块”的信号,这些比较器是开漏的吗?

以上来自于百度翻译


      以下为原文

    Ok, thank you. I overlooked the "From CVREF Module" signal at the diagram.
 
 Are these comparators open drain?
   Attached Image(s)

举报

蒋喜玲

2019-2-12 13:49:25
它们是CMCON0寄存器中的位。只有CM=110将输出连接到引脚,如图7- 5所示。

以上来自于百度翻译


      以下为原文

    They are bits in the CMCON0 register. Only CM=110 connects the outputs to pins as shown in figure 7-5
举报

徐小婷

2019-2-12 13:55:01
对。我的意思是,如果我想使用一个外部引脚,与CM = 110,缓冲区是一个开放的排水或推挽?端口图只显示一个缓冲器,端口端口和比较器使用该缓冲器。

以上来自于百度翻译


      以下为原文

   
Yes. I meant, if I wanted to use an external pin, with CM=110, is the buffer an open drain or push-pull? The port diagram only shows one buffer, that is used by the port pin and the comparator.
举报

更多回帖

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