Arduino enthusiast Udo Klein was pondering how fast one could toggle an Arduino digital pin, and has documented the theory and demonstration code from his experiments. Instead of digitalWrite(), Udo has used port manipulation which saves time due to the bloated nature of the former function with respect to the original code. This is a prelude to main goal of determining how fast an Arduino could count 20-bit numbers without using external hardware. This has also been demonstrated by counting with Gray code and shown using the following LED shield:
For more information, code and notes visit Udo's site here. For more tutorials about Arduino port manipulation, visit here. And we're on twitter, so follow us for news and product updates as well.