cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

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

0 Likes
Reply
1 Reply
Esteemed Contributor II

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

0 Likes
Reply