EmbeddedRelated.com
The 2026 Embedded Online Conference

Bit-Banged Async Serial Output And Disciplined Engineering

Steve BranamSteve Branam August 3, 2023

This post covers implementing asynchronous serial output directly on a GPIO with bit-banging. This can be a valuable debug tool for getting information out of a system. It also covers disciplined engineering, using the bit-banging module as an example and template you can apply to other projects.


Jumping from MCUs to FPGAs - 5 things you need to know

Duane BensonDuane Benson July 31, 2023

Are you a microcontroller expert beckoned by the siren song of the FPGA? Not long ago, that was me. FPGA-expert friends of mine regularly extolled the virtues of these mysterious components and I wanted in. When I made the leap, I found a world seemingly very familiar, but in reality, vastly different. I found that my years of C programming and microcontroller use often gave pre preconceived interpretations of FPGA resource material which resulted in eye-roll class mistakes in my code. I’ve gleaned five things of vital importance to help you make that transition faster than I did.


Assembly language is best - except when it isn’t

Colin WallsColin Walls July 27, 20231 comment

A look at why writing in C often produces more efficient code than hand-written assembly language.


C to C++: 5 Tips for Refactoring C Code into C++

Jacob BeningoJacob Beningo July 23, 20235 comments

The article titled "Simple Tips to Refactor C Code into C++: Improve Embedded Development" provides essential guidance for embedded developers transitioning from C to C++. The series covers fundamental details necessary for a seamless transition and emphasizes utilizing C++ as a better C rather than diving into complex language features. The article introduces five practical tips for refactoring C code into C++. Replace #define with constexpr and const: Discouraging the use of #define macros, the article advocates for safer alternatives like constexpr and const to improve type safety, debugging, namespaces, and compile-time computation. Use Namespaces: Demonstrating the benefits of organizing code into separate logical groupings through namespaces, the article explains how namespaces help avoid naming conflicts and improve code readability. Replace C-style Pointers with Smart Pointers and References: Emphasizing the significance of avoiding raw pointers, the article suggests replacing them with C++ smart pointers (unique_ptr, shared_ptr, weak_ptr) and using references


Why Should Unit Tests Feel Like Simulations?

Amar MahmutbegovicAmar Mahmutbegovic July 23, 2023

Treat unit tests as short simulations of your embedded system instead of fragile checks of implementation. By setting a known state, simulating inputs, and verifying outputs you test units of work and system behavior rather than how the code is written. This approach reduces brittle tests, lets you change implementations safely, and gives stronger confidence your device matches functional requirements.


Getting Started With Zephyr: Devicetrees

Mohammed BillooMohammed Billoo July 18, 20232 comments

This blog post provides an introduction to the "Devicetree", another unique concept in The Zephyr Project. We learn about the basic syntax of a device tree and how its structure and hierarchy mirror hardware, from the SoC to the final board. We also see how hardware described in a devicetree can be referenced and controlled in the source code of a Zephyr-based application.


NULL pointer protection with ARM Cortex-M MPU

Miro SamekMiro Samek July 16, 2023

This post explains how you can set up the ARM Cortex-M MPU (Memory Protection Unit) to protect thy code from dragons, demons, core dumps, and numberless other foul creatures awaiting thee after thou dereference the NULL pointer.


Call for Bloggers!

Stephane BoucherStephane Boucher July 12, 2023

Are you passionate about embedded systems? Do you have valuable insights, tips, or stories to share with the embedded community? Do you want to reach a large and engaged audience of embedded enthusiasts and professionals? We are currently looking at adding a few more inspired writers to our team of bloggers.


Bellegram, a wireless DIY doorbell that sends you a Telegram message

Sergio R CaprileSergio R Caprile July 9, 2023

A wireless button that uses the M5 STAMP PICO and Mongoose to send a Telegram message when pressed. The code is written in C


Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image

Alan C AssisAlan C Assis July 5, 2023

This hands-on guide peels back the NuttX source tree and shows how to assemble a tailored firmware image. You will learn what each top-level directory does, how to enable apps with menuconfig and search tricks to resolve dependencies, and how to save a defconfig as a reusable board profile so you can rebuild the same image without repeating configuration steps.


10 More (Obscure) Circuit Components You Should Know

Jason SachsJason Sachs February 5, 20121 comment

Jason Sachs follows up his earlier primer with ten more underused but practical parts that can simplify embedded hardware designs. From MOSFET-based ideal diode controllers that eliminate diode drops to TAOS light-to-frequency sensors that expand dynamic range, the post explains what each component does, when to choose it, and real-world tradeoffs learned from field use. Ideal for engineers looking to broaden their parts toolbox.


Homebrew CPUs: Messing around with a J1

Victor YurkovskyVictor Yurkovsky May 29, 2015

Victor Yurkovsky takes James Bowman's compact J1 stack CPU and starts hacking: he trims the ALU, replaces the barrel shifter with simpler shifts, and experiments with dual stacks and memory/IO feeding directly into the ALU. The article walks through small, practical changes that cut logic, add instructions, and boost timing on Spartan-6. It's a hands-on tour that shows how approachable homebrew CPUs can be.


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

Jason SachsJason Sachs October 10, 2014

Jason Sachs takes volatility out of the basement and into practical embedded programming. He shows why data that can change outside your thread of control breaks assumptions, how the volatile qualifier in C/C++ and Java affects compiler and CPU behavior, and when to prefer shadow registers, locks, or proper concurrency libraries instead of ad hoc volatile usage.


Finite State Machines (FSM) in Embedded Systems (Part 2) - Simple C++ State Machine Engine

Massimiliano PaganiMassimiliano Pagani March 14, 2024

When implementing state machines in your project it is an advantage to rely on a tried and tested state machine engine. This component is reused for every kind of application and helps the developer focus on the domain part of the software. In this article, the design process that turns a custom C++ code into a finite-state machine engine is fully described with motivations and tradeoffs for each iteration.


Dealing With Fixed Point Fractions

Mike Mike January 5, 20163 comments

Fixed-point fractional math is easy to botch, and this post lays out pragmatic ways to avoid those mistakes. It clarifies the difference between integer and fractional overflow, shows how Q notation helps track binary-point scaling, and explains why multiplies add sign bits that may require shifting. Read for concrete FPGA strategies: keeping bit growth, selective shifts, or aggressive normalization, plus testing tips.


Two jobs

Stephane BoucherStephane Boucher December 5, 201223 comments

Stephane Boucher explains why EmbeddedRelated went quiet for a few months after a volunteer project demanded more of his time. He and his wife organized a clown-gymnastics show with 15 kids, sold more than 700 of 800 tickets, and raised $2,700 for the Tree of Hope. Now the shows are done and he plans to resume regular posting with new site features.


Coding - Step 0: Setting Up a Development Environment

Stephen FriederichsStephen Friederichs November 25, 20145 comments

Stephen Friederichs walks through setting up a minimal C development environment without an IDE, focusing on Windows. He explains why learning command-line toolchains matters, recommends GCC and Make as a durable base, and gives step-by-step MinGW installation and PATH configuration plus editor suggestions. The guide gets you compiling with mingw32-make and gcc so you can move on to makefiles and project structure.


How Embedded Linux is used in Spacecrafts !

George EmadGeorge Emad February 1, 20246 comments

This article dives into the application of Linux in spacecraft, examining the challenges it poses and proposing potential solutions. Real-life examples will be discussed, while also addressing the drawbacks of employing Linux in safety-critical missions.


Fluxions for Fun and Profit: Euler, Trapezoidal, Verlet, or Runge-Kutta?

Jason SachsJason Sachs September 30, 20132 comments

Which ODE solver should you pick for resource‑constrained embedded simulations? Jason Sachs walks through practical numerical methods — Euler, trapezoidal, midpoint, 4th‑order Runge‑Kutta, semi‑implicit Euler, Verlet and the Forest–Ruth symplectic scheme — using hands‑on examples (damped bead, Kepler orbit, pendulum). He highlights accuracy vs. function‑evaluation cost, timestep guidance, and why symplectic methods beat general solvers for long‑term energy conservation.


Lost Secrets of the H-Bridge, Part II: Ripple Current in the DC Link Capacitor

Jason SachsJason Sachs July 28, 2013

DC link capacitor ripple often determines capacitor life, yet the H-bridge waveform has a lot more structure than you might expect. Jason Sachs separates capacitor current into ramp and pulse components, derives closed-form peak and RMS expressions for edge and center PWM, and shows harmonic amplitudes. The post includes Python simulation so you can visualize the waveforms and apply the formulas to capacitor selection and EMI analysis.


The 2026 Embedded Online Conference