Linear Feedback Shift Registers for the Uninitiated
In 2017 and 2018 I wrote an eighteen-part series of articles about linear feedback shift registers, or LFSRs:
div.jms-article-content ol > li { list-style-type: upper-roman } Ex-Pralite Monks and Finite Fields, in which we describe what an LFSR is as a digital circuit; its cyclic behavior over time; the definition of groups, rings, and fields; the isomorphism between N-bit LFSRs and the field \( GF(2^N) \); and the reason why I wrote this series2024 Embedded Online Conference's Schedule
Welcome to the 2024 Embedded Online Conference! Like with previous years, this year's event will be a mix of pre-recorded on-demand sessions and live Zoom sessions. We've carefully curated the schedule to ensure that you have access to a wealth of valuable content throughout the week.
Most talks will be released on-demand, while most workshops and keynotes will be done live on Zoom. There will also be multiple live 20-minute-long Q&A sessions happening throughout the week, providing you...
A design non-methodology
Although writing an RTOS or kernel may be an interesting project, it is unlikely to be a wise course of action.
Working with Microchip PIC 8-bit GPIO
The third in a series of five posts looks at GPIO with PIC 8-bit microcontrollers. After a detailed review of the registers for configuring and managing GPIO on the PIC18F47Q10 processor, a basic application is stood up programming those registers to blink external LEDs at 0.5Hz.
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...
EOC 2024 - I Will Attend Giveaways!
With the Embedded Online Conference just around the corner, we are very excited to announce an opportunity for you to win one of many amazing prizes, thanks to the generous contributions of DigiKey, Jetperch and Saleae!
For a chance to win one of the following prizes, all you have to do is help us with spreading the word about the conference.
Prize: LulzBot Mini...Blinkenlights 2.0
Nothing spells old movie computers like a panel of randomly blinking lights, but in fact, these so-called "blinkenlights" can be valuable indicators - especially in embedded systems where the user interface must be minimal, small and cheap. Control of these lights can be achieved using a very simple, real-time interpreted script, and this kind of solution may be extended to other and more complex embedded tasks.
You Don't Need an RTOS (Part 1)
In this first article, we'll compare our two contenders, the superloop and the RTOS. We'll define a few terms that help us describe exactly what functions a scheduler does and why an RTOS can help make certain systems work that wouldn't with a superloop. By the end of this article, you'll be able to: - Measure or calculate the deadlines, periods, and worst-case execution times for each task in your system, - Determine, using either a response-time analysis or a utilization test, if that set of tasks is schedulable using either a superloop or an RTOS, and - Assign RTOS task priorities optimally.
C++ Assertion? Well Yes, But Actually No.
Assertions are a double-edged sword - on one side you enforce program correctness catching bugs close to their origin, on the other your application is subject to run-time error, like any interpreted language. This article explores what C++ can offer to get the advantages of assertions, without risking the crashes by moving contract checking at compile time.
The volatile keyword
Although the C keyword volatile is very useful in embedded applications, care is needed to use it correctly and vigilance is required to ensure its correct implementation by compilers.
C to C++: Using Abstract Interfaces to Create Hardware Abstraction Layers (HAL)
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.
Ten Little Algorithms, Part 2: The Single-Pole Low-Pass Filter
Other articles in this series:
- Part 1: Russian Peasant Multiplication
- Part 3: Welford's Method (And Friends)
- Part 4: Topological Sort
- Part 5: Quadratic Extremum Interpolation and Chandrupatla's Method
- Part 6: Green’s Theorem and Swept-Area Detection
I’m writing this article in a room with a bunch of other people talking, and while sometimes I wish they would just SHUT UP, it would be...
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 - Driving WS2812 RGB LEDs
This tutorial chapter is a bit of a detour, but I think an interesting and useful one. It introduces a bit of assembly language programming, and demonstrates bit-banging a tight serial data protocol. And it deals with RGB LEDs, which are just very fun in their own right, especially these new parts. So I thought I'd post this to give readers time for some holiday lighting experimenting.
Back To The FutureRemember how we started this...
C to C++: 3 Reasons to Migrate
I’ve recently written several blogs that have set the stage with a simple premise: The C programming language no longer provides embedded software developers the tools they need to develop embedded software throughout the full software stack. Now, don’t get me wrong, C is a powerhouse, with over 80% of developers still using it; however, as embedded systems have reached unprecedented levels of complexity, C might not be the right tool for the job.
In this post, I’m kicking...
Introduction to Microcontrollers - Interrupts
It's Too Soon To Talk About Interrupts!That, at least, could be one reaction to this chapter. But over the years I've become convinced that new microcontroller programmers should understand interrupts before being introduced to any complex peripherals such as timers, UARTs, ADCs, and all the other powerful function blocks found on a modern microcontroller. Since these peripherals are commonly used with interrupts, any introduction to them that does not...
Understanding and Preventing Overflow (I Had Too Much to Add Last Night)
Happy Thanksgiving! Maybe the memory of eating too much turkey is fresh in your mind. If so, this would be a good time to talk about overflow.
In the world of floating-point arithmetic, overflow is possible but not particularly common. You can get it when numbers become too large; IEEE double-precision floating-point numbers support a range of just under 21024, and if you go beyond that you have problems:
for k in [10, 100, 1000, 1020, 1023, 1023.9, 1023.9999, 1024]: try: ...A New Related Site!
We are delighted to announce the launch of the very first new Related site in 15 years! The new site will be dedicated to the trendy and quickly growing field of Machine Learning and will be called - drum roll please - MLRelated.com.
We think MLRelated fits perfectly well within the “Related” family, with:
- the fast growth of TinyML, which is a topic of great interest to the EmbeddedRelated community
- the use of Machine/Deep Learning in Signal Processing applications, which is of...
Getting Started with (Apache) NuttX RTOS - Part 1
NuttX RTOS is used in many products from companies like Sony, Xiaomi, Samsung, Google/Fitbit, WildernessLabs and many other companis. So, probably you are already using NuttX even without knowing it, like the you was using Linux on your TV, WiFi router more than 10 years ago and didn't know too! Today you will have the chance to discover a little bit of this fantastic Linux-like RTOS! Are you ready? So, let's get started!
VHDL tutorial - Creating a hierarchical design
In earlier blog entries I introduced some of the basic VHDL concepts. First, developing a function ('VHDL tutorial') and later verifying and refining it ('VHDL tutorial - part 2 - Testbench' and 'VHDL tutorial - combining clocked and sequential logic'). In this entry I will describe how to...
Important Programming Concepts (Even on Embedded Systems) Part V: State Machines
Other articles in this series:
- Part I: Idempotence
- Part II: Immutability
- Part III: Volatility
- Part IV: Singletons
- Part VI: Abstraction
Oh, hell, this article just had to be about state machines, didn’t it? State machines! Those damned little circles and arrows and q’s.
Yeah, I know you don’t like them. They bring back bad memories from University, those Mealy and Moore machines with their state transition tables, the ones you had to write up...
Byte and Switch (Part 1)
Imagine for a minute you have an electromagnet, and a microcontroller, and you want to use the microcontroller to turn the electromagnet on and off. Sounds pretty typical, right?We ask this question on our interviews of entry-level electrical engineers: what do you put between the microcontroller and the electromagnet?We used to think this kind of question was too easy, but there are a surprising number of subtleties here (and maybe a surprising number of job candidates that were missing...
Introduction to Microcontrollers - Further Beginnings
Embedded Programming BasicsThis tutorial entry will discuss some further embedded programming basics that you will need to understand before proceeding on to the LED blinky and other example programs. We will do this by looking at the general organization and types of instructions found in most microcontrollers, and how that organization and those instructions are reflected (or, in some cases, ignored) by the C programming language.
Basic CPU...How to Build a Fixed-Point PI Controller That Just Works: Part I
This two-part article explains five tips to make a fixed-point PI controller work well. I am not going to talk about loop tuning -- there are hundreds of articles and books about that; any control-systems course will go over loop tuning enough to help you understand the fundamentals. There will always be some differences for each system you have to control, but the goals are the same: drive the average error to zero, keep the system stable, and maximize performance (keep overshoot and delay...
10 Circuit Components You Should Know
Chefs have their miscellaneous ingredients, like condensed milk, cream of tartar, and xanthan gum. As engineers, we too have quite our pick of circuits, and a good circuit designer should know what's out there. Not just the bread and butter ingredients like resistors, capacitors, op-amps, and comparators, but the miscellaneous "gadget" components as well.
Here are ten circuit components you may not have heard of, but which are occasionally quite useful.
1. Multifunction gate (
Back from Embedded World 2019 - Funny Stories and Live-Streaming Woes
When the idea of live-streaming parts of Embedded World came to me, I got so excited that I knew I had to make it happen. I perceived the opportunity as a win-win-win-win.
- win #1 - Engineers who could not make it to Embedded World would be able to sample the huge event,
- win #2 - The organisation behind EW would benefit from the extra exposure
- win #3 - Lecturers and vendors who would be live-streamed would reach a (much) larger audience
- win #4 - I would get...
Already 3000+ Attendees Registered for the Upcoming Embedded Online Conference
Chances are you already know, through the newsletter or banners on the Related sites, about the upcoming Embedded Online Conference.
Chances are you also already know that you have until the end of the month of February to register for free.
And chances are that you are one of the more than 3000 pro-active engineers who have already registered.
But If you are like me and have a tendency to do tomorrow what can be done today, maybe you haven't registered yet. You may...
Data Hiding in C
Strictly speaking, C is not an object-oriented language. Although it provides some features that fit into the object-oriented paradigm it has never had the full object-oriented focus that its successor C++ offers. C++ introduced some very useful concepts and abilities that I miss when I’m developing in ANSI C. One such concept is protected member variables and functions.
When you declare a class in C++ you can also declare member variables and functions as part of that class. Often, these...
Ten Little Algorithms, Part 3: Welford's Method (and Friends)
Other articles in this series:
- Part 1: Russian Peasant Multiplication
- Part 2: The Single-Pole Low-Pass Filter
- Part 4: Topological Sort
- Part 5: Quadratic Extremum Interpolation and Chandrupatla's Method
- Part 6: Green’s Theorem and Swept-Area Detection
Last time we talked about a low-pass filter, and we saw that a one-line...
The New Forum is LIVE!
After months of hard word, I am very excited to introduce to you the new forum interface.
Here are the key features:
1- Easily add images to a post by drag & dropping the images in the editor
2- Easily attach files to a post by drag & dropping the files in the editor
3- Add latex equations to a post and they will be rendered with Mathjax (tutorial)
4- Add a code snippet and surround the code with
Helping New Bloggers to Break the Ice: A New Ipad Pro for the Author with the Best Article!
Breaking the ice can be tough. Over the years, many individuals have asked to be given access to the blogging interface only to never post an article.
Welcoming MANY New Bloggers!
The response to the latest call for bloggers has been amazing and I am very grateful.
In this post I present to you the individuals who, so far (I am still receiving applications at an impressive rate and will update this page as more bloggers are added), have been given access to the blogging interface. I am very pleased with the positive response and I think the near future will see the publication of many great articles, given the quality of the...
Recruiting New Bloggers!
Previous calls for bloggers have been very successful in recruiting some great communicators - Rick Lyons, Jason Sachs, Victor Yurkovsky, Mike Silva, Markus Nentwig, Gene Breniman, Stephen Friederichs,
DSPRelated and EmbeddedRelated now on Facebook & I will be at EE Live!
I have two news to share with you today.
The first one is that I finally created Facebook pages for DSPRelated.com and EmbeddedRelated (DSPRelated page - EmbeddedRelated page). For a long time I didn't feel that this was something that was needed, but it seems that these days more and more people are using their Facebook account to stay updated with their favorite websites. In any event, if you have a Facebook account, I would greatly appreciate if you could use the next 5 seconds to "like"...
Free Embedded Systems Books
Following the success of the Collaborative Writing Experiment: What are your favorite Embedded Systems Online Resources? blog post, let's try a second collaborative writing experiment. This time, let's work on a file that will list the best embedded systems books that are available online for free. I am not talking about books that are illegally made available for download by pirates, but books that are made available online by authors and/or publishers.
Do you know of...
Collaborative Writing Experiment: What are your favorite Embedded Systems Online Resources?
Edit 22/05 - Wow, this went better than expected. I will try submitting this blog post to Reddit/ece and see if we can get a few more interesting links before I close the document. Thanks to everyone who contributed!
_______
Edit 28/05 - The document is now closed to editing. If there is a link that you would like to see added, please use the comment system at the end of this blog. Thanks to all who participated!
Up next, Free...
Success Story
A blog post has just broken the all-time record for the number of pageviews in 24 hours on the related sites. The blog post in question is titled Data Hiding in C and was written by Stephen Friederichs. It has been viewed by more than 7000 individuals since its publication a few days ago.
One reason that explains the success of this blog post is the wide appeal of the subject of the article (c programming) which allowed me to
Code Snippets Winners Announced
Wow, thanks a lot for all the code snippets - I am pleasantly surprised by the quality of the code that has been shared and I am very grateful.
Now, as you know, to give momentum to the section I had announced a special reward program for code snippets submitted by the end of March.
The partner members and I had a very hard time selecting the 5 "most useful" snippets out of the more than 50 who have been submitted.
Here's our selection:
Now on Twitter + More Code Snippets Incentives
Now on Twitter!
Better late than never, the three related sites (DSPRelated, FPGARelated and EmbeddedRelated) now have their Twitter accounts. If you are already on Twitter, please consider following. I'll make sure to keep the tweets interesting and informative. Plus, once in a while, I will tweet a link where the first x persons to visit will receive a gift (book, gift certificate, etc).