Announcements

Robots are revolutionizing our lives in many ways. Join our webinar to learn about Infineon’s broad portfolio of robot building blocks.
Click here to register.

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

PSoC™ 4 Forum Discussions

prudhvi1
Employee
Employee
First reply posted First question asked Welcome!

I am using Cy_LPComp_GetCompare() API to compare the input volage and reference voltage. As per API description in PDL library it returns non-zero value when the voltage connected to the positive input is greater than the negative input voltage. 
What happens when input voltage and reference voltage is same?
What is the return value of Cy_LPComp_GetCompare() API ?

0 Likes
2 Replies
Rakesh_Patrudu
Moderator
Moderator
Moderator
100 sign-ins 25 replies posted 10 solutions authored

Hi @prudhvi1 ,

Cy_LPComp_GetCompare function returns a nonzero value when the voltage connected to the positive input is greater than the negative input voltage. Could you please explain why you chose both the input and reference voltages same? Please also specify the PSoC device you are using.

Best regards,
Rakesh

 

0 Likes

I am using PSoC4 4100S plus device (CY8CKIT-149). I am making the device go to deepsleep when the +ve input is less than -ve input. If +ve input greater than -ve input the LED will blink continuously. 

So I wanted to know the behavior if both voltages are same. Can you please clarify my doubt, What is the return value of Cy_LPComp_GetCompare function if +ve and -ve voltages are same?

0 Likes
This widget could not be displayed.