Sie sind auf Seite 1von 13

EMBEDDED SYSTEMS

Submitted by,
A.ANJANI,
MCA 3nd sem,
NO: 54 .
CONTENTS:
1. History
2. Introduction
3. Embedded Applications
4. Embedded Software
5. Programming Languages
6. Categories
7. Hardware Architecture
8. Issues in Embedded software Development
9. Requirements of Embedded Software
10. Conclusion
11. References
History:

The invention of Embedded System has been done after the evolution of
micro processor. That is in 1970’s.Here micro processor means small device
processing the data. In 1970’s by using there micro processor’s speed is high and
memory device is slow. To evaluate this type of problems assembly language is
invented because of slower motion of micro processors high languages are not
suitable. After this of problem evaluation in 1980’s the embedded C compilers are
developed and the control programs are written in C-language.

Definition:

Embedded system combines the fields of software and hardware in one


platform.

Embedded –something is builted into

System - some type of work is done

Embedded system means some thing is builted into hardware controller that
hardware controller are performed in applications.

Through software we can run the hardware. Embedded systems contains


programmed instructions running via processor chips. Embedded system performs
control, protection and monitoring tasks like processes machinery, environment and
communication.
Embedded applications:

Embedded systems are found in a wide range of application areas. Originally


they are used only for expensive industrial control applications, but as technology
brought down the cost of dedicated processors, they began to appear in moderately
expensive applications such as automobiles, communications and office equipment
and televisions. To days embedded systems are so inexpensive that they are used in
almost every electronic product in our life.

Application Area Examples

Aerospace Navigation systems, Automatic Landing


systems flight altitude controls, Engine
Controls, Space exploration.
Automotives Fuel injection control, Air bag control,
Passenger environmental controls, GPS
mapping antilock braking systems.
Children’s Toys Now we see so many electronic toys.
Communications Satellites, Network routers, Switches,
Hubs, Mobile communications.
Compute peripherals Printers, Scanners, Keyboards, Displays
MODEMS Hard disks drivers, CD-ROM
Home Dishwashers, Microwave ovens, Televisions, VCR’s Stereos, Fire/security
alarm systems, Lawn sprinkler controls,
Thermostats, Cameras, Clock radios,
Answering machines.
Industrial Elevator controls, Surveillance systems,
Robotics.
Instrumentation Date loggers, Oscilloscopes, Signal
generators, Signal analyzers, Power
supplies.
Medical Imaging system (X-RAY, ECG and
ultrasound), Patient monitors, Heart
pacers.
Office automation FAX machine, Copiers, Telephones, Cash
Registers, Automated teller machine
Personal Personal Digital Assistants (PDAs),
Pagers, Cell phones, Wrist Watches,
Video games, Portable MP3players, GPS,
internet appliances.

Embedded software:
The objective of this information is to help you learn how to design and
implement software for embedded systems. Although you already have some
experience writing desktop application programs in high level language, writing
embedded application programs presents some new challengers regarding reliability,
performance and cost .

Reliability expectations will place greater responsibility on programmers to


eliminate bugs and to tolerate errors and unexpected situations. Many embedded
systems have to run 24 hours a day, seven days a week,365 days a year. You can’t
just “reboot” when something goes wrong! For this reason , good coding practice and
thorough testing take on a new level of importance in the realm of embedded
processors.

Performance goals will force us to learn and apply new techniques such as
multitasking and scheduling. The need to communicate directly with sensors,
actuators, keypads, display etc., will require programmers to have a better
understanding of how alternative methods for performing input and output provide
opportunities to trade speed, complexity and cost. Although well usually program in a
high-level language for better productivity, use of these alternatives will occasionally
require that we drop to the computer and program directly in assembly language.

Programming languages:

Although it is occasionally necessary to code some parts of an embedded


application program in assembly language, most of the code in even the simplest
application is written high-level language. Rationally, the choice of language has
been C. Programs written in C are very portable from one compiler and/or target
processor to another. C compilers are available for a number of different target
processors, and they generate very efficient code.

Despite the popularity of C++ and Java for desktop application


programming, they are rarely used in embedded systems because of the large run-
time overhead required to support some of their features. For example, even a
relatively simple C++ program will produce about twice as much code as the same
program in C and the situation is much worse for large programs that make extensive
use of the run-time library.

EC++(Embedded C++) is a new language that is a proper substitute of


C++ that has many of its object-oriented facilities but that omits those non-essential
features that increase code size and impair run-time performance.

Categories:
Embedded systems can be broadly divided into the following categories.
This categorization is based on whether the system has to work as an independent unit
ot is has to be networked, whether it has to perform real time operations or not and
soon.

STAND ALONE EMBEDDED SYSTEMS

Stand-alone embedded systems work, as the name suggests, in a


standalone mode (as Opposed to a networked mode), taking input and producing
output. The input can be electrical signs from sensors, or commands from a human
being, such as the pressing of a button. The output can be electrical signals to drive
another system, or an LED or LCD display for display for displaying information to
users.

Many embedded system for process control in manufacturing units and


automobiles fall unto this category. In process control systems, the inputs come from
transducers that convert a physical entity, such as temperatures, into an electrical
signal. The electrical signals become the output that can control devices such as
valves.

In some standard alone systems, the deadlines to carryout a specific


task may not be very strict ;a few milliseconds this way or that way may not matter
much. In other words, the response time is not crucial. For example, an air
conditioning unit can be set turn on when the temperature reaches a certain level.
Other example in this category is toys, CD players, and measuring instruments.

REAL-TIME EMBEDDED SYSTEMS

Some embedded systems are required to carryout specific tasks in a


specified amount of time. Such systems are called real-time embedded systems.

Consider for example, a system that has to open a valve within 30


milliseconds when the humidity crosses a particular threshold. If the job is not carried
out within that 30 milliseconds period, a catastrophe may ensure. Such systems in
which real-time constraints have to be strictly met are called hard real-time embedded
systems. Real-time embedded systems are also extensively used in process control,
when time critical tasks have to be carried out.

Hardware architecture:
Any one who wants to program for embedded systems must have a fair
understanding of the hardware needed to run such software .

Any embedded systems is built around a processor. The central


processing unit does the necessary computations on the input it receives from various
external devices. The functionality of the CPU in an embedded systems is same as
the functionality of the CPU in a desktop, except that the in an embedded systems is
less powerful. The processor has limited internal memory, and if this internal memory
is not sufficient for given application, external memory devices are used (e.g., the
memory card often used with an MP# player). The hardware also includes any
components that facilitate the user-application interaction, such as display units,
keypads, etc. This is a general architecture applicable to both micro controllers and
microprocessors.

Processors:
The processors used in embedded systems can be of three types.
1. Micro controller.
2. Micro processor.
3. Digital signal processor.

Each of these processors is specified by clock speed (100 MHz, 200 MHz,
etc.) and data word-length (8-bit, 16-bit, 32-bit, etc). The higher the clock speeds, the
faster the processor. Similarly, bigger data word-length leads to higher precision. The
word-length also indicates the processor’s capability to address the memory. This
addressing capability is specified by the number of bits used for addressing. For
instance, an 8-bit processor can use 8 or 16bits for addressing. The following sections
describe each of the three-processor types.

MICRO-CONTROLLER:

Micro-controller is mainly of Intel’s 805x family, Motorola’s 68HCxx,


etc. A typical micro controller combines a CPU, interrupts, timer/counter, memory
(RAM, ROM, or both) and other peripherals in the same Integrated Circuit(IC).
Micro-controllers are often an ideal solution for control applications because you can
use them to build an embedded systems with little additional circuitry. The 8-bit
micro-controllers are used for process control applications such as the ones found in
toys and smart cards. If your processing power and memory requirements are high,
you need to choose a 16-bit or 32-bit processor.

MICROPROCESSOR:

A number of 16-bit and 32-bit microprocessors are available from ARM,


Atmel, Intel, Motorola and National Semiconductors, etc. In order to develop
embedded system with these processors, you need a great deal of peripheral circuit.
However , microprocessors have higher clock speeds and word-length, so they are
capable of addressing higher memory. These processors are used for high-end
applications such as handheld computers, Internet Access Devices, etc. a
microprocessor executes a collection of machine instructions that tell the processor
what to do. Based on the instructions, a microprocessor does three basic things.

Using its ALU(Arithmetic / Logic unit), a microprocessor can perform


mathematical operations like addition, subtraction , multiplication, and division.
Modern microprocessors contain complete floating – point processors that can
perform extremely sophisticated operations on large floating-point numbers.

A microprocessor can move data from one memory location to another.

A microprocessor can make decisions and jump into a new set of instructions based
on those decisions.

DIGITAL SIGNAL PROCESSOR:

The Digital Signal Processor (DSP) is a specially designed processor to


handle signals, rather than data. Processing signals (whether audio or video) is much
more complex than processing digital data signals. To process audio and video
signals, the hardware/software needs to perform an operation called filtering, in
which unwanted frequencies are removed. For example, a Low Pass Filter with a
bandwidth of 4KHz will remove unwanted frequencies above 4KHz. A DSP
facilitates easy implementation of filters. In signal processing, another important task
is to convert the signals into frequency domain using Fourier Transforms, and analyze
the spectrum of the signal in frequency domain. Analyzing a signal in frequency
domain requires intensive mathematical computation, which general-purpose
processors take a lot of time to carry out. However, the DSP carries out such
mathematical computations quickly using a special module called the Multiplier and
Accumulator. DSPs are available with various clock frequencies and word-lengths,
with each catering to different market segments (such as speed processing, high
fidelity music) .

Note: When an application involves any type of signal processing – such as in


communication, audio and video coding, etc , a signal processor is a better choice
than a general-purpose processor.

Memory :

The memory used in embedded systems can be either internal or external. The
internal memory of a processor is very limited. For small applications, if this memory
is sufficient, there is no need to use external memory. Otherwise, an external memory
device has to used.
Challenges and Issues in Embedded software Development

Developers of embedded systems have to deal with unique issues. These


issues pose interesting challenges, which are discussed in the following section.

CO-DESIGN:

Because an embedded system contain of hardware and software, deciding


which functions of the systems should be implemented in hardware and which
functions should be implements in software is a major consideration. For example,
consider the Cyclic Redundancy Check (CRC) that is used to check whether a bit
streams have errors in it. Using a mathematical algorithm, CRC is calculated for a bit
patterns, and the CRC is used to find errors in transmission. The algorithm can be
implemented either in hardware or in software. Should you choose hardware
implementation or software implementation. This is always a difficult question to
answer. Hardware implementation has the advantage that the task execution is faster
compared with that of software implementing. On the downside, a chip costs money,
consumes valuable power, and occupies space. A software implementation is better if
these are major concerns for a particular project. Moreover software implementation
offers flexibility – if the algorithm changes, it is easier to modify the software. This
issue of choosing better hardware implementation and software implementation is
known as a Co-design issue. Co-design issues should be resolved between hardware
engineers and software engineers, keeping in mind the foregoing considerations.

Another Co-design example is the implementation of the TCP/IP stack. For


decades, the stack has been implemented only through software, as it offers flexibility
to change the protocols. The TCP/IP stack is bundled with the personal computer’s
operating systems. This is acceptable because desktop computers have a lot of
primary memory (RAM), as well as secondary storage. Now, however, a signal-chip
implementation of the TCP/IP stack is available of the TCP/IP chip solution is that it
can be integrated into embedded system hardware, making the embedded system
network- enabled.

TCP/IP software implantation calls for huge amounts of memory


(RAM) , which is difficult to accommodate on embedded systems or expensive or a
given application.

EMBEDDING AN OPERATING SYSTEM:

It is possible to write embedded software without any operating system


embedded into the system. Developers can implement services such as memory
management, input/output management, and process management with a combination
of assembly language and high level language such as C. It is also possible to build
the software above the operating systems. Which is the better choice? .Writing your
own routines necessary for a particular application results in compact and efficient
code, thus saving on processing power and memory. Alternatively, a readily available
operating system can be ported to the processor. In this case, developer need not
worry about mundane things like memory management. Process management and so
on: he or she can focus on the application software development. Consequently,
development should be faster and the code should be more reliable. The latter
approach is being followed extensively nowadays. Embedded operating systems
provide the necessary Application Programming Interfaces (APIs) to develop
applications. However, note that when a commercial system is embedded into the
system kernel that goes with the system.

CODE OPTIMIZATION:

Developers of typical desktop application software need not worry much about
code optimization because the processor is powerful, plenty of memory is generally
available, and a few seconds of difference in response time may not make an
appreciable difference. Because memory and execution time are the important
constrains in embedded systems, through, developers should optimize the code to the
maximum possible extent. Though compliers perform code optimization, the
programmer still has to optimize the code for faster execution and less memory
occupation. Sometimes, to achieve the required response time, the programmer may
have to write some portions of the code in assembly language. Of course, with the
availability of sophisticated development tools, this is less of an issue in recent year.

EFFICIENT INPUT/OUTPUT:

In most embedded systems, the input interfaces have limited functionality.


For instance, only a small keypad (wit 8 or 12 function keys ) may available for
inputting data. Similarly the output interface may consist of a small number of LED’s
or a small a different ball game compared with writing a user interface with a full-
fledged keyboards, a mouse and a large display. Some embedded systems have no
input/output devices such as keyboard or display for user interaction – for example,
many systems used in process control. These systems take electrical signals as input
and produce an electrical as output. Developing and debugging such systems is much
challenging than doing the same with desktop systems. Special procedures have to be
adopted testing systems.

TESTING AND DEBUGGING:

Software for an embedded system cannot be tested on the target hardware


during the development phase because debugging will be extremely difficult. A host
system that has the development tools is used for development and initial testing , and
finally the software will be transferred to the target hardware for final testing. Testing
and debugging the software on the cost system by a actual simulation of field
conditions is very challenging. Now a days the job is made a bit simpler with the
availability of profilers that tell you which lines of code are executed and which lines
are not executed. Using the output of such profilers, you can locate the untested lines
of code and ensure that they are also executed by providing the necessary input test
data.
It is these challenges that made embedded software development a “black
art” in earlier days, and many developers used to regard embedded software
development as a tough.

Requirements of Embedded Systems :

Despite the varying types of embedded systems, they all have some
common requirements. The following sections describe each of these fundamental
characteristics.

RELIABILITY:

Embedded systems have to work without the need for the rebooting or
resetting typical of many desktop systems. This calls for very reliable hardware and
software. If, for example the embedded system comes to a halt because of a hardware
error, the system should reset itself without the need for human intervention.
Certainly, reliability is critical in any system, but we are used to resetting our desktop
systems once in a while, thanks to the unpredictability of operating system software.
However, embedded software developers must make the reliability of the hardware,
as well as that of the software, of paramount importance because the system is not
readily accessible to human intervention.

COST-EFFECTIVENESS:

If an embedded system is designed for a very special purpose, such as for a


deep space probe or for use in a nuclear plant, cost may not be an issue. However, if
the embedded system is for the mass market, such as those used in CD players, toys,
and mobile device cost is a major consideration. Choosing the right processor,
memory devices, and peripherals of critical importance. In such cases, the designers
will develop an Application Specific Integrated Circuit (ASIC) or an Application
Specific Microprocessor to reduce the hardware components and hence the cost.
Typically, a developer first creates a prototype by writing the software for a general
purpose processor and subsequently develops an ASIC to reduce the cost.

LOW POWER COSUMPTION:

Many embedded systems are powered by batteries, rather than a main


supply. In such cases, the power consumption should be minimized to avoid draining
the batteries. Hardware designers must address this issue-for example, by reducing
the number of hardware components, or by designing the processor to revert to low
power or “Sleep” mode when there is no operation to perform.

EFFICIENT USE OF PROCESSING POWER:


A wide variety of processors with varying processing powers are available
to embedded systems. Developers must keep processing power, memory and cost in
mind when choosing the right processor. Processor is the term generally used to refer
to a micro controller, a microprocessor or a Digital Signal Processor (DSP) used in
embedded systems. The processing power requirement is specified in million
instructions first, and given this estimate, the developer can choose the processor.
With the availability of many processors with the same capabilities, choosing a
processor has become a tough task nowadays. Considerations such as the cost of
development tools, support provided by the vendor and previous experience all play a
role in the choice.

EFFICIENT USE OF MEMORY:

Most embedded systems do not have secondary such as hard disk. The
memory chips available on the embedded system are only Read-Only Memory
(ROM), to hold the program and Random Access Memory (RAM), to hold the date.
Depending on the functionality, the developer many determine the program size and
the data size based on which memory requirements are more important. The cost of
memory is certainly going down, but even one dollar can make a big difference,
particularly with regard to consumer items. As most embedded systems do not have
secondary storage, flash memory is used to store the program, including the operating
system. Micro-controllers and DSPs come with onboard memory (i,e., the same
silicon contains the memory as well). Such processors are used for small-embedded
systems, as the cost generally is low and the execution generally is fast.

APPROPRIATE EXECUTION TIME:

In real-time embedded systems, certain tasks must be performed within a


specified time. Consequently , analyzing the tasks to meet such performance
constraints is of considerable importance. Normally, desktop PCs cannot achieve real
time performance. Therefore special operating systems, known as real time operating
systems, run on these embedded systems. In hard real time embedded systems, which
are subject to very strict to very strict deadlines for performing specific tasks, the
timing analysis is of great importance. In Soft real-time systems, occasionally the task
may not be performed in a timely manner. The software development needs to
ascertain where the embedded system is a hard real-time system and perform the
performance analysis according. The performance requirement also calls for code
optimization to the maximum possible extent. Though software is generally
developed in a high-level language, some computation intensive portions of the code
may need to be written in assembly language in order for the desired real-time
performance to be realized. In such cases, of course you need to learn the assembly
languages of the target processor.
References
Books:

1. Programming for Embedded Systems


………… Wiley

2. Fundamentals of Embedded Software


………….. Denial W.Lewis