parallel digital read

Hi - been digging around but can't find an answer on this...

I would like to read two (or more) digital inputs in a single operation, such that I get 00,01,10 or 11 returned. I can do this with two digitalReads of course, but the data I'm sampling is super high frequency and I really need to be doing it in one operation. Any ideas?

Cheers, thanks a lot,
Dave

Arduino Reference - Arduino Reference :slight_smile:

You can use wiring API.

http://www.wiring.org.co/learning/reference/portRead_.html

You can use wiring API.

unfortunately not, portRead is not implemented on Arduino. Using direct port io is the way to read two (or more) digital inputs in a single operation on arduino.