Hi,
I'm trying to use the below line of code to test the input bits of port B. The first line works correctly, however I would like to use the second equivalent line to make it easy to read my code. What have I done incorrectly in the second line?
if( (P2IN & 0x2c)!=0 && (P2IN & BIT4)==0)
if( (P2IN & BIT2+BIT3+BIT5)!=0 && (P2IN & BIT4)==0)
Thanks in advance
Clueless