Digital read sampling rate help

Hi There,

Just a quick question, does anyone know what the digital read sampling rate is for the arduino uno?

Thanks in advance!!

It is about 4uS.
If that is too long for you then use direct port addressing, it comes down to about four clock cycles.

You could just test it. Something simple like this (divide your answer by 8 )

void setup()
{
Serial.begin(9600);

unsigned long start=micros();
digitalRead(1);
digitalRead(2);
digitalRead(3);
digitalRead(4);
digitalRead(5);
digitalRead(6);
digitalRead(7);
digitalRead(8);
unsigned long end=micros();
Serial.println(end-start);
}

void loop(){}

Thats great thanks for all the replies!! most helpful :slight_smile: