PSOC4000S Comparator issue?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
David_Zhang
Level 5
Level 5
Distributor - Arrow(GC)
First like received 50 sign-ins 25 sign-ins

hi  Cypress:

     if  the  PSoC 4 CSD Comparator  is belong to  Capsense , if we use capsense as button or slider, so we can't use it as  Comparator?? it will show the worng;

for some application , we not want to know about the detail voltage ,just want to know if the voltage is bigger or lower the fixed value, so the comparator, can you use

the capsense and  comparator the same, tks;

pastedImage_0.png

0 Likes
1 Solution
Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

这个比较器是 CapSense 组件的一部分,如果已经使用了 CapSense 组件则该比较器不能复用。客户可以使用 LP Comparator, PSoC4000S 芯片里面有一个或者两个 LP Comparator 可以使用。

View solution in original post

0 Likes
5 Replies
Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

这个比较器是 CapSense 组件的一部分,如果已经使用了 CapSense 组件则该比较器不能复用。客户可以使用 LP Comparator, PSoC4000S 芯片里面有一个或者两个 LP Comparator 可以使用。

0 Likes
David_Zhang
Level 5
Level 5
Distributor - Arrow(GC)
First like received 50 sign-ins 25 sign-ins

hi Vison:

    LP Comparator  的没有代码,只有说明文件,能提供代码吗? 谢谢;

CE95333 - Low Power Comparator with PSoC 4

0 Likes

LP Comparator 不需要什么代码,你在组件中按照需要配置完毕之后调用 Start API 即可。

0 Likes
David_Zhang
Level 5
Level 5
Distributor - Arrow(GC)
First like received 50 sign-ins 25 sign-ins

hi Vison:

pastedImage_0.png

添加代码:

GSR_ISR_StartEx(ISR_GSR);

GSR_ISR_ClearPending();

LPComp_Start();

pastedImage_1.png

    这样设计OK?? 

0 Likes

LP 中断的使用时对的,但是为何要在 LP中断函数中对 SW引脚进行清中断动作。每个中断都应该有自己的中断函数不是吗,中断函数之间尽量不要有耦合。

0 Likes