Go Down

Topic: How fast can I turn ON/OFF an Arduino port? I need short pulses.. (Read 693 times) previous topic - next topic


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?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


The maximum frequency is 21MHz. When going higher (using dma), the signal gets misformed.
Subscribe my youtube channel: http://www.youtube.com/user/MKDS3


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

Go Up