EmbeddedRelated.com

A Wish for Things That Work

Jason Sachs January 1, 20182 comments

As the end of the year approaches, I become introspective. This year I am frustrated by bad user interfaces in software.

Actually, every year, throughout the year, I am frustrated by bad user interfaces in software. And yet here it is, the end of 2017, and things aren’t getting much better! Argh!

I wrote about this sort of thing a bit back in 2011 (“Complexity in Consumer Electronics Considered Harmful”) but I think it’s time to revisit the topic. So I’m...


Linear Feedback Shift Registers for the Uninitiated, Part XII: Spread-Spectrum Fundamentals

Jason Sachs December 29, 20171 comment

Last time we looked at the use of LFSRs for pseudorandom number generation, or PRNG, and saw two things:

  • the use of LFSR state for PRNG has undesirable serial correlation and frequency-domain properties
  • the use of single bits of LFSR output has good frequency-domain properties, and its autocorrelation values are so close to zero that they are actually better than a statistically random bit stream

The unusually-good correlation properties...


Linear Feedback Shift Registers for the Uninitiated, Part XI: Pseudorandom Number Generation

Jason Sachs December 20, 2017

Last time we looked at the use of LFSRs in counters and position encoders.

This time we’re going to look at pseudorandom number generation, and why you may — or may not — want to use LFSRs for this purpose.

But first — an aside:

Science Fair 1983

When I was in fourth grade, my father bought a Timex/Sinclair 1000. This was one of several personal computers introduced in 1982, along with the Commodore 64. The...


Linear Feedback Shift Registers for the Uninitiated, Part X: Counters and Encoders

Jason Sachs December 9, 2017

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.

Counters

I 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


Linear Feedback Shift Registers for the Uninitiated, Part IX: Decimation, Trace Parity, and Cyclotomic Cosets

Jason Sachs December 3, 2017

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


Linear Feedback Shift Registers for the Uninitiated, Part VIII: Matrix Methods and State Recovery

Jason Sachs November 21, 20174 comments

Last time we looked at a dsPIC implementation of LFSR updates. Now we’re going to go back to basics and look at some matrix methods, which is the third approach to represent LFSRs that I mentioned in Part I. And we’re going to explore the problem of converting from LFSR output to LFSR state.

Matrices: Beloved Historical Dregs

Elwyn Berlekamp’s 1966 paper Non-Binary BCH Encoding covers some work on


Obsolete? Yes. Still in use? Yes. How do you use it? Ummm...

Ed Nutter November 14, 20175 comments

In today's world of constantly changing technology, quick parts availability, and seemingly endless options, some things can't change.  It isn't a big deal to wait a day or less for a computer upgrade to arrive.  It seems program size increases proportionally to hard drive size.  The old is discarded and replaced with the new.  Hard drives can hold terrabytes and even SD cards can hold gigabytes of information.

Now, suppose a system can't be changed.  It is still...


Linear Feedback Shift Registers for the Uninitiated, Part VII: LFSR Implementations, Idiomatic C, and Compiler Explorer

Jason Sachs November 13, 20171 comment

The last four articles were on algorithms used to compute with finite fields and shift registers:

Today we’re going to come back down to earth and show how to implement LFSR updates on a microcontroller. We’ll also talk a little bit about something called “idiomatic C” and a neat online tool for experimenting with the C compiler.


Lazy Properties in Python Using Descriptors

Jason Sachs November 7, 2017

This is a bit of a side tangent from my normal at-least-vaguely-embedded-related articles, but I wanted to share a moment of enlightenment I had recently about descriptors in Python. The easiest way to explain a descriptor is a way to outsource attribute lookup and modification.

Python has a bunch of “magic” methods that are hooks into various object-oriented mechanisms that let you do all sorts of ridiculously clever things. Whether or not they’re a good idea is another...


Android for Embedded Devices - 5 Reasons why Android is used in Embedded Devices

Maharajan Veerabahu November 6, 20173 comments

The embedded purists are going to hate me for this. How can you even think of using Android on an embedded system ? It’s after all a mobile phone operating system/software. 

Sigh !! Yes I did not like Android to begin with, as well - for use on an Embedded System. But sometimes I think the market and needs decide what has to be used and what should not be. This is one such thing. Over the past few years, I have learned to love Android as an embedded operating system....


How to install Ubuntu 12.04 Precise, Xubuntu-desktop and Open JDK-7 on Beagleboard Rev. C2

Tayyar GUZEL July 25, 20124 comments

My aim was to install Ubuntu 12.04, Xubuntu-desktop graphical user interface and Java virtual machine (Open JDK-7) on my beagleboard so that I could run my java application on the monitor connected to the BB. I encountered several problems and solved them one by one. Following is how I've done it..

I had all the accesorries for the beagleboard (usb hub, dvi-to-hdmi cable, usb-ethernet converter, usb keyboard, usb mouse and a hdmi enabled monitor).

My host PC also has a Ubuntu 12.04...


Margin Call: Fermi Problems, Highway Horrors, Black Swans, and Why You Should Worry About When You Should Worry

Jason Sachs December 6, 20152 comments

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


How to Analyze a Differential Amplifier

Jason Sachs April 13, 2014

There are a handful of things that you just have to know if you do any decent amount of electronic circuit design work. One of them is a voltage divider. Another is the behavior of an RC filter. I'm not going to explain these two things or even link to a good reference on them — either you already know how they work, or you're smart enough to look it up yourself.

The handful of things also includes some others that are a little more interesting to discuss. One of them is this...


StrangeCPU #4. Microcode

Victor Yurkovsky May 13, 20137 comments
Summary:

Sliding windows containing runs of microcode.

Table of Contents:

Designing Communication Protocols, Practical Aspects

Fotis Chatzinikolaou May 14, 20192 comments

For most embedded developers always comes the time when they have to make their embedded MCU talk to another system. That other system will be a PC or a different embedded system or a smartphone etc. For the purpose of this article I am assuming that we are in the control of the protocol between the two ends and we don’t have to follow something that is already in place on one side.

So let’s say that we have our embedded MCU, we have implemented and configured the USB stack (or just...


Isolated Sigma-Delta Modulators, Rah Rah Rah!

Jason Sachs April 25, 2013

I recently faced a little "asterisk" problem, which looks like it can be solved with some interesting ICs. 

I needed to plan out some test instrumentation to capture voltage and current information over a short period of time. Nothing too fancy, 10 or 20kHz sampling rate, about a half-dozen channels sampled simultaneously or near simultaneously, for maybe 5 or 10 seconds.

Here's the "asterisk": Oh, by the way, because the system in question was tied to the AC mains, I needed some...


Linear Feedback Shift Registers for the Uninitiated, Part XVII: Reverse-Engineering the CRC

Jason Sachs July 7, 20181 comment

Last time, we continued a discussion about error detection and correction by covering Reed-Solomon encoding. I was going to move on to another topic, but then there was this post on Reddit asking how to determine unknown CRC parameters:

I am seeking to reverse engineer an 8-bit CRC. I don’t know the generator code that’s used, but can lay my hands on any number of output sequences given an input sequence.

This is something I call the “unknown oracle”...


Finally got a drone!

Stephane Boucher August 28, 20172 comments

As a reader of my blog, you already know that I have been making videos lately and thoroughly enjoying the process.  When I was in Germany early this summer (and went 280 km/h in a porsche!) to produce SEGGER's 25th anniversary video, the company bought a drone so we could get an aerial shot of the party (at about the 1:35 mark in this video).  Since then, I have been obsessing on buying a drone for myself and finally made the move a few weeks ago - I acquired a used DJI...


Linear Feedback Shift Registers for the Uninitiated, Part VI: Sing Along with the Berlekamp-Massey Algorithm

Jason Sachs October 18, 20171 comment

The last two articles were on discrete logarithms in finite fields — in practical terms, how to take the state \( S \) of an LFSR and its characteristic polynomial \( p(x) \) and figure out how many shift steps are required to go from the state 000...001 to \( S \). If we consider \( S \) as a polynomial bit vector such that \( S = x^k \bmod p(x) \), then this is equivalent to the task of figuring out \( k \) from \( S \) and \( p(x) \).

This time we’re tackling something...


Embedded Programming Video Course Shows How OOP Works Under the Hood

Miro Samek September 29, 2019

If you'd like to understand how Object-Oriented Programming (OOP) really works under the hood, here is a free video course for you:

OOP part-1: Encapsulation: This first lesson on Object-Oriented Programming (OOP) introduces the concept of Encapsulation, which is the ability to package data and functions together into classes. You'll see how you can emulate Encapsulation in C, what kind of code is generated, and how to debug such code. Next, you will translate the C design into C++ using...