You are here

How to assign INput key | Cypress Semiconductor

How to assign INput key

Summary: 1 Reply, Latest post by Bob Marlowe on 16 Dec 2015 05:18 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
Habib_EPI's picture
14 posts


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




user_1377889's picture
9307 posts

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.



Log in to post new comments.