How fast can I turn ON/OFF an Arduino port? I need short pulses..

So, Arduino nerds - Who actually knows this answer? Does anyone have an Arduino chart of Instructions vs. Clock Cycles? Per Arduino type?

I'm guessing the Due has the fastest clock (48 Mc) and perhaps the ability to turn on/off ports the fastest. Question: Would that take 1,2,3 or 4 cycles?

Anybody know?

Tks, Mitch

don't know the answer, but what is your goal? what frequency do you need?

The maximum frequency is 21MHz. When going higher (using dma), the signal gets misformed.

If you use the digitalWrite() function with 16MHz clock, the max freq is 142 KHz. Using a macro like #define SET(x,y) (x|=(1<<y)) or #define CLR(x,y) (x&=(~(1<<y))) you can reach 4 MHZ!!.
Read more: at Bill PorterĀ“s site