Embedded Software Engineering 101: Introduction

I’m starting a series to teach embedded software engineering. We’ll start with a description of a basic microcontroller. Once you understand how a microcontroller works we’ll build on that until you’ll understand how a moderately complex embedded system like a Fitbit or Nest works.

I’m calling it Embedded Software Engineering 101, and it starts this week right here on this blog.

Read on for more background and details.

Building blocks on top of building blocks

Building blocks on top of building blocks

I’ve been working in embedded systems and chip design for more than 14 years. I love embedded systems – the hardware, the software, and the constraints that bind them all together.

The maker movement and ideas like Arduino, Adafruit, and Sparkfun have made it easy to throw together a bit of hardware and software over a weekend (or month or semester) and create something new, fun, and maybe even useful.

This is great! Giving people the ability to create is an amazing thing; if I wanted to wax poetic I’d call it “democratizing technology” in a breathless voice.

Most maker projects are one-offs. You hack something together, make it as pretty as you have time or energy for, and then you move on.

I’ve spent my career on the other end of the spectrum – creating products that will be produced in the hundreds of thousands or millions or more – and that requires a different type of mindset and system.

I want to teach people how to write embedded software for these types of systems. I've been kicking around this idea of an "Embedded Software Engineering 101" class/tutorial/book/blog series for a while now, and thanks to the Embedded.fm blog I'm starting it now.

I'm a start with the fundamentals kind of guy, so my plan is to start at the bottom, with a simple description of a basic microprocessor, and build on that until you understand how a moderately complex embedded system works.

My goal is that at the end of this series you will be able to make an intelligent guess about how a Fitbit, Nest thermostat, or similar embedded system works. You'll be able to start working on embedded software systems using professional practices.

Embedded Software Engineering 101 is intended for:

  1. New college grads with a computer science, computer engineering, or electrical engineering background who are interested in embedded systems.

  2. A maker who wants to go deeper and learn how their Arduino system works, and how they can move beyond it (and if they should!).

  3. A career software engineer with no experience in embedded systems who would like to move down the stack and understand how embedded systems work.

  4. Electrical or mechanical engineers who work with embedded systems and want to understand what their software colleagues do.

What do I mean when I say I'm a "fundamentals kind of guy?" Richard Feynman, Nobel prize-winning physicist and raconteur, said it best: "What I cannot create, I do not understand.”

Now, I'm no Feynman, but I do believe that the best way to understand a system is to start with the basics. Armed with this understanding, you can create simple embedded systems with simple software. And once you understand very simple software you can build on it, creating more complex software as your experience grows.

Fundamentals first is just my belief, of course – plenty of people have made useful things with Arduino without understanding anything about the fundamentals. This series is for people who want to understand the fundamentals and everything built on top of them.

Of course we have to ask, where is the right level to start with for "the fundamentals?" Transistors and logic gates? No, that's too low-level for getting started with embedded software. Interfacing to common sensors? No, that's too high-level, it requires too much knowledge to start there.

I think the right fundamental level is the embedded microprocessor. You don't need to understand physics or electrical engineering to use an embedded microprocessor, nor do you need to be a programming expert.

So that's where we'll start next time.

Bias warning: I was a processor architect/designer in a previous life. Starting this series by understanding how a CPU works might not be the best way to understand embedded systems, but it’s the way my brain works. Be sure to check out other classes/tutorials/etc. if this one doesn’t click with you after a few entries.