- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
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???
Solved! Go to Solution.
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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".