Microchip
直播中

袁媛

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

PIC12F675比较器的汇编语言代码示例

大家好,有人能帮我一个比较器的汇编语言代码示例/工作项目吗?我想用PIC做一个简单的昼夜开关,而不是运算放大器LM358谢谢Yyyurn。

以上来自于百度翻译


      以下为原文

    Hi all, could someone please help me with an assembly language code exampe / working project of a comparator.  I want to make a simple day / night switch using a pic rather than an op-amp LM358

Thank you
Yurn.

回帖(2)

王焕树

2019-5-5 07:31:34
你要连接到比较器吗?为什么你不使用ADC而不是比较器呢?这将允许您通过程序控制开关阈值。

以上来自于百度翻译


      以下为原文

    What are you going to connect to the comparator?
Why wouldn't you use the ADC rather than the comparator? That would let you control the switch threshold via your program.
 
举报

康永清

2019-5-5 07:51:09
比较器管脚的输入是什么样的?电压水平和截止值是多少?你如何实现白天/夜晚的切换?它是LDR电路吗?在汇编中设置比较器并不太困难,只要配置CIN +和CIN - PIN作为模拟输入,并且适当的位必须在CMCon(19H)寄存器中编程。在CMCON寄存器中选择输出极性和比较器操作模式。

以上来自于百度翻译


      以下为原文

    What do the inputs to the comparator pins look like? What are the voltage levels and what is the cutoff?
How are you implementing the day/night switch? Is it an LDR circuit?
Setting up the comparator in assembly is not too hard- Just configure the CIN+ and CIN- pins as analog
inputs, and the appropriate bits must be programmed in the CMCON (19h) register.  Select the output polarity and the comparator mode of operation in the CMCON register.
 
 
 
举报

更多回帖

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