Tasks: A Time-Triggered Scheduler for Arduino

This has been a long time coming. A few years ago (back in 2012!) I wrote a basic TT scheduler which was really more of a ‘proof of concept’ and not really friendly for an everyday Arduino user. It relied on a strong knowledge of C or C++ and needed Eclipse with an Arduino plugin to get it to work. I’ve promised myself since then that I’d  write a proper Arduino library to demonstrate time-triggered scheduling to Arduino IDE users as well as learning some C++ skills for myself. Continue reading


Accurate timing for smaller embedded projects


Previously, I have talked about high-precision, multi-task execution on an arduino / AVR based microcontroller.

But what if you don’t need a scheduler? What if you’re only doing one thing, and all of your functionality can easily be fit into a tick period of 5 or 10 ms, but you still want the timing precision to say “These operations will be executed every x ms, and take no longer than x microseconds”. Of course, on a reasonable-sized micro, you could use a TTC scheduler such as the one described in my previous posts, and only have one task, but what if you can’t afford the additional overhead of running the scheduler. If your project calls for a small 8-bit, 8 MHz micro such as the Microchip PIC12F family, you’re limited in both the code space, and processing power. You need to completely strip down the time-triggered philosophy to its bare bones Continue reading