Reduce pulse length

Hi I'm working on a project where I generate pulses using digitalwrite(HIGH/LOW) and the pulse width is 4us.

How can I decrease this pulse time?

Using a ESP32, use the HRT (high resolution timer) timer. The ESP32 can do a 12.5 nano second pulse width.

4 usec is the highest resolution of the Uno/Mega AVR boards.

https://roboticsbackend.com/arduino-fast-digitalwrite/

1 Like

Use direct port mapping. That way is as quick as you can get.

1 Like

How short do you need?

A hardware solution would be an edge-triggered one-shot.

Decrease it to what?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.