Tenderfoot: Embedded Software and Firmware Specialties
Once upon a time (seven years ago) I answered a question on Stack Overflow. Then Stephane suggested I turn that answer into a blog post. Great idea! This post dives deeper into the original question: “Is it possible to fragment this field (embedded software and firmware) into sub-fields?”
This post represents a detailed and updated response to my original Stack Overflow answer. I hope this post provides guidance and useful information to the “tenderfoots” in the...
Linear Feedback Shift Registers for the Uninitiated, Part II: libgf2 and Primitive Polynomials
Last time, we looked at the basics of LFSRs and finite fields formed by the quotient ring \( GF(2)[x]/p(x) \).
LFSRs can be described by a list of binary coefficients, sometimes referred as the polynomial, since they correspond directly to the characteristic polynomial of the quotient ring.
Today we’re going to look at how to perform certain practical calculations in these finite fields. I maintain a Python library called libgf2,...
Linear Feedback Shift Registers for the Uninitiated, Part I: Ex-Pralite Monks and Finite Fields
Later there will be, I hope, some people who will find it to their advantage to decipher all this mess.
— Évariste Galois, May 29, 1832
I was going to call this short series of articles “LFSRs for Dummies”, but thought better of it. What is a linear feedback shift register? If you want the short answer, the Wikipedia article is a decent introduction. But these articles are aimed at those of you who want a little bit deeper mathematical...
How to Succeed in Motor Control: Olaus Magnus, Donald Rumsfeld, and YouTube
Almost four years ago, I had this insight — we were doing it wrong! Most of the application notes on motor control were about the core algorithms: various six-step or field-oriented control methods, with Park and Clarke transforms, sensorless estimators, and whatnot. It was kind of like a driving school would be, if they taught you how the accelerator and brake pedal worked, and how the four-stroke Otto cycle works in internal combustion engines, and handed you a written...
Scorchers, Part 1: Tools and Burn Rate
This is a short article about one aspect of purchasing, for engineers.
I had an engineering manager once — I’ll leave his real name out of it, but let’s call him Barney — who had a catchy response to the question “Can I buy XYZ?”, where XYZ was some piece of test equipment, like an oscilloscope or multimeter. Barney said, “Get what you need, need what you get.” We used purchase orders, which when I started in 1996 were these quaint forms on...
Margin Call: Fermi Problems, Highway Horrors, Black Swans, and Why You Should Worry About When You Should Worry
“Reports that say that something hasn’t happened are always interesting to me, because as we know, there are known knowns; there are things we know that we know. There are known unknowns; that is to say, there are things that we now know we don’t know. But there are also unknown unknowns — there are things we do not know we don’t know.” — Donald Rumsfeld, February 2002
Today’s topic is engineering margin.
XKCD had a what-if column involving Fermi...
Basic hand tools for electronics assembly
Though the software tools vary with different microcontrollers, many hardware tools are the same.
Oh Robot My Robot
Oh Robot! My Robot! You’ve broken off your nose! Your head is spinning round and round, your eye no longer glows, Each program after program tapped your golden memory, You used to have 12K, now there is none that I can see, Under smoldering antennae, Over long forgotten feet, My sister used your last part: The chip she tried to eat.
Oh Robot, My Robot, the remote controls—they call, The call—for...
Python Code from My Articles Now Online in IPython Notebooks
Ever since I started using IPython Notebooks to write these articles, I’ve been wanting to publish them in a form such that you can freely use my Python code. One of you (maredsous10) wanted this access as well.
Well, I finally bit the bullet and automated a script that will extract the Python code and create standalone notebooks, that are available publicly under the Apache license on my bitbucket account: https://bitbucket.org/jason_s/embedded-blog-public
This also means they...
My Love-Hate Relationship with Stack Overflow: Arthur S., Arthur T., and the Soup Nazi
Warning: In the interest of maintaining a coherent stream of consciousness, I’m lowering the setting on my profanity filter for this post. Just wanted to let you know ahead of time.
I’ve been a user of Stack Overflow since December of 2008. And I say “user” both in the software sense, and in the drug-addict sense. I’m Jason S, user #44330, and I’m a programming addict. (Hi, Jason S.) The Gravatar, in case you were wondering, is a screen...
3D printing for embedded development
Used mostly for creating little plastic objects, the desktop 3D printer is not an obvious addition to the embedded developer's toolbox. However, if you're looking for more reasons to get one, or already have one that's mostly gathering dust, here are a couple of embedded-related ways to get more value out of it.
How to Succeed in Motor Control: Olaus Magnus, Donald Rumsfeld, and YouTube
Almost four years ago, I had this insight — we were doing it wrong! Most of the application notes on motor control were about the core algorithms: various six-step or field-oriented control methods, with Park and Clarke transforms, sensorless estimators, and whatnot. It was kind of like a driving school would be, if they taught you how the accelerator and brake pedal worked, and how the four-stroke Otto cycle works in internal combustion engines, and handed you a written...
Massive Open Online Courses ( Transforming education )
Emerging trends in online education have opened up unforeseen learning opportunities for aspiring students. Eminent instructors from the best names in the industry such as Stanford, MIT and Harvard provide several courses with video lectures online.
Named MOOCs, Massive Open Online courses are accelerating the learning process in a radical manner. Online universities like Coursera, edX, Udacity, Khan Academy and Udemy offer courses which are professionally relevant.
Book Review: "Turing's Cathedral"
My library had Turing’s Cathedral: The Origins of the Digital Universe by George Dyson on its new acquisitions shelf, so I read it. I’d recommend the book to anyone interested in the history of computing.
Turing’s Cathedral primarly covers the period in early computing from 1940-1958, and bridges a gap between a few other popular books: on the historic side, between Richard Rhodes’s
Linear Feedback Shift Registers for the Uninitiated, Part III: Multiplicative Inverse, and Blankinship's Algorithm
Last time we talked about basic arithmetic operations in the finite field \( GF(2)[x]/p(x) \) — addition, multiplication, raising to a power, shift-left and shift-right — as well as how to determine whether a polynomial \( p(x) \) is primitive. If a polynomial \( p(x) \) is primitive, it can be used to define an LFSR with coefficients that correspond to the 1 terms in \( p(x) \), that has maximal length of \( 2^N-1 \), covering all bit patterns except the all-zero...
Linear Feedback Shift Registers for the Uninitiated, Part X: Counters and Encoders
Last time we looked at LFSR output decimation and the computation of trace parity.
Today we are starting to look in detail at some applications of LFSRs, namely counters and encoders.
CountersI mentioned counters briefly in the article on easy discrete logarithms. The idea here is that the propagation delay in an LFSR is smaller than in a counter, since the logic to compute the next LFSR state is simpler than in an ordinary counter. All you need to construct an LFSR is
Getting Started With CUDA C on an Nvidia Jetson: A Meaningful Algorithm
In this blog post, I demonstrate a use case and corresponding GPU implementation where meaningful performance gains are realized and observed. Specifically, I implement a "blurring" algorithm on a large 1000x1000 pixel image. I show that the GPU-based implementation is 1000x faster than the CPU-based implementation.
Painting with Light to Measure Time
Recently I was faced with a dilemma while working from home. I needed to verify an implementation of first-order sigma-delta modulation used to adjust LED brightness. (I have described this in more detail in Modulation Alternatives for the Software Engineer.) I did not, however, have an oscilloscope.
And then I remembered something, about a technique called “light painting”: basically a long-exposure photograph where a...
Scorchers, Part 1: Tools and Burn Rate
This is a short article about one aspect of purchasing, for engineers.
I had an engineering manager once — I’ll leave his real name out of it, but let’s call him Barney — who had a catchy response to the question “Can I buy XYZ?”, where XYZ was some piece of test equipment, like an oscilloscope or multimeter. Barney said, “Get what you need, need what you get.” We used purchase orders, which when I started in 1996 were these quaint forms on...
Definite Article: Notes on Traceability
Electronic component distibutor Digi-Key recently announced part tracing for surface-mount components purchased in cut-tape form. This is a big deal, and it’s a feature that is a good example of traceability. Some thing or process that has traceability basically just means that it’s possible to determine an object’s history or provenance: where it came from and what has happened to it since its creation. There are a...
Python Code from My Articles Now Online in IPython Notebooks
Ever since I started using IPython Notebooks to write these articles, I’ve been wanting to publish them in a form such that you can freely use my Python code. One of you (maredsous10) wanted this access as well.
Well, I finally bit the bullet and automated a script that will extract the Python code and create standalone notebooks, that are available publicly under the Apache license on my bitbucket account: https://bitbucket.org/jason_s/embedded-blog-public
This also means they...
Linear Feedback Shift Registers for the Uninitiated, Part IX: Decimation, Trace Parity, and Cyclotomic Cosets
Last time we looked at matrix methods and how they can be used to analyze two important aspects of LFSRs:
- time shifts
- state recovery from LFSR output
In both cases we were able to use a finite field or bitwise approach to arrive at the same result as a matrix-based approach. The matrix approach is more expensive in terms of execution time and memory storage, but in some cases is conceptually simpler.
This article will be covering some concepts that are useful for studying the...
Book Review: "Turing's Cathedral"
My library had Turing’s Cathedral: The Origins of the Digital Universe by George Dyson on its new acquisitions shelf, so I read it. I’d recommend the book to anyone interested in the history of computing.
Turing’s Cathedral primarly covers the period in early computing from 1940-1958, and bridges a gap between a few other popular books: on the historic side, between Richard Rhodes’s
Massive Open Online Courses ( Transforming education )
Emerging trends in online education have opened up unforeseen learning opportunities for aspiring students. Eminent instructors from the best names in the industry such as Stanford, MIT and Harvard provide several courses with video lectures online.
Named MOOCs, Massive Open Online courses are accelerating the learning process in a radical manner. Online universities like Coursera, edX, Udacity, Khan Academy and Udemy offer courses which are professionally relevant.
Musings on Publication — and Zero Sequence Modulation
Perhaps you don’t think about it, but in order for you to read these articles, someone has to do something.
And I don’t just mean writing them. Stephane Boucher has set up this website so that it’s automatic, for the most part — at least from my end of things, as an author. When I get an idea for an article, I open up a new IPython Notebook, write my article, save it in a Mercurial repository, run a Python script to convert from IPython Notebook format to HTML, open...
Painting with Light to Measure Time
Recently I was faced with a dilemma while working from home. I needed to verify an implementation of first-order sigma-delta modulation used to adjust LED brightness. (I have described this in more detail in Modulation Alternatives for the Software Engineer.) I did not, however, have an oscilloscope.
And then I remembered something, about a technique called “light painting”: basically a long-exposure photograph where a...
Garden Rakes Revisited: The Hall of Shame
A little while ago, I wrote about what I call the “garden rakes” syndrome in software, where there are little bugs or pitfalls lying around like sloppy garden rakes that no one has put away, and when you use these software programs, instead of zooming around getting things done, you’re either tripping over the garden rakes or carefully trying to avoid them. Either way, you lose focus on what you’re really trying to work on, and that causes a big hit in...
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.
Reading and Understanding Profitability Metrics from Financial Statements
Whoa! That has got to be the most serious-minded title I’ve ever written. Profitability Metrics from Financial Statements, indeed. I’m still writing Part 2 of my Supply Chain Games article, and I was about to mention something about whether a company is profitable, when I realized something that didn’t quite fit into the flow of things, so I thought I’d handle it separately: how are you supposed to know what I mean, when I say a company is profitable? And how am I...
Definite Article: Notes on Traceability
Electronic component distibutor Digi-Key recently announced part tracing for surface-mount components purchased in cut-tape form. This is a big deal, and it’s a feature that is a good example of traceability. Some thing or process that has traceability basically just means that it’s possible to determine an object’s history or provenance: where it came from and what has happened to it since its creation. There are a...