Coding - Step 0: Setting Up a Development Environment

Stephen Friederichs November 25, 20145 comments

Articles in this series:

You can easily find a million articles out there discussing compiler nuances, weighing the pros and cons of various data structures or discussing the  optimization of databases. Those sorts of articles are fascinating reads for advanced programmers but...

Important Programming Concepts (Even on Embedded Systems) Part IV: Singletons

Jason Sachs November 11, 20142 comments

Other articles in this series:

Today’s topic is the singleton. This article is unique (pun intended) in that unlike the others in this series, I tried to figure out a word to use that would be a positive concept to encourage, as an alternative to singletons, but

The CRC Wild Goose Chase: PPP Does What?!?!?!

Jason Sachs October 23, 20142 comments

I got a bad feeling yesterday when I had to include reference information about a 16-bit CRC in a serial protocol document I was writing. And I knew it wasn’t going to end well.

The last time I looked into CRC algorithms was about five years ago. And the time before that… sometime back in 2004 or 2005? It seems like it comes up periodically, like the seventeen-year locust or sunspots or El Niño,...

Important Programming Concepts (Even on Embedded Systems) Part III: Volatility

Jason Sachs October 10, 2014

1vol·a·tile adjective \ˈvä-lə-təl, especially British -ˌtī(-ə)l\ : likely to change in a very sudden or extreme way : having or showing extreme or sudden changes of emotion : likely to become dangerous or out of control

Merriam-Webster Online Dictionary

Other articles in this series:

You Will Make Mistakes

Jason Sachs September 28, 20141 comment
</scorpion>: FAIL

Anyone out there see the TV pilot of Scorpion? Genius hacker squad meets Homeland Security in a fast-paced thriller to save hundreds of airplanes from crashing after LAX air traffic control software upgrade fails and they didn’t save a backup of the old version (ZOMG!!!) so thousands of people are going to die because the planes… well, they just can’t land! They just can’t. Even if the weather is sunny and calm and there could quite possibly...

Introduction to Microcontrollers - Ada - 7 Segments and Catching Errors

Mike Silva September 22, 20145 comments

7 Segments the Ada Way

Here is the Ada version (I should say AN Ada version) of the 7 segment multiplexing code presented in the last installment.  The hardware now is the STM32F407 Discover board, which is a Cortex M4F board.  There are lots of differences in GPIO and timer setup, but if you understoold the previous code in C you should not have much trouble understanding this code in Ada.

As interesting as the Ada approach to the task is the Ada ability to detect...

Important Programming Concepts (Even on Embedded Systems) Part II: Immutability

Jason Sachs September 14, 20141 comment

Other articles in this series:

This article will discuss immutability, and some of its variations in the topic of functional programming.

There are a whole series of benefits to using program variables that… well, that aren’t actually variable, but instead are immutable. The impact of...

Important Programming Concepts (Even on Embedded Systems) Part I: Idempotence

Jason Sachs August 26, 20146 comments

There are literally hundreds, if not thousands, of subtle concepts that contribute to high quality software design. Many of them are well-known, and can be found in books or the Internet. I’m going to highlight a few of the ones I think are important and often overlooked.

But first let’s start with a short diversion. I’m going to make a bold statement: unless you’re a novice, there’s at least one thing in computer programming about which you’ve picked up...

Project Directory Organization

Stephen Friederichs August 20, 20142 comments

A recent question on Reddit’s C Programming sub asked what sort of directory structure people use for their projects. Perhaps not unsurprisingly this didn’t elicit a flood of answers - maybe there are no organizational schemes that people are happy with or perhaps few people consider it a glamorous topic (not that the C Programming subreddit is filled with glamorous people -no offense I love you all). Personally I find it to be a very interesting topic. Organization and process are...

OOKLONE: a cheap RF 433.92MHz OOK frame cloner

Fabien Le Mentec August 12, 201417 comments

A few weeks ago, I bought a set of cheap wireless outlets and reimplemented the protocol for further inclusion in a domotics platform. I wrote a post about it here:


Following that, I had access to another outlet from a different vendor:

The device documentation mentions that it operates on the same frequency as the previous...

Get your microcontroller and PC to talk

Jayaraman Kiruthi Vasan August 15, 20115 comments

(and get it done free ‘n’ easy!)


The Need

Specifications can dynamically change during the product development cycle. Bosses/clients suddenly approach us with additional requirements, which, however simple, can put us in a fix.  One such requirement could be to have a PC based design interface for a standalone microcontroller project.

On many occasions, the required PC software has to just behave like a slave...

Coding Step 4 - Design

Stephen Friederichs November 24, 2015

Articles in this series:

The last article in this series discussed how to write functional high-level requirements: specifications for what your software is supposed to do. Software design is the other side of the coin....

Embedded Toolbox: Windows GUI Prototyping Toolkit

Miro Samek July 7, 20172 comments

In this installment of my "Embedded Toolbox" series, I would like to interest you in the free Windows GUI Toolkit called QWin for prototyping, developing and debugging embedded C or C++ code on Windows.

If you work on devices with non-trivial user interfaces consisting of LCDs (segmented or graphic), buttons, LEDs, etc., QWin could be just the tool for you. It has improved my productivity in such projects dramatically. I personally consider it a gem in my "Embedded...

UML Statechart tip: Handling errors when entering a state

Matthew Eshleman March 8, 20204 comments

This is my second post with advice and tips on designing software with UML statecharts. My first entry is here.

It has been nearly 20 years since I first studied UML statecharts. Since that initial exposure (thank you Samek!), I have applied event driven active object statechart designs to numerous projects [3]. Nothing has abated my preference for this pattern in my firmware and embedded software projects. Through the years I have taken note of a handful of common challenges when...

Embedded Programming Video Course Teaches RTOS

Miro Samek January 20, 2019

If you'd like to understand how a Real-Time Operating System (RTOS) really works, here is a free video course for you:

RTOS part-1: In this first lesson on RTOS you will see how to extend the foreground/background architecture from the previous lesson, so that you can have multiple background loops running seemingly simultaneously.:

RTOS part-2: In this second lesson on RTOS you will see how to automate the context switch process. Specifically, in this lesson, you will start building...

Tenderfoot: Recommended Reading

Matthew Eshleman June 28, 20171 comment

Twenty years ago I read Code Complete by Steve McConnell. And then read it again. And again. And again. Of all the books I have read during my career, I believe this was the book that catapulted me from a young electrical engineer to a young and aspiring embedded software engineer. So to all the ‘tenderfoots’ embarking upon an embedded systems and especially embedded software and firmware career, this entry is for you.

First, I would certainly recommend that all engineers read and read...

Deeply embedded design example - Logic replacement

Gene Breniman July 9, 2011

I have always believed that some of the low-cost, low-pin count, low-resource microprocessors would make an excellent choice for the replacement of discrete logic components.  In these cases the deeply embedded microprocessor would become less of a general purpose computer and more of a logic replacement, providing a prescribed function with no connection to the outside world.  In a world of bigger, faster and more expensive, it is a pleasant change of pace...

Introduction to Deep Insight Analysis for RTOS Based Applications

Jacob Beningo September 20, 20171 comment

Over the past several years, embedded systems have become extremely complex. As systems become more complex, they become harder and more time consuming to debug. It isn’t uncommon for development teams to spend more than 40% development cycle time just debugging their systems. This is where deep insight analysis has the potential to dramatically decrease costs and time to market.

Defining Deep Insight Analysis

Deep insight analysis is a set of tools and techniques that can be...

Cutting Through the Confusion with ARM Cortex-M Interrupt Priorities

Miro Samek February 26, 2016

The insanely popular ARM Cortex-M processor offers very versatile interrupt priority management, but unfortunately, the multiple priority numbering conventions used in managing the interrupt priorities are often counter-intuitive, inconsistent, and confusing, which can lead to bugs. In this post I attempt to explain the subject and cut through the confusion.

The Inverse Relationship Between Priority Numbers and Urgency of the Interrupts

The most important fact to know is that ARM...