The Ternary Operator Revisited

Several years ago, I wrote a blog post entitled Ternary Operator vs. if/else, which was supposed to be an interesting comparison between the two, except that I totally botched it! The premise is that the ternary operator and if/else statements should compile into identical, so why not just use if/else statements to make the code … Continue reading The Ternary Operator Revisited

3 Tips for Speeding Up Interrupt Handlers

Embedded software developers today are a bit spoiled. Many microcontrollers come with an ecosystem that includes peripheral drivers, an RTOS, middleware and even example application code. Many developers can spend most of their time in high-level application code, ignoring the software that meets the hardware. The problem is that while this prebuilt ecosystem can accelerate … Continue reading 3 Tips for Speeding Up Interrupt Handlers

There is No Hardware

My favorite line from the Matrix is that “there is no spoon”, and today that is a wise statement for embedded software developers to take to heart. Embedded software developers traditionally are hardware centric, believing that they can’t move forward without the hardware (sometimes this is true). Much like Neo, developers need to accept that … Continue reading There is No Hardware

7 Steps to Create a Reusable Debounce Algorithm

A quick google search reveals that there are over 212,000 websites that examine how to debounce a button.  After examining a number of them it is obvious that these implementations are not meant for reuse.  The implementations and strategies often lack scalability, the ability to debounce multiple buttons easily and portability.  They are tightly coupled … Continue reading 7 Steps to Create a Reusable Debounce Algorithm