i'd really like something like delayNanoseconds, we are working with powerfull processors and in this cases a few nanoseconds make the differents!
Quotei'd really like something like delayNanoseconds, we are working with powerfull processors and in this cases a few nanoseconds make the differents!I've seen posted at time when there is a need for a shortest possible 'delay' in a AVR sketch to just insert a assembly language NOP statement which gives you a 62.5 nsec delay for each NOP on a standard arduino board. I would assume something similar could be done in a Due sketch.Lefty
asm volatile ("nop \n\t "); // a NOPasm volatile (".rept 10\n\t nop \n\t .endr\n\t"); // 10 NOPs - you can change the 10 for anything reasonably small#define MNOP(x) asm volatile (" .rept " #x "\n\t nop \n\t .endr \n\t") // A macro I use a lot MNOP(20); // 20 NOPs
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16