Go Down

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

K8UR

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

robtillaart

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)

Gericom

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

sakugava

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