When I’m teaching “C Programming for Embedded Systems”, I’m often asked whether the ternary operator should be used or an if/else statement. Hidden behind the question is really the need to know whether the ternary operator is more efficient than if/else. One might think that compilers today would generate identical code. Let’s take a quick … Continue reading Ternary Operator versus the if/else statement …
Tag: optimization
Tools – Optimizing Firmware using DRT
Embedded software development is usually performed under severe resource constraints not only from a business stand-point but from the microcontroller as well. Upgrading to a higher end processor may result in a project that is not financially feasible especially for high volume applications where every penny can make difference. I’ve recently been playing with a … Continue reading Tools – Optimizing Firmware using DRT
Embedded Basics – Linear Dynamic Current
When it comes time to start optimizing an embedded device for energy consumption it is often really tempting to start out by adjusting the operating voltage of the system. If an engineer were to look back in his notes on MCU power consumption they would find something along the lines of Power = Constant * … Continue reading Embedded Basics – Linear Dynamic Current