How to use I2C devices in (Apache) NuttX: Scanning for Devices
Hands-on guide to scanning I2C peripherals on NuttX using a Raspberry Pi Pico, showing how the RTOS exposes i2c master instances and the i2ctool. The article walks through where the RP2040 I2C driver lives, how to enable I2C0 in menuconfig, build and flash nuttx, and run the i2c dev command to probe the bus. Verify sensors like BMP280 or SSD1306 before registering drivers.
EOC 2024 - I Will Attend Giveaways!
Win serious test gear by helping spread the word about the Embedded Online Conference, invites Stephane. Share the provided image on LinkedIn with #EOC2024 and #embeddedsystems by April 29 to enter raffles for gear like a LulzBot Mini 2, Saleae Logic Pro 8, Joulescope JS220, and a DSC-5300 oscilloscope. It only takes a few minutes to qualify.
Blinkenlights 2.0
Nothing spells old movie computers like a panel of randomly blinking lights, but in fact, these so-called "blinkenlights" can be valuable indicators - especially in embedded systems where the user interface must be minimal, small and cheap. Control of these lights can be achieved using a very simple, real-time interpreted script, and this kind of solution may be extended to other and more complex embedded tasks.
You Don't Need an RTOS (Part 1)
In this first article, we'll compare our two contenders, the superloop and the RTOS. We'll define a few terms that help us describe exactly what functions a scheduler does and why an RTOS can help make certain systems work that wouldn't with a superloop. By the end of this article, you'll be able to: - Measure or calculate the deadlines, periods, and worst-case execution times for each task in your system, - Determine, using either a response-time analysis or a utilization test, if that set of tasks is schedulable using either a superloop or an RTOS, and - Assign RTOS task priorities optimally.
C++ Assertion? Well Yes, But Actually No.
Assertions are a double-edged sword - on one side you enforce program correctness catching bugs close to their origin, on the other your application is subject to run-time error, like any interpreted language. This article explores what C++ can offer to get the advantages of assertions, without risking the crashes by moving contract checking at compile time.
The volatile keyword
Although the C keyword volatile is very useful in embedded applications, care is needed to use it correctly and vigilance is required to ensure its correct implementation by compilers.
When a Mongoose met a MicroPython, part I
This is more a framework than an actual application, with it you can integrate MicroPython and Cesanta's Mongoose.
Mongoose runs when called by MicroPython and is able to run Python functions as callbacks for the events you decide in your event handler. The code is completely written in C, except for the example Python callback functions, of course. To try it, you can just build this example on a Linux machine, and, with just a small tweak, you can also run it on any ESP32 board.
Getting Started With CUDA C on an Nvidia Jetson: GPU Architecture
In the previous blog post (Getting Started With CUDA C on Jetson Nvidia: Hello CUDA World!) I showed how to develop applications targeted at a GPU on a Nvidia Jetson Nano. As we observed in that blog post, performing a calculation on a 1-D array on a GPU had no performance benefit compared to a traditional CPU implementation, even on an array with many elements. In this blog post, we will learn about the GPU architecture to better explain the behavior and to understand the applications where a GPU shines (hint: it has to do with graphics).
Understanding Microchip 8-bit PIC Configuration
The second post of a five part series picks up getting started developing with Microchip 8-bit PIC Microcontroller by examining the how and why of processor configuration. Topics discussed include selecting the oscillator to use during processor startup and refining the configuration once the application starts. A walk through of the code generated by the Microchip IDE provides a concrete example of the specific Configuration Word and SFR values needed to configure the project specific clock configuration.
C to C++: Templates and Generics – Supercharging Type Flexibility
"C to C++: Templates and Generics – Supercharging Type Flexibility" illuminates the rigidity of C when managing multiple types and the confusion of code replication or macro complexity. In contrast, C++ offers templates, acting as type-agnostic blueprints for classes and functions, which allows for the creation of versatile and reusable code without redundancy. By using templates, developers can define operations like add once and apply them to any data type, simplifying codebases significantly. Generics further this concept, enabling a single code structure to handle diverse data types efficiently—a boon for embedded systems where operations must be performed on varying data, yet code efficiency is critical due to resource limitations. The blog walks through practical applications, showcasing how templates streamline processes and ensure type safety with static_assert, all while weighing the pros and cons of their use in embedded software, advocating for careful practice to harness their full potential.
Linear Feedback Shift Registers for the Uninitiated, Part V: Difficult Discrete Logarithms and Pollard's Kangaroo Method
Most discrete-log problems are hopeless by brute force, but clever algorithms cut that cost to feasible levels. This installment walks through baby-step giant-step, Pollard’s rho and kangaroo methods, and how Silver-Pohlig-Hellman and index calculus leverage group structure to speed attacks on GF(2^n) fields. Jason Sachs includes Python examples, heuristics, and complexity nuggets so you can see when each method is practical.
My Love-Hate Relationship with Stack Overflow: Arthur S., Arthur T., and the Soup Nazi
Jason Sachs traces his decade-long relationship with Stack Overflow, celebrating its fast answers, polished UI, and massive searchable archive while calling out a growing culture of harsh moderation. He argues strict, quality-first closures and inflexible automation often alienate newcomers and block helpful short-term answers. The post urges kinder handling of gray-area questions and smarter automation to keep the site useful and welcoming.
Understanding Yocto Project Layers: A Modular Approach to Embedded Systems Development
Managing metadata across embedded Linux builds gets messy fast, so the Yocto Project uses layers to keep things modular and reusable. This post walks through inspecting active layers with bitbake-layers, controlling overrides with BBFILE_PRIORITY, and creating a meta-yocto-splash-img layer that uses a .bbappend to replace psplash. It finishes by showing how to verify the custom splash screen in QEMU so you can test safely before deploying to hardware.
Skills For Embedded Systems Software Developers
Embedded development demands a broad, practical skillset, and this post lays out the core knowledge employers expect across software, hardware, and tooling. It highlights essential languages like C, low-level concepts such as interrupts and RTOS, plus hardware skills like debugging with JTAG and using oscilloscopes. You also get realistic timelines, hands on study advice, and resource pointers to build a portfolio that proves you can ship reliable firmware.
C to C++: 3 Reasons to Migrate
Embedded C still powers most devices, but rising system complexity is revealing its limits. In this post Jacob Beningo kicks off a series on moving from C to C++, offering three practical reasons to start the migration now. He argues for an incremental approach that keeps low-level, hardware-dependent code in C while adopting C++ for higher-level, object-oriented application logic so teams can keep shipping during the transition.
Round Round Get Around: Why Fixed-Point Right-Shifts Are Just Fine
Jason Sachs explains why, in most embedded systems, simple bitwise right-shifts are an acceptable way to do fixed-point division rather than paying the runtime cost to round. He shows the cheap trick of adding 2^(N-1) to implement round-to-nearest, explains unbiased "round-to-even" issues, and compares arithmetic error to much larger ADC and sensor errors. The takeaway: save cycles unless your algorithm or inputs require extra precision.
Are We Shooting Ourselves in the Foot with Stack Overflow?
Most traditional, beaten-path memory layouts allocate the stack space above the data sections in RAM, even though the stack grows “down” (towards the lower memory addresses) in most embedded processors. This arrangement puts your program data in the path of destruction of a stack overflow. In other words, you violate the first Gun Safety Rule (ALWAYS keep the gun pointed in a safe direction!) and you end up shooting yourself in the foot. This article shows how to locate the stack at the BEGINNING of RAM and thus point it in the "safe" direction.
Use DPLL to Lock Digital Oscillator to 1PPS Signal
Michael Morris demonstrates a practical DPLL that locks a Direct Digital Synthesizer to a GPS 1PPS signal, achieving sub-microsecond alignment and removing reference-oscillator frequency error. The design uses a Phase-Frequency Detector for 0 degree phase lock, a multiplier-free α-filter, and a limiter to prevent saturation, and includes coast and re-lock logic plus a synthesizable Verilog reference core.
Working with Strings in Embedded C++
This article discusses the use of strings in embedded systems. It explains how the need for and use of strings in embedded systems has changed with the advent of cheaper, full graphic displays and the growth of the ‘Internet of Things’ (IoT). The article also covers character literals, C-Strings and string literals, and the difference in memory models between them. It also highlights the safety and security issues that arise from using strings in embedded systems. Finally, it explains how C++11 introduced a Raw string literal type that is useful for storing file paths or regular expressions.
MSP430 Launchpad Tutorial - Part 2 - Interrupts and timers
Interrupts let the MSP430 respond to events without wasting CPU time, and this tutorial walks through using TimerA and Port 1 interrupts on the LaunchPad. Enrico shows how to configure TACTL, CCR0 and CCTL0 to generate a periodic TimerA interrupt, and how to set up P1IE, P1IES and P1IFG to catch a button press. The code toggles LEDs and enters LPM0 while waiting for interrupts.
Lost Secrets of the H-Bridge, Part I: Ripple Current in Inductive Loads
Jason Sachs digs into what PWM switching actually does to current in an H-bridge with an inductive load, and why that ripple matters for motors and power converters. He derives closed-form ripple formulas, shows how to compute a reference current I_R0 = VDC·T/L, and uses Python and sympy to plot and verify results. Read it for practical rules to halve ripple and raise its frequency.
Cortex-M Exception Handling (Part 1)
This article describes how Cortex-M processors handle interrupts and, more generally, exceptions, a concept that plays a central role in the design and implementation of most embedded systems.
Introduction to Microcontrollers - 7-segment displays & Multiplexing
Seven-segment displays can eat dozens of GPIO pins and dozens of resistors, but multiplexing trades pins for time and cuts component count dramatically. Mike Silva shows a hands-on AVR C implementation with segment encoding, a 100 Hz display scan ISR, several integer-to-digit conversion techniques, and software workarounds for messy pin mappings. He also demonstrates a timer "leapfrog" to reuse one timer for two tasks and compares performance so you can choose the best approach for your MCU.
Embedded Toolbox: Programmer's Calculator
A tiny but powerful cross-platform tool, QCalc evaluates full C-syntax expressions so you can paste results straight into firmware. It handles bitwise ops, mixed hex/decimal/binary constants, and scientific math, and it automatically shows integer results in formatted hex and binary. The post explains key features, variable handling, error messages, and how to run qcalc.tcl with the wish Tk interpreter.
Important Programming Concepts (Even on Embedded Systems) Part IV: Singletons
Singletons are convenient but often a modularity killer, especially in embedded firmware. Jason Sachs walks through the many faces of singletons, from static members and globals to hardware registers and user-visible application singletons, and shows practical ways to avoid tight coupling. Read this for concrete embedded examples and pragmatic fixes like passing state explicitly, using interfaces or factories, and isolating unavoidable globals in a HAL.
Lost Secrets of the H-Bridge, Part III: Practical Issues of Inductor and Capacitor Ripple Current
Jason Sachs cuts through the math to show what ripple current actually does to H-bridge hardware. He explains why peak current is the limiting factor for inductors, why capacitor ESR usually dominates DC-link voltage ripple, and how center-aligned PWM and duty selection reduce harmonics and ripple. Read this if you want practical rules of thumb and calculation templates for real power-electronics designs.
Free Goodies from Embedded World - What to Do Next?
Stephane Boucher went on a hunt for free stuff at Embedded World to assemble a giveaway bundle for a lucky reader. This short update shares that haul and asks the embedded community for ideas on what to do next. It is a conversational call for suggestions, aiming to turn conference swag into a useful prize.
VHDL tutorial - combining clocked and sequential logic
Need the ADC clock to sometimes be the raw 40MHz input? Gene Breniman shows how to extend a reloadable, counter-based VHDL clock divider to support a master-clock pass-through by using a conditional signal assignment to switch between the internal ADCClk and Mclk. The article also covers remapping ClkSel values and includes a working XC2C32A CPLD build that leaves room for future enhancements.
Modern C++ in Embedded Development: (Don't Fear) The ++
While C is still the language of choice for embedded development, the adoption of C++ has grown steadily. Yet, reservations about dynamic memory allocation and fears of unnecessary code bloat have kept many in the C camp. This discourse aims to explore the intricacies of employing C++ in embedded systems, negotiating the issues of dynamic memory allocation, and exploiting the benefits of C++ offerings like std::array and constexpr. Moreover, it ventures into the details of the zero-overhead principle and the nuanced distinctions between C and C++. The takeaway? Armed with the right knowledge and a careful approach, C++ can indeed serve as a powerful, safer, and more efficient tool for embedded development.
Digital PLL's -- Part 2
Neil Robertson builds a Z-domain model of a second-order digital PLL with a proportional-plus-integral loop filter, then derives closed-form formulas for KL and KI from the desired loop natural frequency and damping. The post explains the s → (z - 1)/Ts approximation, shows how to form the closed-loop IIR CL(z) for step and frequency responses, and highlights when the linear Z-domain model falls short of nonlinear acquisition behavior.





























