Hi,
I am trying to read PORTDat once rather then reading pin bu pin. How Do I do that ? I see couple of examples referring to use DDRD to setup PORTD direction. But which library should I use here that has all registry declarations for Arduino Due process ?
My application runs with single pin readouts but I want to use the ReadPOrt to get right efficiency.
Thanks,
Pubudu
In Uno, it would be
byte variableName = PORTD;
Perhaps Due is similar.
Or perhaps you would be better served if you first searched in the section for the DUE, where I know this has been discussed already, rather than in this section which really has nothing to do with your question.
Paul
This is how it works for Due :
int A = REG_PIOD_PDSR; (PORTD does not work for due, it works for Mega)