Is there a preferred method to check and process Digital input pins?
I have to check 4 pins, 3 on PORTE one on PORTD. All pins start at high and I scan for a low. the pins are connected to switches rather than button and I know I still have to de-bounce.
if ((PINE & 0x10)==0) //switch 1 { // do something } if ((PINE & 0x20)==0) //switch 2 { // do something } if ((PINE & 0x40)==0) //switch 3 { // do something }
at present I check each pin individually but presume there is a better/faster method.
So far I have managed but wonder if there is a preferred way to check the port pins for changes?
Nigel