Thursday, 19 December 2013

EMBEDDED BASICS

WHAT IS AN EMBEDDED SYSTEM?

An embedded system is a special-purpose computer system designed to perform a dedicated function. Ex: In a washing machine, mobile etc Unlike a general-purpose computer, such as a personal computer, which can be used for different applications like word processing, software development, accounting, web applications etc. an embedded system performs one or a few pre-defined tasks, usually with very specific requirements, and often includes task-specific hardware and mechanical parts not usually found in a general-purpose computer. 

It is a combination of Hardware and software that forms a component of some   larger system and is expected to function without human intervention. Typically, an embedded system consists of a single-board microcomputer with software in ROM, which starts running a dedicated application as soon as power is turned on and does not stop until power is turned off. The system is dedicated to specific tasks; design engineers can optimize it, reducing the size and cost of the product. Embedded systems are often mass-produced, benefiting from economies of scale.



 Characteristics:

 1) Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. Some also have real-time performance constraints that must be met, for reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs.

2) An embedded system is not always a separate block very often it is physically built-in to the device it is controlling

3) The software written for embedded systems is often called firmware, and is stored in read-only memory or Flash memory chips rather than a disk drive. It often runs with limited computer hardware resources: small or no keyboard, screen, and little memory.

 Real Time Issues:

         Embedded systems frequently control hardware, and must be able to respond to them in real time. Failure to do so could cause inaccuracy in measurements, or even damage hardware such as motors. This is made even more difficult by the lack of resources available.

        Almost all embedded systems need to be able to prioritize some tasks over others, and to be able to put off/skip low priority tasks in favor of high priority tasks like hardware control.

Requirements of Embedded Systems:

 Reliability:

Embedded systems will work without the need of rebooting or resetting. Hence, the hardware and software should be reliable. The system should be able to reset itself without human intervention at the time of any hardware failure. In addition, embedded systems must operate reliably under extreme environmental conditions.

 Cost Effectiveness:

If embedded system is designed for a very special purpose like in a nuclear plant, space satellites cost may not be an issue. However, when it is used for the mass market, as in CD players, toys or mobile devices cost is an important consideration. SIC are developed to reduce the hardware components and cost.

 Low Power Consumption:

Most of embedded systems are powered by batteries. Hence, power consumption must be       de-minimized to avoid draining the batteries.

 Efficient Use of Processing Power:

The processing power requirement is specified in terms of Million Instructions per second (MIPS).The MIPS required for the application has to be estimated first for choosing the processor.

Efficient Use of Memory:

Most Embedded systems do not have secondary storage such as hard disk. The memory chips available on the embedded system are only ROM for storing program and RAM for data. The developer may determine the program size and data size considering the functionality, based on which memory requirements are important.

 Appropriate Execution Time:

In real time applications, certain tasks must be performed within a specified time. Hence, analyzing the tasks to meet the performance constraints is of considerable importance.
The performance requirement also involves code optimization to maximum possible extent.

 Embedded Systems Design:

 Embedded systems consist of hardware, software, and an environment. They have in common with most computing systems. However, there is an essential difference between embedded and other computing systems: since embedded systems involve computation that is subject to physical constraints, the powerful separation of computation (software) from physicality platform and environment), which has been one of the central ideas enabling the science of computing, does not work for embedded systems. Instead, the design of embedded systems requires a holistic approach that integrates essential paradigms from hardware design, software design, and control theory in a consistent manner. We postulate that such a holistic approach cannot be simply an extension of hardware design, nor of software design, but must be based on a new foundation that subsumes techniques from both worlds. This is because current design theories and practices for hardware, and for software, are tailored towards the individual properties of these two domains; indeed, they often use abstractions that are diametrically opposed. To see this, we now have a look at the abstractions that are commonly used in hardware design, and those that are used in software design.

The embedded system design and development process is divided into four phases.
  1. creating the architecture of the system
  2. implementing the architecture
  3. testing the system
  4. maintaining the system
The embedded system design involves choosing the right processor, memory, devices and bus.
 Applications:
Ø  Embedded systems are used in many diverse fields.Embedded systems play crucial role in design and manufacture of devices and systems. Depending on their areas of usage, the embedded systems fall into different categories.
Ø  Consumer Electronics: Microwave ovens, digital cameras, CD players, DVD players, washing machines, set top box etc.
Ø  Telecommunications: Telephone switches cellular phones etc.
Ø  Medical: Biologically interfaced systems, Medical control systems, Pacemakers etc.
Ø  Automotive: Engine controllers, anti-lock brake controllers etc.
Ø  Plant control: Robots, plant monitors, industrial process systems, airplane control systems, missile guidance systems etc.

WHICH PROGRAMMING LANGUAGE SHOULD YOU USE?

Having decided to use an 8051 processor as the basis of your embedded system,
the next key decision that needs to be made is the choice of programming language.
In order to identify a suitable language for embedded systems, we might begin by making the following observations:

·         Computers (such as microcontroller, microprocessor or DSP chips) only accept instructions in ‘machine code’ (‘object codes’). Machine code is, by definition, in the language of the computer, rather than that of the programmer. Interpretation of the code by the programmer is difficult and error prone.
·         There is no point in creating ‘perfect’ source code, if we then make use of a poor translator program (such as an assembler or compiler) and thereby generate executable code that does not operate as we intended.
·         Embedded processors – like the 8051 – have limited processor power and very limited memory available: the language used must be efficient.
·         To program embedded systems, we need low-level access to the hardware: this means, at least, being able to read from and write to particular memory locations (using ‘pointers’ or an equivalent mechanism).

Of course, not all of the issues involved in language selection are purely technical:
·         No software company remains in business for very long if it generates new code, from scratch, for every project. The language used must support the creation of flexible libraries, making it easy to re-use (well-tested) code components in a range of projects. It must also be possible to adapt complete code systems to work with a new or updated processor with minimal difficulty.
·         Staff members change and existing personnel have limited memory spans. At the same time, systems evolve and processors are updated. As concern over the ‘Year 2000’ problem in recent years has illustrated, many embedded systems have a long lifespan. During this time, their code will often have to be maintained.
·         The language chosen should be in common use. This will ensure that you can continue to recruit experienced developers who have knowledge of the language. It will also mean that your existing developers will have access to sources of information Even this short list immediately raises the paradox of programming language selection.
·         From one point of view, only machine code is safe, since every other language involves a translator, and any code you create is only as safe as the code written by the manufacturers of the translator.
·         On the other hand, real code needs to be maintained and re-used in new projects, possibly on different hardware: few people would argue that machine code is easy to understand, debug or to port. Inevitably, therefore, we need to make compromises; there is no perfect solution.
·         All we can really say is that we require a language that is efficient, high-level, gives low-level access to hardware, and is well defined. In addition, – of course – the language must be available for the platforms we wish to use. Against all of these points, C scores well.

Cognitive Process in Embedded Systems:

Based on functionality and feat requirements, embedded systems can be sort out as:
  • Stand-alone embedded systems
  • Real time systems
  • Networked information appliances
  • Mobile devices

 Stand-Alone Embedded Systems:

These systems work in stand-alone mode .i.e. They take inputs, process the inputs and produce desired output. The inputs can be electrical signals from transducers or command inputs like pressing a button. The out can be of electrical form, which is used to drive another system or a LED/LCD display for displaying the information to the users.
Examples for stand-alone systems include those used in process control, automobiles, consumer electronics etc.

 Real Time Systems:

Embedded systems in which some specific task has to be done in a specific time are called real time systems. Time of completion of the task is an important criterion here.
These systems are further classified as:

  • Hard real time systems
  • Soft real time systems
In hard real time systems, there are strict deadlines for completing the task. If the deadline is not met, some disaster may occur in the system.Ex: In process control, suppose the objective is to open a valve within 30ms when a certain condition occurs in the process, if not opened may lead to some serious damage in the process.

In soft real time systems, a delay of few milliseconds in completing the task will not lead to serious implication. Ex: Considering a DVD player, if a command is given to the player from a remote control, and there is a delay of few ms in executing the command will not lead to any serious consequences.

 Networked Information Appliances:

Embedded systems that are provided with network interfaces and accessed by networks such as LAN or the internet are called networked information appliances. Such embedded
Systems are connected to a network like a network running TCP/IP protocol suite. This could be the internet or a company’s Intranet. One example of such a system could be a door –lock system with TCP/IP and HTTP server software running on it. When someone stands in front of the door, the web cameras in the door lock will send an alert to a desktop over the internet and the door can be opened through a click of a mouse.

 Mobile Devices:

Mobile devices like mobile phones; PDAs, smart phones etc are a special category of embedded systems. Since the mobile devices have resource limitations like embedded systems such as memory constraints, small size, lack of good user interfaces such as full-fledged keyboard and display they are classified as embedded systems.

No comments:

Post a Comment

share your thoughts