Minimal pulse length an Uno can generate (130ns)?

Using digitalWrite() is quite “slow”, takes more than 3µs on an Uno.

I found mentioning direct port manipulation in readonly forum, so posting here:

This sketch based on that posting triggers a minimal 0-pulse of 130ns pulse length every second:

#define dwon(port, pin) (port |= _BV(pin))
#define dwoff(port, pin) (port &= ~(_BV(pin)))

void setup() {
  pinMode(3, OUTPUT);
  digitalWrite(3, HIGH);
}

void loop() {
  delay(1000);
  dwoff(PORTD, 3);
  dwon(PORTD, 3);
}

One minute of 100Msps logic analyzer capture captures 60 of these pulses, shows majority being 120ns, and some 130ns long. 100Msps logic analyzer resolution is 10ns, so real pulse length is in that range:

I need very short falling edge and quick HIGH signal afterwards for testing 555 timer circuits. Monostable mode cannot generate shorter pulses than when signal is HIGH again. With R=20Ω and C=1pF pulse length would be 22 pico second, which cannot be measured with 100Msps logic analyzer. But with this port manipulation script R=20Ω and C=10nF resulting in 220 nano second will be measurable:
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=218576&p=1450578#p1450578

P.S:
Short pulse lengths are needed to make Raspberry v1 camera do 2MP global shutter videos that can currently be taken with Arducam ov5647 camera only because of the exposed FREX and STROBE pins there. This is scaled down 640x360 animation played at 5fps from 2MP 25fps global shutter video. It shows a propeller rotating with >26000rpm, with effective exposure time 13.42µs, with 46m/s or 155km/h on the blade outside:
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=235523#p1449873

P.P.S:
The 555 timer IC needs >4.5V, often in such a situation I go back to Arduino Uno with its 5V logic.

It’s 125ns - the 120 vs 130 is quantization error from the scope only sampling every 10ns.

You can cut it in half by doing

PIND=(1<<3);
PIND=(1<<3);

That is the shortest pulse that can ever be generated on a 16MHz chip (ie, 1/16,000,000th of a second)

Also, you should do:

byte oldSREG=SREG; //save the existing SREG value
cli(); //disable interrupts
PIND=(1<<3);
PIND=(1<<3);
SREG=oldSREG; //this will turn interrupts back on.

If you don’t disable interrupts, it’s possible that the millis() timer interrupt (or some other interrupt) will fire between those two lines, making that pulse much longer. Saving SREG and then restoring it is the “preferred” way to disable interrupts, as you don’t need to know if interrupts are already disabled. If you know you arent disabling interrupts anywhere else, you can skip the SREG stuff and just reenable interrupts with sei().

Thanks, this sketch works and halves the 0-puls width to 62.5ns.
My Uno seems to be a bit faster than 16MHz since minimal/maximal values reported are 50ns/62.5ns when sampled with 80Msps and 50ns/60ns when sampled with 100Msps:

void setup() {
  pinMode(3, OUTPUT);
  digitalWrite(3, HIGH);
}

void loop() {
  delay(1000);
  cli();
  PIND=(1<<3); 
  PIND=(1<<3); 
  sei();
}

What is nice with this new 0-pulse length of 62.5ns is, that TRIG is HIGH again before the OUT goes HIGH to start the output pulse:

Today I soldered a 555 timer circuit that allows very easily to play with different R/C pairs:
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=218576&p=1451020#p1451020

What I learned then is that down to 5µs pulse length all is fine (R=4.67KΩ, C=1nF: 5.135µs) and measured pulse length is roughly 1.1×R×C seconds, but below 5µs this formula does not reflect the measured values anymore.

You're reaching the limits of your 555. 5 µs pulse = 1 MHz, modern 555s are rated to reach 3 MHz, older models 100-500 kHz. Chck the data sheet of your 555 model on timing. The discharge current of your capacitor may be too high, depending on the RC values you chose. A typical limit here would be 10 mA. Switch times come in play: it may take 100 ns for the 555 to switch. That's becoming significant for shorter times and may mess up linearity. It's possible to create much shorter pulses using a simple RC circuit, triggering by the rising or falling edge signal of an Arduino output.