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.
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
BTW: this is the forum for PSoC 5, not for Designer 5. Next time your question would fit better into the PSoC1 forum.
Bob
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?
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
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.