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;
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.