Dear Sir/Madam,
I wonder which is the fastest way to read I/O pin status in arduino board. I know that "PORTX" can set HIGH/LOW on I/O pin faster than "digitalWrite()", so I want to know which is the fastest method to read the I/O pin status?
If i need to read the D6 pin status, the following methods which method is faster? or maybe say in other way is that do "bitRead()" consume lots of time?
Method 1:
byte val = PIND;
val = val & B01000000;
Method 2:
byte val = PIND;
boolean pin_6 = bitRead(val,6);
Thank you very much!!!
Best,
Wave