by July 1, 2005 0 comments

Embedded systems have invaded our lives. From a washing machine to an anti-lock breaking system of our cars, from cellphones to DVD players, they are everywhere. While there was a time where hand-written assembly code was the only option to program a processor, the complexity of today’s application makes this reasonable only for the critical parts. Advanced embedded systems no longer consist of a single micro controller. They are now full computing systems containing several processors, hardware accelerators, buses, memories and peripherals. A system-level approach is necessary to design such systems and address simultaneously the challenges of the hardware, the OS and the applications. In this scenario, compilers and software tools play an increasingly important role.

Embedded systems are computers (microprocessors) enclosed (embedded) in customized hardware. An embedded system is any electronic system that uses a central processing unit (CPU) chip, but that is not a general-purpose workstation, desktop computer or notebook. Such systems generally use microprocessors or customized chips or both. In embedded systems the software is permanently set into the ROM or Flash memory chip in contrast to a general-purpose computer that loads its programs into RAM each time. An embedded system is an application-oriented special computer system, which is scalable on both software and hardware. It can satisfy the strict requirements of functionality, reliability, cost, volume and power consumption of the particular application. 

With the rapid development of IC design and manufacturing, CPUs have become cheap. A lot of consumer electronics devices have embedded CPUs and thus have become embedded systems eg PDAs, cellphones, VCRs, industrial robot control or even your toasters can be an embedded system. A series of emerging equipment such as set-top box, home media center, portable media player, mobile DVD etc are joining the embedded systems camp. With the continuing convergence of communication and computing functions within devices, embedded systems are becoming more complex and thus creating demands for more powerful processors and peripherals. Some reports expect that the demand on embedded CPUs is ten times as large as for general purpose PC CPUs.

A simple embedded system
One possible organization for an embedded system is shown in the fig. In addition to the CPU and memory hierarchy, there are a variety of interfaces that enable the system to measure, manipulate and otherwise interact with external environment. Some differences with desktop computing could be:

  • The human interface may be as simple as flashing light or as complicated as a real-time robotic vision
  • The diagnostic port may be used for diagnosing the system that is being con trolled-not just for diagnosing the computer
  • Special-purpose field programmable (FPGA), application specific (ASIC) or even non-digital hardware may be used to increase performance or safety
  • Software often has a fixed function and is specific to the application

In addition to the emphasis on interaction with the external world, embedded systems also provide functionality specific to their applications. Instead of executing spreadsheets, word processing and engineering analysis, embedded systems typically execute control laws, finite state machines and signal processing algorithms. They must often detect and react to faults in both the computing and surrounding electro-mechanical systems, and must manipulate application-specific
user-interface devices. The usual reason for embedding a computer is to interact with the environment, often by monitoring and controlling external machinery. In order to do this, analog inputs and outputs must be transformed to and from digital signal levels. Additionally, significant current loads may need to be switched in order to operate motors, light fixtures and other actuators. All these requirements can lead to large computer circuit boards dominated by non-digital components. In some systems ‘smart’ sensors and actuators (that contain their own analog interfaces, power switches and small CPUs) may be used to off-load interface hardware from the central embedded computer. Embedded systems typically have tight constraints on both functionality and implementation. In particular, they must guarantee real-time operation reactive to external events, conform to size and weight limits, budget power and cooling consumption, satisfy safety and reliability requirements, and meet tight cost targets.

A typical micro controller has bit manipulation instructions, easy and direct access to I/O, and quick and efficient interrupt processing. Therefore, a microcontroller is a highly integrated device, which includes one chip, all or most of the parts needed to perform an application control function. Microcontrollers come in many varieties. Depending on the power and features that are needed, customers can choose a 8, 16 or 32-bit microcontroller. A typical microcontroller unit (MCU) block diagram is shown: CPU is the brain of the system that processes all data and their travel along the bus. microcontrollers are frequently found in home appliances, cars (engine control, diagnostics, climate control), environmental control (green house, factory, home), instrumentation, aerospace and thousands of other. In many cases, more than one processor can be found. The purpose of microcontroller is to implement a set of control function in the most cost effective way. In a typical application, the MCU has to manage several tasks according to their priority or to the occurrence of external events (new commands sent by the key board, external temperature rise, etc).

Embedded System Development
Developing software and hardware for microcontroller-based systems involves the use of a range of tools that include editors, assemblers, compilers, debuggers, simulator, emulator and Flash/OTP programmers. The development cycle involves:

  • Writing the code using text editor
  • Translating the code using assembler/complier
  • Debugging the code using debugger tools including emulators
  • Programming a Flash or OTP to build up a first functional prototype of the system 

The software code for a microcontroller is written in a programming language of choice (often Assembly or ‘C’). Programming in Assembly, results in the most compact and fastest code. A higher-level language like C is independent of a microcontroller specific architecture. The penalty for a more portable code is a large code size (20% to 40% compared to Assembly). The source code is translated into instructions that the microcontroller can actually execute. A microcontroller instruction set is represented by ‘Op code’. Op codes are unique sequence of ‘0’ and ‘1’. They are represented by hex code represented by 4 bits within a byte.

Linker links code modules saved in different files together into a single final program. Libraries help to manage, organize and revise the control of libraries of re-usable code modules. A debugger is a software running on the PC, which has to be tightly integrated with the emulator that you can use to validate your code. For this reason all emulator manufacturers ship their debugger software with their tools. A debugger allows you to download your code into the emulator’s memory and then control all of the functions of the emulator from a PC. Common debugging features include the capability to examine and modify the microcontrollers on-chip registers, data- and program-memory, pausing or stopping program executing at defined program locations by setting break points; single-stepping (execute one instruction at a time) through the code; and looking at history of executed code (trace). In embedded system, the software is permanently set into ROM or Flash memory chip. Firmware is the name of software that is enclosed (embedded) in hardware devices eg in one or more ROM/Flash memory. 

As process technologies get ever smaller, an increasing amount of system functionality can be integrated on a single chip. In some instances, this has led to the implementation of entire system on-chip or SoCs. Programmable SoCs integrate a processor, programmable logic and SRAM. All programmable SoCs introduced so far are SRAM based and, therefore, also require an external EEPRM or Flash memory to store MCU code. The programmable system memory is preferable for designs where the programmable logic requirement is minimal, the firmware storage requirement is large, SRAM requirement is large, and/or there are substantial data logging requirements.

Market potential
Today, embedded systems are every where-homes, offices, car, departmental stores, factory floors, hospitals, automobiles-but the user can neither see nor change them. North America is the largest consumer but Asia-Pacific will grow at a faster rate. Nasscom estimates that the global embedded software market is worth $21 billion. Telecom, computing and Datacom application account for 34% of the total, followed by consumer electronics (20%), industrial automation (19%), automotive (10%) and office automation (8%). The market is projected to grow at 16% CAGR in the next three years, with Asia-Pacific leading the growth.

Automotive market
The automotive market is the most important single force in the microcontroller market, especially at its higher end. Many microcontroller families were developed particularly for automotive applications and were subsequently modified to serve other embedded applications. This market is demanding in terms of device performance and component reliability. Electronics must operate under extreme temperatures and be able to withstand vibration, shock and EMI. ST has been responding to the automotive challenge for many years. The ST72561 is a family of car- networking devices addressing CAN and LIN (Local Interconnect Network) bus applications. All devices in this family are based on a common industry standard 8-bit core, featuring an enhanced instruction set and are available with Flash or ROM program memory. This family of products is targeting car body electronics, as well as power train, with a focus on low power consumption and a wide range of packages. The device is also suited to industrial and consumer applications requiring CAN or UART communication. 

The day isn’t too far when your refrigerator will take stock of your groceries; or when after a holiday you can dial home from the airport and set your room temperature, heat your food- using the power of embedded technology. Imagination will be one of the key drivers of embedded technology.

By Dr P C Jain, STMicroelectronics

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.