Dear all, thanks for replying!
@Theremingenieur Yeap, i did not know loop() had such an overhead ...
Using registers is always faster, sure, but I recall Paul saying digitalWriteFast() could be as Fast as ~50 Mhz
(
https://forum.pjrc.com/threads/24573...with-Teensy3-0), if pin numbers are constants,
This is the speed of register access, so i prefer using digitalWriteFast() for more readable code.
So, Frank B's, 3 Mhz (not using toggling register, but just digitalWriteFast() & digitalReadFast()), still seems a bit slow to me...
So, if digitalWriteFast() is so fast (up to 50 Mhz), perhaps digitalReadFast() is a bit slower ? (causing a performance drop to 3Mhz?)
thanks in advance