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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: