EmbeddedRelated.com

C to C++: Using Abstract Interfaces to Create Hardware Abstraction Layers (HAL)

Jacob Beningo September 21, 20235 comments

In C to C++, we've been exploring how to transition from a C developer to a C++ developer when working in embedded system. In this post, we will explore how to leverage classes to create hardware abstraction layers (HAL). You'll learn about the various inheritance mechanisms, what an virtual function is, and how to create an abstract class.


The Backstreet Consultant

Ido Gendel September 18, 2023

In the uncharted land between Arduino-wielding kids and qualified electronics engineers emerged an entirely new market for embedded work. In this article, based on my personal experience and observations, I will attempt to outline this young market, the forces operating within it, and the kinds of people involved.

A short history

Up until fifteen years ago, give or take, embedded design was done exclusively by trained professionals: not just because of the required technical know-how, but also...


Are We Shooting Ourselves in the Foot with Stack Overflow?

Miro Samek September 8, 20234 comments

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.


nRF5 to nRF Connect SDK migration via DFU over BLE

Mike Voytovich September 7, 20232 comments

This writeup contains some notes on how I was able to migrate one of my clients projects based on the nRF5 SDK, to nRF Connect SDK (NCS) based firmware, via a DFU to devices in the field over BLE.


FPGA skills for the modern world

GLENN Kirilow September 4, 2023

With the ever increasing number of applications involving video processing, AI or edge computing the appetite for suitably skilled FPGA Engineers has never been higher from the market which is expected to grow to $15 billion USD by 2027!

In terms of industries opportunities can be typically found within:

  • Automotive
  • Aerospace
  • Defense
  • Data Processing

However this list is certainly not exhaustive as any application requiring algorithms which can leverage from highly parallel and...


Who needs source code?

Colin Walls August 31, 2023

Many developers feel that the supplying source code is essential for licensed software components. There are other perspectives, including the possibility of it being an actual disadvantage. Even the definition of source code has some vagueness.


New book on Elliptic Curve Cryptography

Mike August 30, 20234 comments

New book on Elliptic Curve Cryptography now online. Deep discount for early purchase. Will really appreciate comments on how to improve the book because physical printing won't happen for a few more months. Check it out here: http://mng.bz/D9NA


Supply Chain Games: What Have We Learned From the Great Semiconductor Shortage of 2021? (Part 5)

Jason Sachs August 28, 2023

In this article we’re going to take a look at cycle time, queues, and inventory. Cycle time is a manufacturing term — for anything, not just semiconductors — meaning how long it takes for an individual product to make its way through a manufacturing process, from start to finish. We’re going to try to understand how long it takes to manufacture semiconductors. In particular, we’re going to try to answer these questions:

  • How long does it take...

Three more things you need to know when transitioning from MCUs to FPGAs

Duane Benson August 24, 2023

Take a look at three more important difference between FPGAs and MCUs: "code reuse" vs templating, metastability and blocking vs. non-blocking operations.


In the beginning, there was no code…

James Grenning August 16, 20233 comments

…and it was good.

Why is it that code starts out nice and deteriorates over time?


PID Without a PhD

Tim Wescott April 26, 201612 comments

I both consult and teach in the area of digital control. Through both of these efforts, I have found that while there certainly are control problems that require all the expertise I can bring to bear, there are a great number of control problems that can be solved with the most basic knowledge of simple controllers, without resort to any formal control theory at all.

This article will tell you how to implement a simple controller in software and how to tune it without getting into heavy...


From Baremetal to RTOS: A review of scheduling techniques

Jacob Beningo June 8, 201617 comments

Transitioning from bare-metal embedded software development to a real-time operating system (RTOS) can be a difficult endeavor. Many developers struggle with the question of whether they should use an RTOS or simply use a bare-metal scheduler. One of the goals of this series is to walk developers through the transition and decision making process of abandoning bare-metal thinking and getting up to speed quickly with RTOSes. Before diving into the details of RTOSes, the appropriate first step...


Supply Chain Games: What Have We Learned From the Great Semiconductor Shortage of 2021? (Part 2)

Jason Sachs June 18, 20223 comments

Welcome back! Today we’re going to zoom around again in some odd directions, and give a roundabout introduction to the semiconductor industry, touching on some of the following questions:

  • How do semiconductors get designed and manufactured?
  • What is the business of semiconductor manufacturing like?
  • What are the different types of semiconductors, and how does that affect the business model of these manufacturers?
  • How has the semiconductor industry evolved over...

Introduction to Microcontrollers - Button Matrix & Auto Repeating

Mike Silva November 12, 2013

Too Many Buttons, Not Enough Inputs

Assigning one GPIO input to each button can use up a lot of GPIO pins.  Numeric input requires at least 10 buttons, plus however many additional control or function buttons.  This can quickly get expensive, GPIO pin-wise, and also connector-wise if the keypad is off the uC PCB as it often would be.  A very common response to this expense is to wire buttons (keys, etc) in a matrix.  By connecting our buttons in an...


Round Round Get Around: Why Fixed-Point Right-Shifts Are Just Fine

Jason Sachs November 22, 20163 comments

Today’s topic is rounding in embedded systems, or more specifically, why you don’t need to worry about it in many cases.

One of the issues faced in computer arithmetic is that exact arithmetic requires an ever-increasing bit length to avoid overflow. Adding or subtracting two 16-bit integers produces a 17-bit result; multiplying two 16-bit integers produces a 32-bit result. In fixed-point arithmetic we typically multiply and shift right; for example, if we wanted to multiply some...


Which MOSFET topology?

Jason Sachs September 1, 20119 comments

A recent electronics.StackExchange question brings up a good topic for discussion. Let's say you have a power supply and a 2-wire load you want to be able to switch on and off from the power supply using a MOSFET. How do you choose which circuit topology to choose? You basically have four options, shown below:

From left to right, these are:

High-side switch, N-channel MOSFET High-side switch, P-channel MOSFET Low-side switch, N-channel...

BGA and QFP at Home 1 - A Practical Guide.

Victor Yurkovsky October 13, 20134 comments

It is almost universally accepted by the hobbyists that you can't work with high-density packages at home.  That is entirely incorrect.  I've been assembling and reflowing BGA circuit boards at home for a few years now.  BGAs and 0.5mm-pitch QFPs are well within the realm of a determined amateur. 

This series of articles presents practical information on designing and assembling boards with high-density packages at home.  While the focus is on FPGA packages, most of...


Development of the MOS Technology 6502: A Historical Perspective

Jason Sachs June 18, 20222 comments

One ubiquitous microprocessor of the late 1970s and 1980s was the MOS Technology MCS 6502. I included a section on the development of the 6502 in Part 2 of Supply Chain Games, and have posted it as an excerpt here, as I believe it is deserving in its own right.

(Note: MOS Technology is pronounced with the individual letters M-O-S “em oh ess”,[1] not “moss”, and should not be confused with another semiconductor company,


Embedded Toolbox: Programmer's Calculator

Miro Samek June 27, 20178 comments

Like any craftsman, I have accumulated quite a few tools during my embedded software development career. Some of them proved to me more useful than others. And these generally useful tools ended up in my Embedded Toolbox. In this blog, I'd like to share some of my tools with you. Today, I'd like to start with my cross-platform Programmer's Calculator called QCalc.

I'm sure that you already have your favorite calculator online or on your smartphone. But can your calculator accept...