Go Down

Topic: Arduino Due digital read speed (Read 1 time) previous topic - next topic

FingerBuckley

Hey guys,

I just bought an Arudino Due because I wanted the higher performance.  I was wondering though, is the Due capable of reading digital inputs at 15MHz?  I figure with a clock speed of 84MHz, it's gotta be able to read digital inputs at some respectable fraction of that.  I've tried looking for this information in the Arduino pages but didn't find anything that clearly answered this question

Thanks for reading

Gericom


Hey guys,

I just bought an Arudino Due because I wanted the higher performance.  I was wondering though, is the Due capable of reading digital inputs at 15MHz?  I figure with a clock speed of 84MHz, it's gotta be able to read digital inputs at some respectable fraction of that.  I've tried looking for this information in the Arduino pages but didn't find anything that clearly answered this question

Thanks for reading


It should be possible. But I think you'll have to use a bit of assembly for it. And it is not possible to time it correctly. You can also use DMA, but that is probably too fast.
Subscribe my youtube channel: http://www.youtube.com/user/MKDS3

FingerBuckley

I see.  Do you know what the minimum time between digital reads would be then, without having to use assembly?  As in, could I read the same digital input pin at 3MHz?  15MHz is probably a pipe dream considering all the other processes the arduino must handle

Measureino

#3
Jul 03, 2014, 08:05 am Last Edit: Jul 03, 2014, 08:10 am by Measureino Reason: 1
Hi,
take a look at my solution at http://forum.arduino.cc/index.php?PHPSESSID=aj4qa33h62ub4vcbkie2qef1t1&topic=247158.0.(Reply #9).

There's a schemata for input and output within about 0.4 ┬Ás. Surely you can make it a little bit faster. And instead of 8 Bit size you can - with some limitations - use 16 ore more bits without significant longer time because the bus has a size of 4 bytes.
Tom

Gericom


I see.  Do you know what the minimum time between digital reads would be then, without having to use assembly?  As in, could I read the same digital input pin at 3MHz?  15MHz is probably a pipe dream considering all the other processes the arduino must handle

As far as I know should the pio be able to read at 21MHz max. The problem is that you can try to read the inputs as fast as possible, but you can't control the speed. That's a big problem. DMA had been great if you could control it's speed.

You can use noInterrupts(); to disable interrupts. You need to use loop unrolling and assembly if you want to go that fast using the cpu. The DMA is (depending on the channel used) probably somewhere between 84 and 21 MHz or something. But I am nit sure.
Subscribe my youtube channel: http://www.youtube.com/user/MKDS3

Go Up