- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I want to know how to assign ,port pin as input pin
I know about assigning as output ,
for this in pin out section ,i am renaming the port pin which i wanted to make as output ,then make it drive strong
and in program file i can do below code for using it
#define RL1_Off RL1_Data_ADDR &= ~RL1_MASK ,for making port pin low
#define RL1_On RL1_Data_ADDR |= RL1_MASK ,for making port pin high
in the same way i want to make port pin as input pin ,for this make it drive High Z ,i have read making port pin High Z it can be used as input
but at code side how to access it ,or check with the port pin name assigned by us whether it is high or low
I am using PSoc5.4 design and cy8c22545
regards
Habib
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In PSoC1 the current port state register can be red with PRTnDR where "n" is the port number. You will have to mask and shift to get the required pin value.
Bob