1.1.1 What is an Embedded System?
We are all familiar with the idea of a desktop or laptop computer, and the amazing processing that they can do. These computers are general purpose; we can get them to do different things at different times, depending on the application or program we run on them. At the very heart of such computers is a microprocessor, a tiny and fantastically complicated electronic circuit which contains the core features of a computer. All of this is fabricated on a single slice of silicon, called an integrated circuit (IC). Some people, particularly those who are not engineers themselves, call these circuits microchips, or just chips.
What is less familiar to many people is the idea that instead of putting a microprocessor in a general-purpose computer, it can also be placed inside a product which has nothing to do with computing, like a washing machine, toaster or camera. The microprocessor is then customized to control that product. The computer is there, inside the product; but it cannot be seen, and the user probably does not even know it is there. Moreover, those add-ons that are normally associated with a computer, like keyboard, screen or mouse, are nowhere to be seen. Such products are called embedded systems, because the computer that controls them is embedded right inside. Because they tend to focus on control, in many cases the microprocessors used in embedded systems develop different characteristics from the ones used in more general-purpose machines. They are called microcontrollers. Although much less visible than their microprocessor cousins, microcontrollers sell in far greater volume and their impact has been enormous. To the electronic and system designer they offer huge opportunities.
Embedded systems come in many forms and guises. They are extremely common in the home, the motor vehicle and the workplace. Most modern domestic appliances, like washing machines, dishwashers, ovens, central heating and burglar alarms, are embedded systems. The motor car is full of them, in engine management, security (for example, locking and anti-theft devices), air-conditioning, brakes, radio, and so on. They are found across industry and commerce, in machine control, factory automation, robotics, electronic commerce and office equipment. The list has almost no end, and it continues to grow.
Figure 1.1 expresses the embedded system as a simple block diagram. There is a set of inputs from the controlled system. The embedded computer, usually a microcontroller, runs a program dedicated to this application, permanently stored in its memory. Unlike the general-purpose desktop computer, which runs many programs, this is the only program it ever runs. Based on information supplied from the inputs, the microcontroller computes certain outputs, which are connected to things like actuators within the system. The actual electronic circuit, along with any electromechanical components, is often called the hardware; the program running on it is often called the software. Aside from all of this, there may also be interaction with a user, for example via keypad and display, and there may be interaction with other subsystems elsewhere, although neither of these is essential to the general concept. One other variable will affect all that we do in embedded systems, and this is time, represented as a dominating arrow which cuts across the figure. We will need to be able to measure time, make things happen at precisely predetermined times, generate data streams or other signals with a strong time dependence, and respond to unexpected things in a timely fashion.
Figure 1.1: The embedded system
This chapter introduces or reviews many concepts relating to computers, microprocessors, microcontrollers and embedded systems. It does this in overview form, to give a platform for further learning. We return to most concepts in later chapters, building on them and adding detail. More details can also be found in Reference 1.1.