CY8C95xxA: GPort configuration

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

cross mob
Anonymous
Not applicable

Hi,

   

need some help to understand the port configuration of the CY8C95xxA. What I have done is to add a LED to a port pin. In default state the LED lights up. Set the output to 'Low' the LED is off. So far OK.

   

But when I configure the GPort as Input and Set Drive Mode to High-Z after power up, the LED still lights up. In my understanding the LED should be off.

   

What went wrong there? Is my  configuration wrong or didn't I understand the GPort architecture and this is a right behaviour? But if this behaviour is right, why do I have the possibility to set GPort as Input?

   

Thank you in advance,

   

Herrol

0 Likes
4 Replies
Anonymous
Not applicable

How do you have the LED wired?

   

i.e. is the CY8C95xxA pin sourcing or sinking currrent?

   

(There are two options here - so let's start with that infomation...)

   

regards,

   

Tom Moxon

0 Likes
Anonymous
Not applicable

Hi Tom,

   

I took a 330Ohm resistor wired from the GPort to the Anode of the LED (cathode is wired to ground). So in my understanding the CY8C95xxA is sourcing (~5mA)?

   

Regards,

   

Herrol

0 Likes
Anonymous
Not applicable

Right, so if the PSOC device is Sourcing current, then anytime the PSoC device output is floating

   

(i.e pulled up internally), then the LED would be on (maybe not brightly, but it could be on...)

   

So you need to drive the PSoC Device output "low" to turn off the LED,

   

and actively drive it high to be off.

   

 

   

regards,

   

Tom

0 Likes
Anonymous
Not applicable

I wish this forum had an "edit" button ....

   

 

   

Right, so if the PSOC device is Sourcing current, then anytime the PSoC device output is floating

   

(i.e pulled up internally), then the LED would be on (maybe not brightly, but it could be on...)

   

So you need to drive the PSoC Device output "low" to turn the LED to OFF,

   

and actively drive it "high" to turn the LED to ON.

   

 

   

regards,

   

Tom

0 Likes