Change pin direction on CY8CKIT-001 - Cypress.com Forums http://www.cypress.com/? Re: Change pin direction on CY8CKIT-001 http://www.cypress.com/?rID=47151  Thanks for your replies.

 

I tried changing the drive mode, but it did not work. But you guys did point me in the right direction...

 

I found the bidirectional mode enable bit. I enabled bidirectional mode and it worked! The PSoC now releases the pin when I enable the bidirectional mode so that I can read the input value. To enable output mode again, I just disable bidirectional mode.

 

Even though this works for me, is this the correct way of handling this?

]]>
Wed, 24 Nov 2010 01:14:00 -0600
Re: Change pin direction on CY8CKIT-001 http://www.cypress.com/?rID=47083 I just made a change in my code to dynamically change a port pin from connecting a digital PSoC block output to CPU data register (PRTxDR). This is simply by setting the bypass bit of the associated pin to zero.

 

PRT4GS &= 0xAF;                            // clear P4.4 and P4.6 bypass bit
PRT4DR |= 0x50;                            // P4.4 and P4.6 = 1

]]>
Mon, 22 Nov 2010 21:56:21 -0600
Re: Change pin direction on CY8CKIT-001 http://www.cypress.com/?rID=47077 You can change the direction of a port pin by setting the PRTxDM registers. Bidirection mode of a pin is probably your choice.

]]>
Mon, 22 Nov 2010 15:46:50 -0600