July 23, 2012

How fast can you toggle an Arduino I/O pin?

 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. 

When creating projects with external circuitry to work with your project - consider our range of ProtoShields. From the tiny LeoStick to the Mega range, we offer a complete range for you to work with



Leave a comment

Comments have to be approved before showing up.