The techniques described are designed to simplify multi-tasking firmware design using interleaved state machines. While the concepts are simple, it does requires a shift in perspective. The added complexity of developing two or more state machines and making them work together should not be underestimated. However if used carefully and methodically, it is possible to create firmware that is modular, reusable, small, fast to develop, easy to test, and capable of multi-tasking.