What is Pulse Width Modulation and How Does It Work?
Pulse Width Modulation (PWM) is a technique used to control the average voltage supplied to a device or component by adjusting the width of a series of pulses. It works by rapidly turning a signal on and off at a specific frequency. The crucial element of PWM is the duty cycle, which represents the percentage of time the signal is “on” (high voltage) compared to the total time of one cycle.
Getting Started With Zephyr: Saving Data To Files
In this blog post, I show how to implement a Zephyr application to mount a microSD card, create a new file on the microSD card, and write data to it. The lessons learned from such an application can be helpful for devices out in the field that need to write data to off-board memory periodically, especially in cases where Internet access may be sporadic.
Elliptic Curve Cryptography - Extension Fields
An introduction to the pairing of points on elliptic curves. Point pairing normally requires curves over an extension field because the structure of an elliptic curve has two independent sets of points if it is large enough. The rules of pairings are described in a general way to show they can be useful for verification purposes.
Software is free and can right any wrong
Software changes are so much easier than hardware modifications, so the temptation is always to take this approach to fixing bugs. This may not always be a good idea.
Modern C++ in embedded development: Static Classes
Static classes give embedded C++ developers a clear way to group module functions while preventing accidental instantiation. This post shows how to implement C#-style static classes in C++ by deleting the default constructor, then use templates and C++20 concepts to make firmware business logic platform independent and type safe. It also covers testability techniques, including mock wrappers for unavoidable static state.
Creating a Hardware Abstraction Layer (HAL) in C
In my last post, C to C++: Using Abstract Interfaces to Create Hardware Abstraction Layers (HAL), I discussed how vital hardware abstraction layers are and how to use a C++ abstract interface to create them. You may be thinking, that’s great for C++, but I work in C! How do I create a HAL that can easily swap in and out different drivers? In today’s post, I will walk through exactly how to do that while using the I2C bus as an example.
Elliptic Curve Cryptography - Key Exchange and Signatures
Elliptic curve mathematics over finite fields helps solve the problem of exchanging secret keys for encrypted messages as well as proving a specific person signed a particular document. This article goes over simple algorithms for key exchange and digital signature using elliptic curve mathematics. These methods are the essence of elliptic curve cryptography (ECC) used in applications such as SSH, TLS and HTTPS.
What does it mean to be 'Turing complete'?
The term "Turing complete" describes all computers and even some things we don't expect to be as powerful as a typical computer. In this article, I describe what it means and discuss the implications of Turing completeness on projects that need just a little more power, on alternative processor designs, and even security.
Elliptic Curve Cryptography - Security Considerations
The security of elliptic curve cryptography is determined by the elliptic curve discrete log problem. This article explains what that means. A comparison with real number logarithm and modular arithmetic gives context for why it is called a log problem.
Handling Translations in an Embedded Project
A brief walkthrough on how to handle human language translations in a low level C application. Some options are listed, each with advantages and disadvantages laid out.
BusyBox; The Swiss Army Knife of Embedded Linux
In this article we cover the BusyBox, how it's designed to be optimized for embedded targets, and how to configure and build it in different ways, we also covered the license and limitation, which led to the development of ToyBox, I hope you enjoyed the article, please leave a comment for any correction or suggestions.
Project Directory Organization
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...
You Don't Need an RTOS (Part 2)
In this second article, we'll tweak the simple superloop in three critical ways that will improve it's worst-case response time (WCRT) to be nearly as good as a preemptive RTOS ("real-time operating system"). We'll do this by adding task priorities, interrupts, and finite state machines. Additionally, we'll discuss how to incorporate a sleep mode when there's no work to be done and I'll also share with you a different variation on the superloop that can help schedule even the toughest of task sets.
Getting Started With Zephyr: Devicetree Overlays
In this blog post, I show how the Devicetree overlay is a valuable construct in The Zephyr Project RTOS. Overlays allow embedded software engineers to override the default pin configuration specified in Zephyr for a particular board. In this blog post, I use I2C as an example. Specifically, I showed the default I2C pins used for the nRF52840 development kit in the nominal Zephyr Devicetree. Then, I demonstrated how an overlay can be used to override this pin configuration and the final result.
Examining The Stack For Fun And Profit
Stack bloat can hide in short initialization paths, and this post walks through finding it with hands-on debugging. The author builds a tiny test program and uses gdb plus custom stack-helper scripts to scan, watch, and walk the stack. That process reveals getaddrinfo pulling in glibc DNS code that allocates large local buffers and uses alloca and PLT resolution, consuming roughly 11KB of stack.
Cutting Through the Confusion with ARM Cortex-M Interrupt Priorities
ARM Cortex-M interrupt priorities are famously confusing because numeric priority values are inverted relative to urgency and several different conventions coexist. This post cuts through the mess by explaining NVIC register bit placement, the CMSIS NVIC_SetPriority convention, preempt versus subpriority grouping, and when to use PRIMASK or BASEPRI. Read on for practical rules to avoid subtle priority bugs in real-time firmware.
Supply Chain Games: What Have We Learned From the Great Semiconductor Shortage of 2021? (Part 4)
The chip shortage didn't end with 2021, it moved into older process nodes where cars and industrial gear live. In this installment Jason Sachs explains why mature-node and trailing-edge capacity remain tightly constrained, how NCNR commitments and price increases are reshaping supplier behavior, and what companies like NXP and Microchip are doing to cope. He warns the imbalance could take multiple semiconductor cycles to fix.
From Baremetal to RTOS: A review of scheduling techniques
Jacob Beningo walks through five common embedded scheduling techniques, showing how each scales from a single super loop to a full RTOS. He highlights practical trade-offs for round-robin, interrupt-driven, queued, cooperative, and RTOS approaches so you can spot when timing becomes fragile and when added complexity is justified. This primer sets up the next post on when to adopt an RTOS.
Simulating Your Embedded Project on Your Computer (Part 2)
Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In the last article, I showed you how to use the terminal (i.e. printf/getchar) to easily make a completely functional simulation. In this article, we'll take simulation to the next level, either in terms of realism (by using virtual hardware) or in terms of user experience (by using a GUI to simulate our hardware, instead of using the terminal).
Introduction to Microcontrollers - Timers
Time is everything in embedded systems, and Mike Silva walks through how microcontroller timers turn clock pulses into dependable events. He covers prescalers, counter bit widths, overflow versus compare modes, atomic multi-byte register access, the "-1 rule", input capture and compare leapfrogging, with concrete AVR and STM32 code that highlights common pitfalls and reliable patterns for precise ticks.
Another 10 Circuit Components You Should Know
Jason Sachs walks through ten underrated circuit components every embedded engineer should know, from bus switches and thermocouple signal ICs to PCB stiffeners and opto-FET isolators. He mixes practical part examples, high-current hardware tips, and MCU features like CTMU and Peripheral Pin Select so you can pick the right trick when space, isolation, or precision matter.
Review: Embedded Software Design: A Practical Approach to Architecture, Processes, and Coding Techniques
Jacob Beningo's Embedded Software Design is a practical, discipline-first guide to building reliable embedded systems. It frames development around a software triad: architecture, Agile/DevOps processes, and coding techniques, with security integrated from the start. The book mixes principles with hands-on recipes and includes appendices that walk through GitLab CI/CD and TDD examples you can reuse on real projects.
Best Firmware Architecture Attributes
A poor firmware architecture makes future product variants and team work costly; Dr. Tayyar GUZEL outlines the attributes that avoid that fate. The post emphasizes modularity, low coupling, and encapsulation, and shows how a hardware abstraction layer, blackboard pattern, and CI-based unit testing improve extensibility, portability, and robustness. Practical tips include using setter/getter APIs, Doxygen for dependency graphs, and nightly regression to catch interface breaks early.
Return of the Delta-Sigma Modulators, Part 1: Modulation
Jason Sachs returns to delta-sigma modulators with a hands-on, code-first treatment that focuses on the DAC side of things. Part 1 walks through first- and second-order kernels, linearized analysis, spectra, and practical coefficient choices while illustrating results with Python simulations. Expect clear rules of thumb for A, R, and B, a derivation of noise shaping behavior, and a useful error bound for RC filtering.
Lessons Learned from Embedded Code Reviews (Including Some Surprises)
Jason Sachs recounts a round of motor-controller code reviews and the practical lessons his team learned about quality and tooling. He explains how a simple "ready for review" checklist and automated style checks kept meetings focused on substantive issues, and why choosing the right review tool matters after discovering lost comments in Stash. Read for concrete tips on process, subgit mirroring, vera++, and Upsource.
The CRC Wild Goose Chase: PPP Does What?!?!?!
Jason Sachs walks through a CRC rabbit hole and explains why ambiguous CRC names and incomplete specs lead to subtle protocol bugs. He demonstrates how XMODEM and KERMIT variants with a zero initial value can miss dropped leading-zero bytes, praises the X.25 standard for providing test vectors and a clear CRC16 definition, and warns that RFCs that ship only sample code are a poor substitute for a proper specification.
Someday We’ll Find It, The Kelvin Connection
Low-ohm measurements will fool your multimeter unless you use Kelvin connections. Jason Sachs walks through four-wire sensing using a current-limited supply and two DMMs, explains thermoelectric and connector-related errors, and shows why schematics and PCB layout must reflect Kelvin sense pads to avoid subtle measurement and circuit problems.
Recruiting New Bloggers!
Previous calls for bloggers have been very successful in recruiting some great communicators - Rick Lyons, Jason Sachs, Victor Yurkovsky, Mike Silva, Markus Nentwig, Gene Breniman, Stephen Friederichs,
Signal Processing Contest in Python (PREVIEW): The Worst Encoder in the World
Jason Sachs previews a hands-on Python contest to find the best velocity estimator for a noisy, low-cost quadrature encoder. The post explains the Estimator API, submission constraints, and a 5 second, 10 kHz evaluation harness that uses a simulated "Lucky Wheel" encoder with realistic manufacturing timing errors. Jason also includes a simple baseline estimator and discusses the practical tradeoff between noise reduction and phase lag in velocity estimation.
First-Order Systems: The Happy Family
Jason Sachs takes the modest topic of first-order systems and makes it useful, showing how RC filters behave in both time and frequency domains and why they all share the same shape. He steps through step, ramp, and sinusoidal responses, explains poles, zeros, and Bode behavior, and uses Python plots to make tracking error and the role of tau easy to visualize.






















