Timing of various functions on ATMEGA 328P chip (Arduino Uno, Arduino Nano, etc) [stub]

Robin2:
Please post the program you used to produce your results and explain how you use the 'scope to do the measurements

I would be interested to see the results for digitalWriteFast() and digitalReadFast() from the digitalWriteFast library

...R

To test digitalWriteFast()

Executed the following code:

"
#include <digitalWriteFast.h>

#define PIN 12

void setup()
{
volatile byte pin;
pinModeFast(PIN, INPUT);
pinModeFast(PIN, OUTPUT);
digitalWriteFast(PIN, LOW);
digitalWriteFast(PIN, HIGH);
pin = digitalReadFast(PIN); // save a proper high/low value
}

void loop()
{
digitalWriteFast(PIN, HIGH);
digitalWriteFast(PIN, LOW);
}
"

And results are, wow it is WAY faster than a digitalWrite()

~504nS

I've attached a screenshot of the scope reading; I got a different scope yesterday which I am trying out today and so this is not taken on the TekTronix but is instead a Siglent SDS1104X-E; I double-checked for sanity that the digitalWrite(); function was still ~4.1uS as discovered previously.

digitalWriteFast.png