AnsweredAssumed Answered

Checking Pin State

Question asked by Ray Hall on Apr 8, 2015
Latest reply on Apr 9, 2015 by Martin35804

How do I check if a input pin (PAD07) is low or high. I have a 10k pullup on the pin. This is what I have tried,

 

unsigned char pinstate;

 

pinstate = PT0AD0;

 

and

 

pinstate = PT0AD0 & 0x80;

 

and

 

pinstate = PT0AD0_PT0AD07;

 

and

 

pinstate = PT0AD0 & PT0AD0_PT0AD07;

 

 

None of them give me a value that makes sense.

 

Ray.

Outcomes