Pin configuration

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

cross mob
Anonymous
Not applicable

Can anyone help me to configure a pin as digital output in PSoC 5.4? I need to set up the register. When I first run the program, the output must be "1" and then when I press a key it goes to "0". I've tried to set up the pin using the chip editor, but its not working properly.

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Set the pin as "STD CPU" in chip editor. Then you can set the port by writing into the port data register as

   

PRTxDR = Mask;

   

where "x" is the port number and Mask specifies the bit within the port. As you see, you may set more than one bit at the time. To reset the port bit(s) use

   

PRTxDR = ~Mask;

   

 

   

Happy coding

   

Bob

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

BTW: this is the forum for PSoC 5, not for Designer 5. Next time your question would fit better into the PSoC1 forum.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 Thank you for your answer.

   

Just one more question: I did not understand why I should go to PSoc1 Forum. Could you explain me the difference from this one?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

There is the PSoC 1 and it can be designed and programmed with PSoC Designer 5.4

   

There are PSoC 3, 4 and 5 and they need to be designed with PSoC Creator 3.0

   

For each PSoC family there is a different forum, since there are differences between them and not everybody here knoes how to handle such a device. I, for instance, do not look into the USB-controller forum because I have no experience with those.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

PSOC 1 has an M8C code

   

PSOC 3 8051 core

   

PSOC 4 M0 ARM

   

PSOC 5LP M3 ARM

   

 

   

A useful ap note on GPIO -

   

 

   

    

   

          http://www.cypress.com/?rID=2900

   

 

   

Regards, Dana.

0 Likes