What to See at Embedded World 2023
Embedded World 2023 is just around the corner, and I am thrilled to be attending this year's edition in Nuremberg, Germany. The last time I was there was three years ago, and the world was on the cusp of a major pandemic. It was a surreal experience as many booths and exhibits were empty and cordoned off by security tape due to last-minute cancellations. It was clear that something big was happening.
But with more than 900 vendors exhibiting this year, I'm glad to see that Embedded...
Review: Embedded Software Design: A Practical Approach to Architecture, Processes, and Coding Techniques
IntroductionFull disclosure: I was given a copy of this book to review.
Embedded Software Design: A Practical Approach to Architecture, Processes, and Coding Techniques, by Jacob Beningo, is an excellent introduction to strategies for embedded systems design and bringing those designs to fruition. Renowned embedded systems expert Jack Ganssle was the technical reviewer.
This is a practical how-to book on the modern professional practice of embedded systems...
C to C++: 3 Proven Techniques for Embedded Systems Transformation
For 50 years, the C programming language has dominated the embedded software industry. Even today, more than 80% of embedded projects are using C; however, over the last few years, many teams have begun transitioning from C to C++. C++ offers embedded developers a robust, modern set of tools that can be used to write flexible, scalable, and reusable applications. As embedded applications become more complex and connected, teams need a more modern language to help them deal with the software...
Libgpiod - Toggling GPIOs The Right Way In Embedded Linux
OverviewWe all know that GPIO is one of the core elements of any embedded system. We use GPIOs to control LEDs and use them to monitor switches and button presses. In modern embedded systems, GPIOs can also be used as pins for other peripheral busses, such as SPI and I2C. Similar to the previous article on interacting with peripherals on an SPI bus in userspace via SPIdev (https://www.embeddedrelated.com/showarticle/1485.php), we can also control GPIOs from userspace on an embedded...
Basler pylon on Raspberry Pi with Yocto
Camera vendors are increasing offering Yocto layers to simplify the integration of drivers and the creation of cross-compilation environments. This article demonstrates how Yocto can be used to integrate Basler pylon into a Raspberry Pi Linux image.
Basler's pylon Camera Software Suite includes an SDK, a viewer and drivers for development and operation of vision software using Basler cameras. When deployed in Windows environments, pylon is usually installed on a booted Windows image using...
Supply Chain Games: What Have We Learned From the Great Semiconductor Shortage of 2021? (Part 4)
Today we’re going to look at what’s been going on this past year in the chip shortage, particularly in the automotive markets. I’m going to share some recent events and statements that may shed some light on what’s been happening.
In Part Three we went through a deep dive on some aspects of Moore’s Law, the semiconductor foundries, and semiconductor economics, and we looked at the game Supply Chain Idle. We touched on a couple of important points about the...
Supply Chain Games: What Have We Learned From the Great Semiconductor Shortage of 2021? (Part 3)
Hello again! Today we’re going to take a closer look at Moore’s Law, semiconductor foundries, and semiconductor economics — and a game that explores the effect of changing economics on the supply chain.
We’ll try to answer some of these questions:
- What does Moore’s Law really mean, and how does it impact the economics of semiconductor manufacturing?
- How does the foundry business model work, and how is it affected by the different mix of technology...
A Beginner's Guide to Embedded Systems
I was in my Junior year of college when I first learned about embedded systems. Sure, I’d heard about this mystical world of sensors and IoT, the same way I’d heard about thermonuclear astrophysics; But, the phrase “embedded systems” didn’t really mean anything to me. This, here, is a guide for people like teenage me. We’re going to learn what an embedded system actually is, and why working on embedded software is the coolest thing you could ever do!
What's an embedded...Peripheral Interaction Without a Linux Device Driver Using Spidev
OverviewWhen integrating a new peripheral onto an embedded Linux platform, we might think we always need to implement a kernel module to serve as a device driver. However, as we all know, absolutes such as “always” and “never” are rarely true. The same is true in this case. Implementing a device driver in kernel space on an embedded Linux platform should only be undertaken if the performance requirements of the final application demand it. In most instances, a userspace...
In Memoriam: Frederick P. Brooks, Jr. and The Mythical Man-Month
It is with some sadness that I have read that Fred Brooks has passed away. Brooks (1931 - 2022) worked at IBM and managed a large team developing the IBM System/360 computers in the early 1960s. Brooks was thirty years old at the start of this project. He founded the Computer Science Department at UNC Chapel Hill in 1964, at the age of thirty-three, acting as its department chair for twenty years. He remained at IBM until 1965, however. During this one-year...
Practical CRCs for Embedded Systems
CRCs are a very practical tool for embedded systems: you're likely to need to use one as part of a communications protocol or to verify the integrity of a program image before writing it to flash. But CRCs can be difficult to understand and tricky to implement. The first time I attempted to write CRC code from scratch I failed once. Then twice. Then three times. Eventually I gave up and used an existing library. I consider myself intelligent: I got A's...
Introduction to Microcontrollers - 7-segment displays & Multiplexing
Doing the 7 Segment ShuffleThe 7 segment display is ubiquitous in the modern world. Just about every digital clock, calculator and movie bomb has one. The treadmills at my gym have 6 or 7, each one displaying 3 or 4 digits. What makes the 7-seg interesting is that it presents an opportunity to make a trade off between GPIO (output pins) for time. Every 7-seg display requires 8 outputs (the 7 segments and usually either a decimal point or a...
Getting Started With CUDA C on an Nvidia Jetson: Hello CUDA World!
In this blog post, I introduce CUDA, which is a framework designed to allow developers to take advantage of Nvidia's GPU hardware acceleration to efficiently implement certain type of applications. I demonstrate an implementation to perform vector addition using CUDA C and compare it against the traditional implementation in "regular" C.
Getting Started With Zephyr: Bluetooth Low Energy
In this blog post, I show how to enable BLE support in a Zephyr application. First, I show the necessary configuration options in Kconfig. Then, I show how to use the Zephyr functions and macros to create a custom service and characteristic for a contrived application.
How to use I2C devices in (Apache) NuttX: Scanning for Devices
Previously in this EmbeddedRelated article, we saw how to use Buttons Subsystem on NuttX using a RaspberryPi Pico board. Now we will change from user input device (buttons) for something more generic: I2C protocol. NuttX supports a lot of I2C devices (sensors, displays, EEPROMs, I/O Expanders, I2C multiplexers, and many more). And most important: because NuttX is a Linux-like RTOS you will find the very familiar i2ctool to search for devices in your I2C bus. So, lets to get...
Patterns of Thinking: Metaphors in Programming
Several years ago, I once attended an “Object-Oriented Analysis and Design” training. As most such courses go, the instructor began with brushing up on the fundamental OO concepts. When explaining inheritance, the instructor spontaneously compared inheriting from a class to passing traits from parents to the offspring in a family. At first, this “family tree” metaphor seemed to make a lot of sense and most attendees nodded approvingly. However, when the instructor discussed...
Introduction to Microcontrollers - More On GPIO
Now that we have our LED Blinky program nailed down, it's time to look more closely at outputs, add button/switch inputs, and work with reading inputs and driving outputs based on those inputs.
It's ON - No, It's OFF - No, It's ON...I have to confess, I cheated. Well, let's say I glossed over something very important. In our LED Blinky program, we never cared about whether an output '1' or an output '0' turned on the LED. Since we were just...
nRF5 to nRF Connect SDK migration via DFU over BLE
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.
Linear Feedback Shift Registers for the Uninitiated, Part V: Difficult Discrete Logarithms and Pollard's Kangaroo Method
Last time we talked about discrete logarithms which are easy when the group in question has an order which is a smooth number, namely the product of small prime factors. Just as a reminder, the goal here is to find \( k \) if you are given some finite multiplicative group (or a finite field, since it has a multiplicative group) with elements \( y \) and \( g \), and you know you can express \( y = g^k \) for some unknown integer \( k \). The value \( k \) is the discrete logarithm of \( y \)...
How to use I2C devices in (Apache) NuttX: Adding support for an I2C device in your board
Previously in this EmbeddedRelated article, we saw how to find an I2C device connected to your board using the i2ctool that is very familiar for people with previous experience with embedded Linux. Today we will see how to add support to an I2C device (i.e. BMP280 sensor) in your board. So, lets to get started!
NuttX uses a very simple approach to interface with devices connected to the board: each board has a board bringup() function that is used to initialize the...
C++ on microcontrollers 2 - LPCXpresso, LPC-link, Code Sourcery, lpc21isp, linkerscript, LPC1114 startup
previous parts: 1
This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers. Reader input is very much appreciated, you might even steer me in the direction you find most interesting.
I teach my students that...
How to Arduino - a video toolbox
I've begun producing a new series of video tutorials for the hobbyist new to the Arduino or microcontrollers in general. My videos are very pragmatic - I prefer to answer the question "what is the quickest, simplest and most affordable way to accomplish this?". The videos are meant to be a quick source of "how to" knowledge for the hobbyist that is using an LCD display, ultrasonic sensor or accelerometer for the first time, for example. I hope you enjoy this series of...
Review: Embedded Software Design: A Practical Approach to Architecture, Processes, and Coding Techniques
IntroductionFull disclosure: I was given a copy of this book to review.
Embedded Software Design: A Practical Approach to Architecture, Processes, and Coding Techniques, by Jacob Beningo, is an excellent introduction to strategies for embedded systems design and bringing those designs to fruition. Renowned embedded systems expert Jack Ganssle was the technical reviewer.
This is a practical how-to book on the modern professional practice of embedded systems...
Introduction to Microcontrollers - More Timers and Displays
Building Your World Around TimersBy now you have seen four different ways to use timers in your programs. Next we will look at some ways to produce the effect of multiple parallel streams of work in your program with the help of timers. This effect is only an appearance, not a reality, since a single microcontroller (one core) can only run a single thread of code. However, since microcontrollers are so fast in relation to a great many of the tasks to...
Tolerance Analysis
Today we’re going to talk about tolerance analysis. This is a topic that I have danced around in several previous articles, but never really touched upon in its own right. The closest I’ve come is Margin Call, where I discussed several different techniques of determining design margin, and ran through some calculations to justify that it was safe to allow a certain amount of current through an IRFP260N MOSFET.
Tolerance analysis...
Ten Little Algorithms, Part 6: Green’s Theorem and Swept-Area Detection
Other articles in this series:
- Part 1: Russian Peasant Multiplication
- Part 2: The Single-Pole Low-Pass Filter
- Part 3: Welford's Method (And Friends)
- Part 4: Topological Sort
- Part 5: Quadratic Extremum Interpolation and Chandrupatla's Method
This article is mainly an excuse to scribble down some cryptic-looking mathematics — Don’t panic! Close your eyes and scroll down if you feel nauseous — and...
How to use I2C devices in (Apache) NuttX: Adding support for an I2C device in your board
Previously in this EmbeddedRelated article, we saw how to find an I2C device connected to your board using the i2ctool that is very familiar for people with previous experience with embedded Linux. Today we will see how to add support to an I2C device (i.e. BMP280 sensor) in your board. So, lets to get started!
NuttX uses a very simple approach to interface with devices connected to the board: each board has a board bringup() function that is used to initialize the...
VGA Output in 7 Slices. Really.
Ridiculous? Read on - I will show you how to generate VGA timing in seven XilinxR Spartan3R slices.Some time ago I needed to output video to a VGA monitor for my Apple ][ FPGA clone. Obviously (I thought), VGA's been done before and all I had to do was find some Verilog code and drop it into my design. As is often the case (with me anyway), the task proved to be very different from my imagined 'couple of hours to integrate the IP'.I found some example code for my board. I...
Practical CRCs for Embedded Systems
CRCs are a very practical tool for embedded systems: you're likely to need to use one as part of a communications protocol or to verify the integrity of a program image before writing it to flash. But CRCs can be difficult to understand and tricky to implement. The first time I attempted to write CRC code from scratch I failed once. Then twice. Then three times. Eventually I gave up and used an existing library. I consider myself intelligent: I got A's...
Homebrew CPUs: Messing around with a J1
In this article I will examine James Bowman's excellent J1 CPU; I will then proceed to mess around with various parts of it, making it smaller, more appropriate to my particular application, and possibly faster. I hope this will show you how easy it is to fiddle around with homemade CPUs and encourage you to make something weird and wonderful.
J1 CPUMy hat is off to James Bowman. J1 is pretty cool. It is a stack machine; it executes instructions in one cycle, it is...