Embedded Wednesdays. And in the beginning there was blinkies!
Welcome to Embedded Wednesdays where we shall be learning about embedded systems and embedded systems programming. We’ll start at the very beginning, and make our way to more advanced topics.
Each of these posts is intended to take the form of a little bit of background information or a little bit of practice. Let’s get started.
What is an embedded system?
An embedded system is a little computer that lives inside of a larger piece of equipment, typically acting as the control computer. An embedded system, very generally, has three sections, sensors, actuators, and a processor. In this post I will be giving an overview of the processor.
Recently the folks here at Embedded.fm were having a heated discussion about the difference between a microprocessor and a microcontroller. The micro portion of the names is historic from the days of mainframes, minicomputers, and microcomputers*. Micro, in this context, indicates that the calculating portion is made on one chip. A microprocessor is simply the chip that does the calculations, it doesn’t have its main memory, program code, or peripherals such as USB and Ethernet, built in. Your desktop computer will typically use a microprocessor made by Intel, with memory added using little boards, and peripherals built into other chips on the motherboard.
A microcontroller has the processor, memory, program space, and a lot of peripherals right in the same chip. The typical embedded system uses a microcontroller, serves a dedicated function, and has restricted resources. Compared to a desktop computer, these systems typically have slower processors, far less memory, and may not have features like displays, disk drives, expansion busses, or network connections. Embedded systems do not change their function by changing their code, since they control a predetermined set of sensors and actuators. These systems are constrained by factors such as costs, power consumption, size, and weight.
Embedded systems are also used in situations where timing is important or critical. Button presses and sensors are processed as the signals come in. Signals must be handled in a timely and predictable manner. If you put your foot on the brake pedal of your car, you want the anti-lock braking system to work now, not “real soon now”.
Some examples of embedded computers include space craft control computers, modern furnaces and furnace thermostats, the Fitbit on your arm, PC disk drives, and even SD cards**.
An iPhone is not an embedded system, it is a general purpose computer that can run many apps. Your laptop computer is not an embedded system, it is a general purpose computer that can be reprogrammed to do many things, play music, videos, games, be a word processor, help with your taxes, and send email. Your laptop has a lot of pieces that are embedded systems, like the disk drive, DVD player, and even the keyboard.
An old iPod could be considered an embedded system. It had a processor, display, buttons, disk drive, and audio section. With that they made it play music, play a few games, and hold some information. It couldn’t run other programs. The later iPods could run apps, these are not embedded systems.
If you think about it, you are surrounded by embedded systems, quietly going about their tasks. If they were put together properly, you shouldn’t even know they are there.
* A computer is made up of a processor, memory, and peripherals. A processor, or central processing unit, does all of the computation and coordination of the computer. A microcomputer has the processor section in one chip. A mini had a whole board full of chips just for the processor, and the mainframe had a cabinet full of boards to make up the processor. Now, minis are gone and mainframes are made up of lots of microprocessors.
** An SD card is made of memory chips and a very small microcontroller.
This post is part of a series. Please see the other posts here.