Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 5, 3 & 1 Forum Discussions

Not applicable



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







1 Reply
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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.