EmbeddedRelated.com
The 2026 Embedded Online Conference

How to use I2C devices in (Apache) NuttX: Scanning for Devices

Alan C AssisAlan C Assis April 22, 2024

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!

Stephane BoucherStephane Boucher April 22, 20249 comments

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

Ido GendelIdo Gendel April 17, 2024

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)

Nathan JonesNathan Jones April 11, 202412 comments

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.

Massimiliano PaganiMassimiliano Pagani April 8, 2024

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

Colin WallsColin Walls April 1, 20245 comments

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

Sergio R CaprileSergio R Caprile March 31, 2024

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

Mohammed BillooMohammed Billoo March 28, 2024

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

Luther StantonLuther Stanton March 26, 20244 comments

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

Jacob BeningoJacob Beningo March 24, 20242 comments

"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.


Lost Secrets of the H-Bridge, Part I: Ripple Current in Inductive Loads

Jason SachsJason Sachs July 8, 2013

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)

Ivan Cibrario BertolottiIvan Cibrario Bertolotti November 28, 20152 comments

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

Mike SilvaMike Silva August 14, 20141 comment

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

Miro SamekMiro Samek June 27, 20178 comments

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

Jason SachsJason Sachs November 11, 20142 comments

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 SachsJason Sachs August 24, 20133 comments

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 BoucherStephane Boucher March 6, 20193 comments

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

Gene BrenimanGene Breniman March 3, 2008

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 ++

Amar MahmutbegovicAmar Mahmutbegovic June 13, 20233 comments

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 RobertsonNeil Robertson June 15, 20165 comments

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.


The 2026 Embedded Online Conference