Linear Feedback Shift Registers for the Uninitiated, Part II: libgf2 and Primitive Polynomials

Jason Sachs July 17, 2017

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 on bitbucket called...

Went 280km/h (174mph) in a Porsche Panamera in Germany!

Stephane Boucher July 10, 201712 comments

Those of you who've been following my blog lately already know that I am going through some sort of mid-life crisis that involves going out there to meet people and make videos.  It all started with Embedded World early this year, then continued at ESC Boston a couple of months ago and the latest chapter just concluded as I returned from Germany after spending a week at SEGGER's headquarters to produce a video to highlight their 25th anniversary.  

Embedded Toolbox: Windows GUI Prototyping Toolkit

Miro Samek July 7, 20172 comments

In this installment of my "Embedded Toolbox" series, I would like to interest you in the free Windows GUI Toolkit called QWin for prototyping, developing and debugging embedded C or C++ code on Windows.

If you work on devices with non-trivial user interfaces consisting of LCDs (segmented or graphic), buttons, LEDs, etc., QWin could be just the tool for you. It has improved my productivity in such projects dramatically. I personally consider it a gem in my "Embedded...

Linear Feedback Shift Registers for the Uninitiated, Part I: Ex-Pralite Monks and Finite Fields

Jason Sachs July 3, 20176 comments

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 understanding,...

Tenderfoot: Recommended Reading

Matthew Eshleman June 28, 20171 comment

Twenty years ago I read Code Complete by Steve McConnell. And then read it again. And again. And again. Of all the books I have read during my career, I believe this was the book that catapulted me from a young electrical engineer to a young and aspiring embedded software engineer. So to all the ‘tenderfoots’ embarking upon an embedded systems and especially embedded software and firmware career, this entry is for you.

First, I would certainly recommend that all engineers read and read...

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

VERY Fast Japanese Sumo Robots

Stephane Boucher June 20, 20171 comment

For some reasons, I could not stop watching.  I would love to have the maker of one of these robots to blog about the project here on, the sensors, microcontroller, algorithms and the challenges...  This would make for a very interesting read!  Do you know someone?

Ten Little Algorithms, Part 6: Green’s Theorem and Swept-Area Detection

Jason Sachs June 18, 20173 comments

Other articles in this series:

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

Going back to Germany!

Stephane Boucher June 13, 20176 comments

A couple of blog posts ago, I wrote that the decision to go to ESC Boston ended up being a great one for many different reasons.  I came back from the conference energized and really happy that I went.  

These feelings were amplified a few days after my return when I received an email from Rolf Segger, the founder of SEGGER Microcontroller (check out their very new website), asking if I would be interested in visiting their headquarters...

ESC Boston's Videos are Now Up

Stephane Boucher June 5, 2017

In my last blog, I told you about my experience at ESC Boston and the few videos that I was planning to produce and publish.  Here they are, please have a look and any feedback (positive or negative) is appreciated. 

Short Highlight

This is a very short (one minute) montage of some of the footage that I shot at the show & conference.  In future shows, I absolutely need to insert clips here and there of engineers saying a few words about the conference (why they...

Slew Rate Limiters: Nonlinear and Proud of It!

Jason Sachs October 6, 2014

I first learned about slew rate limits when I was in college. Usually the subject comes up when talking about the nonideal behavior of op-amps. In order for the op-amp output to swing up and down quickly, it has to charge up an internal capacitor with a transistor circuit that’s limited in its current capability. So the slew rate limit \( \frac{dV}{dt} = \frac{I_{\rm max}}{C} \). And as long as the amplitude and frequency aren’t too high, you won’t notice it. But try to...

OOKLONE: a cheap RF 433.92MHz OOK frame cloner

Fabien Le Mentec August 12, 201417 comments

A few weeks ago, I bought a set of cheap wireless outlets and reimplemented the protocol for further inclusion in a domotics platform. I wrote a post about it here:


Following that, I had access to another outlet from a different vendor:

The device documentation mentions that it operates on the same frequency as the previous...

Introduction to Microcontrollers - Adding Some Real-World Hardware

Mike Silva October 8, 20132 comments

When 2 LEDs Just Don't Cut It Anymore

So far, we've done everything in this series using two LEDs and one button.  I'm guessing that the thrill of blinking an LED has worn off by now, hard as that is to imagine.  What's more, we've just about reached the limits of what we can learn with such limited I/O.  We have come to the point where we need to add some hardware to our setup to continue with additional concepts and microcontroller...

StrangeCPU #2. Sliding Window Token Machines

Victor Yurkovsky March 5, 201313 comments

An in-depth exploration of Sliding Window Token Machines; ARM notes.

Table of Contents:

Use DPLL to Lock Digital Oscillator to 1PPS Signal

Michael Morris July 24, 20164 comments

There are occasions where it is desirable to lock a digital oscillator to an external time reference such as the 1PPS (One Pulse Per Second) signal output from a GPS receiver. One approach would be to synchronize a fixed frequency oscillator on the leading edge of the 1PPS signal. In many cases, this will result in adequate performance. However, in situations where simple synchronization does not provide adequate performance, digital phase-lock techniques can be applied to a...

Lessons Learned from Embedded Code Reviews (Including Some Surprises)

Jason Sachs August 16, 20152 comments

My software team recently finished a round of code reviews for some of our motor controller code. I learned a lot from the experience, most notably why you would want to have code reviews in the first place.

My background is originally from the medical device industry. In the United States, software in medical devices gets a lot of scrutiny from the Food and Drug Administration, and for good reason; it’s a place for complexity to hide latent bugs. (Can you say “

C++ on microcontrollers 2 - LPCXpresso, LPC-link, Code Sourcery, lpc21isp, linkerscript, LPC1114 startup

Wouter van Ooijen October 24, 20115 comments

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

VHDL tutorial - combining clocked and sequential logic

Gene Breniman March 3, 2008

In an earlier article on VHDL programming ("VHDL tutorial" and "VHDL tutorial - part 2 - Testbench", I described a design for providing a programmable clock divider for a ADC sequencer. In this example, I showed how to generate a clock signal (ADCClk), that was to be programmable over a series of fixed rates (20MHz, 10MHz, 4MHz, 2MHz, 1MHz and 400KHz), given a master clock rate of 40MHz. A reader of that article had written to ask if it was possible to extend the design to...

Absolute Beginner's Guide To Getting Started With Raspberry Pi

Steve Branam July 12, 2020

The Raspberry Pi is a great little computer for learning programming in general, as well as embedded systems. It runs a version of the Linux OS (Operating System) called Raspberry Pi OS (formerly called Raspbian, so you'll see that name a lot, including here), supporting multiple programming languages. It can be used as a full desktop computer.

But if you're an absolute beginner, the information can get overwhelming quickly. There are different versions of it, different software to run on...

The CRC Wild Goose Chase: PPP Does What?!?!?!

Jason Sachs October 23, 20142 comments

I got a bad feeling yesterday when I had to include reference information about a 16-bit CRC in a serial protocol document I was writing. And I knew it wasn’t going to end well.

The last time I looked into CRC algorithms was about five years ago. And the time before that… sometime back in 2004 or 2005? It seems like it comes up periodically, like the seventeen-year locust or sunspots or El Niño,...