Overview of an Embedded System
Computer systems are everywhere. They fall into essentially two separate categories. The first and most obvious is that of the desktop computer. This is the machine that first comes in our mind when we talk about computers. Desktop computers are designed to be flexible and to meet a wide range of user needs. The end users can change the functionality of a desktop computer by simply changing the application program. One moment you may be using it as a word processor, the next you as an mp3 player or a game station.
The second type of computer is the embedded computer (or embedded system), a computer that is embedded into a bigger electronics system and repeatedly carrying out a particular function, often going completely unrecognized by the system’s user. If you ask somebody how many computers he has got in his home, he would probably count his desktop computer and his laptop. However, computers have always been embedded into all sorts of everyday items. In fact, he may have over 20 computers, hidden or embedded inside washing machines, TVs, digital cameras, cell phones, ovens, air conditioners, DVD players, etc. Unlike desktop computers, an embedded computer is normally dedicated to a specific task.
Definition: An embedded system is a computer system that is built to control one or a few dedicated functions, and is not designed to be programmed by the end user in the same way that a desktop computer is.
A user can make choices concerning the functionality but cannot change the system functionality by adding or replacing software. For example, a programmable digital thermostat has an embedded system that has a dedicated function of monitoring and controlling the surrounding temperature. You may have choices for setting the desired low and high temperatures but you cannot just change its functionality as a temperature controller. The software for an embedded system is often referred to as firmware, and is contained in the system’s non-volatile memory.
In most cases, an embedded system is used to replace an application-specific electronics in the consumer products. By doing so, most of the system’s functionality is encapsulated in the firmware that runs the system, and it is possible to change and upgrade the system by changing the firmware, while keeping the hardware same. This reduces the cost of production even lower because many different systems can share the same hardware base and the functionality is determined by the firmware loaded into them.
The another advantage of using an embedded computer to replace a dedicated electronics circuit is the protection of intellectual property. If your design is completely hardware based, it is easier to steal the design. All you need is to identify the circuit components and trace the tracks on the circuit board. With an embedded system, the hardware can be identified but the software, which really supplies the system’s functionality, can be hidden and more difficult to crack.
A short list of embedded systems
Cell phones, digital cameras, battery chargers, digital thermostats, traffic light controllers, digital watches, washers and dryers, ovens, fax machines, printers, televisions, DVD players, factory control, satellite phones, modems, network cards, pagers, portable video games, photocopiers, home security systems, mp3 players, ipod, cruise control, anti-lock brakes, air bag control, fuel injection control, flight attitude control, dish washers, answering machines, digital recorders, elevator control, surveillance systems, robots, voice recognizers, thumb readers, avionic systems, radar systems, navigation devices, camcorders, data loggers, oscilloscopes, signal generators, imaging systems, patient monitoring systems, etc. They are everywhere!
Inside the embedded system
After learning that embedded systems are virtually found everywhere, lets explore the key components inside an embedded system.
At the heart of the embedded system is the central processing unit or processor. It is the hardware that executes the software and brings life to the embedded system. It also controls the activities of all the other circuits. There are varieties of processors available for embedded systems, and the main criteria for selection is “Can it provide the processing power needed to perform the tasks within the system?” Besides, the system cost, power consumption, software development tools, and component availability are also important factors to be considered while selecting a processor for embedded system design.
The embedded system also has memory, often several different types in one system. The memory is used to store the software that the processor will run. It also provides storage for data such as program variables, intermediate results, status information and any other data generated throughout the operation. The memory is an important part of any embedded system because it may dictate how the software is designed, written, and developed.
An embedded system communicates with the outside world through peripherals. The main types of peripherals that are used include:
- Digital inputs and outputs: These are simple external pins whose logic state can be controlled by the processor to either be a logic 1 or a logic 0. They can also be used as input pins so that the processor can receive binary inputs from the external world. They can be used individually or grouped together to create parallel ports.
- Serial interfaces: These are interfaces that send or receive data using one or two pins in a serial mode. They are less complex to connect but are more complicated to program because the data may also be augmented with additional information as required by the data transfer protocol.
- Analog to digital converters: While processors operate on the digital data, the surrounding world is analog in nature. Therefore, interfaces between the system and the external world requires analog to digital conversions and vice versa.
- Displays: Displays are used by the processor to display the status information, error messages, and output results. They could be simple LEDs, seven segment displays, or character LCD panels.
- Keypads: Keypads are used by the end user to provide inputs to the embedded system. The inputs could be anything such as entering the password, changing functional settings, switching between menu items, etc.
Lets now discuss about the embedded system inside a digital thermostat. The functional block diagram is shown below.
The surrounding temperature is sensed by the thermostat (a temperature sensor) and is converted to a proportional analog voltage. The processor cannot manipulate this signal directly, so it is converted to an equivalent digital number through a process called analog-to-digital conversion (ADC). The processor then compares this temperature reading with the high and low temperatures settings defined by the user, and turns the heater/AC on or off if required. The user uses Keypad to enter the temperature settings, which are saved into the memory. The processor displays the temperature settings and the current temperature on the LCD screen. The software to perform the entire function of monitoring and controlling the temperature is stored in the memory. The processor reads instructions from the memory and executes them.
References:Embedded Systems Design by Steve Heath Designing Embedded Hardware by John Catsoulis Embedded System Design: A unified hardware/software introduction by Vahid and Givargis
We recommend EasyEDA for circuit design and PCB prototype