2 Replies Latest reply on Mar 30, 2017 6:32 AM by Sampath Selvaraj

    multiple use of GPIO




      i want to implement two task on same pin like 8 pin which are use for a,b,c,d,e,f,g,dp of seven segment and also use for digital input of 8 pushbutton.


      how can i implement it in psoc-1???

        • 1. Re: multiple use of GPIO

          Psoc 1 is old and not supported any longer.  My I suggest that you use the CY8CKIT-059 Psoc 5LP or the CY8CKIT-043 PSOC® 4 M-SERIES PROTOTYPING KIT. Both of these are current designs and are priced at $10.00 US.  Then you should be able to do what you want with the same GPIO pins. Just make the Pin Bidirectional and it should do what you need. 

          • 2. Re: multiple use of GPIO
            Sampath Selvaraj

            Hello Chirag,




            I understand that you want to change the PSOC GPIO pin from being an output pin to drive LED, to being an input pin to sense push buttons. You can do this by setting the port's drive mode register.




            You should refer to the PSoC1 Technical Reference Manual.




            Drive mode has three bits. So each port has three registers to control the GPIO mode for each of its eight lines. SO you will have PRT0DM0, PRT0DM1 and PRT0DM2. For an output DM[2:0] should be 001 and for input DM[2:0] should be 010. For further information, you can do a text search in the Technical Reference Manual for "Drive Mode".