0% found this document useful (0 votes)
20 views43 pages

Overview of Embedded Systems

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views43 pages

Overview of Embedded Systems

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

System

A system is a way of working, organizing or doing one or many tasks according to a fixed plan,
program, or set of rules. A system is also an arrangement in which all its units assemble and work
together according to the plan or program.

Consider a watch. It is a time-display system. Its parts are its hardware, needles and battery with
the beautiful dial, chassis and strap. These parts organize to show the real-time every second and
continuously update the time every second. The system-program updates the display using three
needles after each second. It follows a set of rules. Some of these rules are as follows: (i) All
needles move only clockwise. (ii) A thin and long needle rotates every second such that it returns
to the same position after a minute. (iii) A long needle rotates every minute such that it returns to
the same position after an hour. (iv) A short needle rotates every hour such that it returns to the
same position after twelve hours. (v) All three needles return to the same inclination after twelve
hours each day.

Consider a washing machine. It is an automatic clothes-washing system. The important hardware


parts include its status display panel, the switches and dials for user-defined programming, a motor
to rotate or spin, its power supply and control unit, an inner water-level sensor, a solenoid valve
for letting water in, and another valve for letting water drain out. These parts organize to wash
clothes automatically according to a program preset by a user. The system-program is activated to
wash the dirty clothes placed in a tank, which rotates/spins in preprogrammed steps and stages. It
follows a set of rules. Some of these rules are as follows: (i) Follow the steps strictly in the
following sequence. Step I: Wash by spinning the motor according to a programmed period. Step
II: Rinse in fresh water after draining out the dirty water, and rinse a second time if the system is
not programmed in water-saving mode. Step III: After draining out the water completely, spin the
motor fast for a programmed period for drying by centrifuging out water from the clothes. Step
IV: Show the wash-over status by a blinking display. Sound the alarm for a minute to signal that
the wash cycle is complete. (ii) At each step, display the process stage of the system. (iii) In case
of an interruption, execute only the remaining part of the program, starting from the position when
the process was interrupted. There can be no repetition from Step I unless the user resets the system
by inserting another set of clothes and resets the program.

Embedded System

Definition: One of the definitions of an embedded system is as follows:


"An embedded system is a system that has embedded software and computer hardware, which
makes it a system dedicated to an application(s) or a specific part of an application or product or a
part of a larger system."

Embedded systems have been defined in books published recently in several ways. Given below
is a series of definitions from others in the field:
Wayne Wolf, author of Computers as Components - Principles of Embedded Computing System
Design:
"What is an embedded computing system? Loosely defined, it is any device that includes a
programmable computer but is not intended to be a general-purpose computer" and a fax machine
or a clock built from a microprocessor in an embedded system computing”.

Todd D. Morton, author of Embedded Microcontrollers:


“Embedded Systems are electronic systems that contain a microprocessor or microcontroller, but
we do not think of them as computers—the computer is hidden or embedded in the system.”

David E. Simon, author of An Embedded Software Primer:


“People use the term embedded system to mean any computer system hidden in any of these
products.”

Tim Wilmshurst, author of An Introduction to the Design of Small-Scale Embedded Systems, with
examples from PIC, 80C51, and 68HC05/08 microcontrollers:

1. “An embedded system is a system whose principal function is not computational, but which
is controlled by a computer embedded within it. The computer is likely to be a
microprocessor or microcontroller. The word embedded implies that it lies inside the
overall system, hidden from view, forming an integral part of {the} greater whole.”
2. “An embedded system is a microcontroller-based, software-driven, reliable, real-time
control system, autonomous, or human- or network-interactive, operating on diverse
physical variables and in diverse environments, and sold into a competitive and cost-
conscious market.”

A computer is a system that has the following or more components:

1. A microprocessor
2. A large memory of the following two kinds:
o (a) Primary memory (semiconductor memories: Random Access Memory (RAM),
Read Only Memory (ROM), and fast-accessible caches)
o (b) Secondary memory (magnetic memory located in hard disks, diskettes, and
cartridge tapes; optical memory in CD-ROMs or memory sticks in mobile
computers) used for loading different user programs into the primary memory and
running them.
3. I/O units such as touch screens, modems, fax-modems, etc.
4. Input units such as keyboards, mice, digitizers, scanners, etc.
5. Output units such as LCD screens, video monitors, printers, etc.
6. Networking units such as Ethernet cards, front-end processor-based servers, bus drivers,
etc.
7. An operating system (OS) that has general-purpose user and application software in the
secondary memory.
An embedded system is a system that has three main components embedded into it:

1. It embeds hardware similar to a computer. (Figure 1.1 shows the hardware units of an
embedded system.) Its software is usually embedded in the ROM or flash memory, so it
does not typically need a secondary hard disk or CD memory as in a computer.
2. It embeds main application software, which may concurrently perform a series of tasks,
processes, or threads.
3. It embeds a real-time operating system (RTOS), which supervises the application
software running on hardware and organizes resource access based on the priorities of tasks
in the system. It provides mechanisms for the processor to run processes as scheduled and
to context-switch between various processes. A small-scale embedded system may not
include an RTOS.

Characteristics:
An embedded system is characterized by the following:

1. Real-time and multirate operations, which define how the system works, reacts to
events, and schedules its functions in real-time. It follows a plan to control latencies and
meet deadlines. (Latency refers to the waiting period between running the codes of a task
or interrupt service routine and the instance).

The different operations takes place at distinct rates. For example, audio, video, data, network
stream and events have different rates and time constraints. (2) Complex algorithms. (3)
Complex graphic user interfaces (GUIS) and other user interfaces. (4) Dedicated functions.

Constraints An embedded system is designed keeping in view three constraints: (1) available
system- memory, (2) available processor speed, (3) the need to limit power dissipation when
running the system continuously in cycles of 'wait for events', 'run', 'stop', 'wake-up' and 'sleep'.
The system design or an embedded system has constraints with regard to performance, power,
size and design and manufacturing costs.

PROCESSOR EMBEDDED INTO A SYSTEM

A processor is an important unit in the embedded system hardware. It is the heart of the
embedded system. Knowledge of basic concept of microprocessors and microcontrollers is
must for an embedded system designer. A reader may refer to a standard text or the texts listed
in the 'References' at the end of this book for an in- depth understanding of microprocessors,
microcontrollers and DSPs that are incorporated in embedded system design. Chapter 2 will
explain 8051 and a few processors.

Embedded Processors in a System

A processor has two essential units: Program Flow Control Unit (CU) and Execution Unit
(EU). The CU includes a fetch unit for fetching instructions from the memory. The EU has
circuits that implement the instructions pertaining to data transfer operations and data
conversion from one form to another. The EU includes the Arithmetic and Logical Unit (ALU)
and also the circuits that execute instructions for a program

control task, say, halt, interrupt, or jump to another set of instructions. It can also execute
instructions for a call or branch to another program and for a call to a function.

A processor runs the cycles of fetch-and-execute. The instructions, defined in the processor
instruction set, are executed in the sequence that they are fetched from the memory. A
processor is in the form of an IC chip; alternatively, it could be in core form in an Application
Specific Integrated Circuit (ASIC) or System on Chip (SoC). Core means a part of the
functional circuit on the Very Large Scale Integrated (VLSI) chip.

An embedded system processor chip or core can be one of the following.

1. General Purpose Processor (GPP): A GPP is a general-purpose processor with instruction


set designed not specific to the applications.

(a) Microprocessor.

(b) Embedded Processor

2. Application Specific Instruction-Set Processor (ASIP). An ASIP is a processor with an


instruction set designed for specific applications on a VLSI chip.

(a) Microcontroller

(b) Embedded microcontroller

(c) Digital Signal Processor (DSP) and media processor


(d) Network processor, IO processor or domain-specific programmable processor

3. Single Purpose Processors as additional processors: Single purpose processor examples


are as follows: (1) Coprocessor (e.g., as used for graphic processing, floating point processing,
encrypting, deciphering. discrete cosine transformation and inverse transformation or TCP/IP
protocol stacking and network connecting functions). (2) Accelerator (e.g.. Java codes
accelerator). (3) Controllers (e.g., for peripherals, direct memory accesses and buses).

4. GPP or ASIP cores integrated into either an ASIC or a VLSI circuit or a Field Programmable
Gate Array (FPGA) core integrated with processor units in a VLSI (ASIC) chip

5. Application Specific System Processor (ASSP).

6. Multicore processors or multiprocessor

For a system designer, the following are important considerations when selecting a processor:

1. Instruction set

2. Maximum bits in an operand (8 or 16 or 32) in a single arithmetic or logical operation

3. Clock frequency in MHz and processing speed in Million Instructions Per Second (MIPS)
or in an alternate metric Dhrystone for measuring processing performance [Section 2.6]

4. Processor ability to solve complex algorithms while meeting deadlines for their processing

A microprocessor or GPP is used because: (i) processing based on the instructions available in
a predefined general-purpose instruction set results in quick system development. (ii) Once the
board and I/O interfaces are designed for a GPP, these can be used for a new system by just
changing the embedded software in the ROM. (iii) Ready availability of a compiler facilitates
embedded software development in high-level languages. (iv) Ready availability of well-tested
and debugged processor-specific APIs (Application Program Interfaces) and codes previously
designed for other applications results in new systems developed quickly.

Microprocessor

The CPU is a unit that centrally fetches and processes a set of general-purpose instructions.
The CPU instruction set includes instructions for data transfer operations, ALU operations,
stack operations, IO operations and program control, sequencing and supervising operations.
The general-purpose instruction set is always specific to a specific CPU. Any CPU must
possess the following basic functional units:

1. A control unit that fetches and controls the sequential processing of a given command or
instruction and communicates with the rest of the system.
2. An ALU that undertakes arithmetic and logical operations on bytes or words. It may be
capable of processing 8, 16, 32 or 64-bit words at an instant.

A microprocessor is a single VLSI chip that has a CPU and may also have some other units
(e.g., caches, floating point processing arithmetic unit, pipelining and superscaling units) that
are additionally present and that result in faster processing of instructions.

The earlier generation microprocessor's fetch-and-execute cycle was guided by a clock


frequency of the order of ~4 MHz. Processors now operate at a clock frequency of 4 GHz and
even have multiple cores. In early 2002, it became possible to design Gbps (Giga bit per
second) transceiver and encryption engines in a few highly sophisticated embedded systems
using processors that operate on GHz frequencies. A transceiver is a transmitting cum
receiving circuit that has appropriate processing and controls units, for example, for controlling
bus-collisions. An encryption engine is a system that encrypts the data to be transmitted on the
network.

Intel 80x86 (also referred as x86) processors are the 32-bit successors of 8086. [The x here
refers to an 8086 extended for 32 bits.] Examples of 32-bit processors in 80x86 series are Intel
80386, 80486 and Pentiums (a new generation of 32- and 64-bit microprocessors is the classic
Pentium series). IBM PCs use 80x86 series and the embedded systems incorporated inside the
PC for specific tasks (like graphic accelerator, disk controllers, network interface card) use
these microprocessors.

High performance processors have pipeline and superscalar architecture, fast ALUS and
Floating-Point Processing Units (FLPUs). [A pipeline architecture means that the instructions
have between 3 and 9 stages. Different instructions are at different stages of the pipeline at any
given instance. A superscalar architecture refers to two or more sets of instructions executing
in parallel pipelines.]

The important microprocessors used in the embedded systems are ARM, 68HCxxx, 80x86 and
SPARC family of microprocessors.

A microprocessor is used as general-purpose processor when large embedded software has to


be located in the external memory chips.

Microcontroller

A microcontroller is an integrated chip that has processor, memory and several other hardware
units in it; these form the microcomputer part of the embedded system. Figure 1.2 shows the
functional circuits present (in solid boundary boxes) in a microcontroller. It also shows the
application-specific units (in dashed boundary boxes) in a specific version of a given
microcontroller family.

Just as a microprocessor is the most essential part of a computing system, a microcontroller is


the most essential component of a control or communication circuit. A microcontroller is a
single-chip VLSI unit (also called 'microcomputer'), which, though having limited
computational capabilities, possesses enhanced input- output capabilities and a number of on-
chip functional units. Microcontrollers are particularly suited for use in embedded systems for
real-time control applications with on-chip program memory and devices.

A few of the latest microcontrollers also have dual core and high computational and superscalar
processing capabilities. Important microcontroller chips for embedded systems are 8051,
8051MX, 68HC11xx, HC12xx, HC16xx, PIC 16F84 or 16C76, 16F876 and PIC18,
microcontroller enhancements of ARM9/ARM7 from ARM, Intel, Philips, Samsung and ST
microelectronics.
Figure 1.3 shows commonly used microcontrollers in small-, medium- and large-scale embedded
systems. Choosing a microcontroller as a processing unit depends upon the application-specific
features in it.
A microcontroller is used when a small or part of the embedded software has to be located in the
internal memory and when on-chip functional units such as the interrupt-handler, port, timer, ADC,
PWM and CAN controller are required.
Single Purpose Processors
Single purpose processors used in embedded systems include:
1. Coprocessor (for example, for floating point processing).
2. Graphics processor: An image consists of a number of pixels. For example, Quarter common
intermediate format-Quarter-CIF images have 144 x 176 (horizontal x-axis x vertical y-axis)
pixels. Video frames have 525 x 625 pixels. The video graphic adapter (VGA) format of e-mailing
and web pages has 640x480=307,200 pixels. A separate graphics processor is required for
functions such as, for example, gaming, display from graphics memory buffers and to move
(translate on screen) and rotate an image or its segments.
3. Pixel coprocessor: High-resolution pictures have formats: 2592 x 1944 pixels = 5,038,848
pixels; 2592 x 1728 3.2 M; 2048 x 1536 = 3 M and 1280 x 960 1 M. A pixel coprocessor is required
in digital cameras for displaying images directly or after operations such as rotate right, rotate-left,
rotate- up, rotate-down, shift to next, shift to previous.
4. Encryption engine: A suitable algorithm runs in this processor to encrypt data for secure
transmission.
5. Decryption engine: A suitable algorithm runs in this processor to decrypt the encrypted data at
receiver's end.
6. A discrete cosine transformation (DCT) and inverse transformation (DCIT) processor is required
in speech and video processing.
7. Protocol stack processor: A protocol stack, which has a number of header words, is prepared
before an application data is sent to a network. At the receiver's end, the protocol stack is received
and application data is accepted accordingly. A TCP/IP protocol stack processor processes TCP/IP
network data.
8. Network processor: A network processor's functions are to establish a connection, finish, send
and receive acknowledgements, send and receive retransmission requests and check and correct
received data frame errors. The network processor's functions include all protocol stack-processing
functions.
9. Accelerator (for example, Java codes accelerator). The accelerator is a coprocessor that
accelerates computations by taking advance actions that are just-in-time compilations of the next
object in Java programs.
10. CODEC (Coder and Decoder): A CODEC is a processor circuit that encodes input and decodes
the encoded information or bits or signals into a complete set of bits or original signal. Voice,
speech, image, video signals and bits are encoded for storing or transmission and decoded from
the stored or received bits or signal for display or playing. The CODEC functions as a compression
and decompression unit for voice, speech, image or video signals.
11. JPEG CODEC: This is a processor for jpg compression and decompression. The Joint
Photographic Experts Group (JPEG) is an International Telecommunication Union for Telecom
(ITU-T) and International Standards Organization (ISO) committee.
12. MPEG CODEC: The Motion Pictures Experts Group (MPEG) recommends CODEC standards
for video. MPEG3 CODEC is a processor for mp3 compression and decompression. MPEG 2 or
3 or 4 compression of audio/video data streams is done before storing or transmitting, and
decompression is done before retrieving or playing files. For MPEG compression and
decompression algorithms, if GPP-embedded software is run, then separate DSPs are required to
achieve real-time processing. 13. Controller (e.g., for peripheral, direct memory access or bus).
Single purpose processors are used for specific applications or computations or as controllers for
peripherals, direct memory accesses and buses.
EMBEDDED HARDWARE UNITS AND DEVICES IN A SYSTEM
Power Source
Most systems have a power supply of their own. The Network Interface Card (NIC) and Graphic
Accelerator are examples of embedded systems that do not have their own power supply and
connect to PC power- supply lines. The supply has a specific operation range or a range of voltages.
Various units in an embedded system operate in one of the following four power ranges: 5.0
V±0.25 V, 3.3 V±0.3 V, 2.0 V±0.2 V and 1.5 V+0.2 V. There is generally an inverse relationship
between propagation delay in the gates and operational voltage. Therefore, the 5 V system
processor and units are used in most high-performance systems.
Certain systems do not have a power source of their own: they connect to external power supply
or are powered by the use of charge pumps (made up of a circuit of diode and capacitor that
accumulate charge from the bus signals through which they connect or network to the host or from
wireless radiation).
Low voltage operations
1. In portable or hand-held devices such as a cellular phone [when compared to 5 V, a CMOS 2 V
circuit power dissipation reduces by one-sixth, ~ (2 V/5 V)2. This also increases the time intervals
needed for recharging a battery by a factor of six.].
2. In a system with smaller overall geometry, low voltage system processors and IO circuits
generate lesser heat and thus can be packed into a smaller space.
A power supply source or a charge pump is essential in every system.
Clock Oscillator Circuit and Clocking Units
The clock controls the time for executing an instruction. After the power supply, the clock is the
basic unit of a system. A processor needs a clock oscillator circuit. The clock controls the various
clocking requirements of the CPU, of the system timers and the CPU machine cycles. The machine
cycles are for fetching codes and data from memory and then decoding and executing them at the
processor and for transferring the results to memory.
For processing units, a highly stable oscillator is required and the processor clock-out signal
provides the clock for synchronizing all system units with the processor.
System Timers and Real-time Clocks
A timer circuit is suitably configured as the system-clock, which ticks and generates system
interrupts periodically; for example, 60 times in 1s. The interrupt service routines then perform the
required operation.
A timer circuit is suitably configured as the real-time clock (RTC) that generates system interrupts
periodically for the schedulers, real-time programs and for periodic saving of time and date in the
system.
The RTC or system timer is also used to obtain software-controlled delays and time-outs. An RTC
functions as driver for software timers (SWTS).
Microcontrollers also provide internal timer circuits for counting and timing devices.
To schedule the various tasks and for real-time programming, an RTC or system clock is needed.
The clock also drives the timers for various timing and counting needs in a system.
Reset Circuit, Power-up Reset and Watchdog-Timer Reset
The program counter (PC) holds the address from where the instruction is to be fetched for
execution. In 80x86 processors, the instruction pointer (IP) holds that address. A code segment
register (CS) holds the base address of the code memory segment. The CS address equals the code
starting address when the IP = 0 at the start of a code segment. The IP increments when the program
executes the codes.
Reset means that the processor begins the processing of instructions from a starting address. That
address is one that is set by default in the processor PC (or IP and CS in x86 processors) on a
power-up. From that address in memory, program-instructions are fetched following the reset of
the processor. A program that is reset and runs on a power-up can be one of the following: (i) A
system program that executes from the beginning. (ii) A system boot-up program. (iii) A system
initialization program.
In certain processors, for example, 68HC11 and HC12, there are two start-up addresses. One is
based on the power-up reset vector and the other on the reset vector after the reset instruction or
after a time-out (for example, from a watchdog timer). The processor fetches the bytes for the PC
from the first power-up reset vector on power-up. The processor fetches the bytes for the PC from
the second reset vector on the watchdog timer timing out or on executing the reset instruction.
The reset circuit activates for a fixed period (a few clock cycles) and then deactivates. The
processor circuit keeps the reset pin active and then deactivates to let the program proceed from a
default beginning address. The reset pin or the internal reset signal, if connected to the other units
(for example, the IO interface or the serial interface) in the system, is activated again by the
processor; it becomes an outgoing pin to enforce a reset state in other sister units of the system.
On deactivation of the reset that succeeds the processor activation, a program executes from a
start-up address.
Reset can be activated by an external reset circuit that activates on power-up, on switching-on reset
of the system or on detection of a low voltage (e.g. <4.5 V when what is required is 5 V on the
system supply rails). This circuit output connects to a pin called the reset pin of the processor. This
circuit may be a simple RC circuit, an external IC circuit or a custom-built IC. Examples of ICs
are MAX 6314 and Motorola MC 34064.
Alternatively, it can also be activated by any one of the following: (i) software instruction; (ii)
time-out by a programmed timer known as a watchdog timer (or on an internal signal called COP
in 68HC11 and 68HC12 families); (iii) a clock monitor detecting a slowdown below certain
frequency.
The watchdog timer is a timing device that resets the system after a predefined timeout. It is
activated within the first few clock cycles after power-up. It has a number of applications. In many
embedded systems reset by a watchdog timer is very essential because it helps in rescuing the
system if a fault develops and the program gets stuck. On restart, the system can function normally.
Most microcontrollers have on-chip watchdog timers. The watchdog timer device is described in
detail in Section 3.7.
Consider a system controlling temperature. Assume that when the program starts executing, the
sensor inputs work all right. However, before the desired temperature is achieved, the sensor circuit
develops some fault. The controller will continue delivering the current nonstop if the system is
not reset. Consider another example of a system for controlling a robot. Assume that the interfacing
motor control circuit in the robot arm develops a fault during the run. In such cases, the robot arm
may continue to move unless there is a watchdog timer control. Otherwise, the robot will break its
own arm!
When a program executes the program counter increments or changes. An important circuit that
associates a system is its reset circuit that can change the program counter to a power-up default
value. A program that is reset and runs on a power-up can be one of the following: (i) A system
program that executes from the beginning. (ii) A system boot-up program, (iii) A system
initialization program.
The watchdog timer reset is a required feature in control applications.
Memory
In a system, there are various types of memory. Figure 1.4 shows a chart for various forms of
memory that are present in systems. These are as follows:
1. Internal RAM of 256 or 512 bytes in a microcontroller for registers, temporary data and stack.
2. Internal ROM/PROM/E PROM for about 4 kB to 64 kB of program (in the case of
microcontrollers).
3. External RAM for the temporary data and stack (in most systems) or internal caches (in the case
of certain microprocessors).

4. Internal flash (in many systems the results of processing can be saved in nonvolatile memory:
for example, system status periodically and images, songs, or speeches after suitable format
compression).
5. Memory stick (or card): video, images, songs, or speeches and large storage in digital camera
and mobile systems. Sony memory stick Micro (M2) is of size 15x12.5x1.2 mm and has a flash
memory of 2 GB. It has a data transfer rate of 160 Mbps (mega bit per second) and PRO-HG 480
Mbps and 120 Mbps write [since Dec. 2006.]
6. External ROM or PROM for embedding software (in almost all systems other than
microcontroller- based systems).
7. RAM memory buffers at ports.
8. Caches (in pipelined and superscalar microprocessors).
Table 1.1 details the functions assigned in embedded systems to the memories. ROM or PROM or
EPROM embeds the software specific to the system.
Table 1.1 Functions assigned to the memories in a system
A system embeds (locates) the following either in the internal flash or ROM, PROM or in an
external flash or ROM or PROM of the microcontroller: boot-up program, initialization data,
strings or pictogram for screen-display or initial state of the system, programs for various tasks,
ISRs and operating system kernel. The system has RAMs for saving temporary data, stack and
buffers that are needed during a program run. The system uses flash for storing nonvolatile results.
Input, Output and IO Ports, IO Buses and IO Interfaces
The system gets inputs from physical devices through the input ports. Examples are as follows:
1. A system gets inputs from the touch screen, keys in a keypad or keyboard, sensors and transducer
circuits.
2. A controller circuit in a system gets inputs from the sensor and transducer circuits.
3. A receiver of signals or a network card gets the input from a communication system. [A
communication system could be a fax or modem, or a broadcasting service.]
4. Ports receives inputs from a network or peripheral.

Consider the system in an Automatic Chocolate Vending Machine. It gets inputs from a port that
collects the coins that a child inserts.
Consider the system in a mobile phone. A user inputs the mobile number through the buttons,
directly or indirectly (through recall of the number from its memory). Keypad keys connect to the
system through an input port.
A processor identifies each input port by its memory buffer addresses, called port addresses. Just
as a memory location holding a byte or word is identified by an address, each input port is also
identified by the address. The system gets the inputs by the read operations at the port addresses.
The system has output ports through which it sends output bytes to the real world. Examples are
as follows: 1. Output may be sent to an light emitting diode (LED), liquid crystal display (LCD)
or touch screen display panel. For example, a calculator or mobile phone system sends the output-
numbers or an SMS message to the LCD display.
2. A system may send the output to a printer.
3. Output may be sent to a communication system or network.
4. A control system sends the outputs to alarms, actuators, furnaces or boilers.
5. A robot is sent output for its various motors.
Each output port is identified by its memory-buffer addresses (called port addresses). The system
sends the output by a write operation to the port address.
There are also general-purpose ports for both the input and output (IO) operations. For example, a
mobile phone system sends output as well as gets input through a wireless communication channel.
A mobile computing system touch screen system sends output as well as gets input when a user
touches the menu displayed or key on the screen.
Each IO port is also identified by an address to which the read and write operations both take place.
Ports can have serial or parallel communication with the system address and data buses. In serial
communication a one-bit data line is used and bits are sent serially in successive time slots.
Universal Asynchronous Receiver and Transmitter (UART) is a popular communication protocol
for serial communication. In parallel communication, several data lines are used and bits are sent
in parallel.
A system port may have to send output to multiple channels. A demultiplexer or multiplexer circuit
is then used.
A demultiplexer is a digital circuit that sends digital outputs at any instance to one of the provided
channels. The channel to which the output is sent is the one that is addressed by the channel address
bits at the demultiplexer input. A demultiplexer takes the input and transfers it to a select channel
output among the multiple output channels.
A multiplexer is a digital circuit that receives digital inputs at any instance from multiple channels,
and sends data output only from a specific channel at an instance. The channel address bits are at
multiplexer input. A multiplexer takes the input from one among the multiple input channels and
transfers a selected channel input to the output.
A system unit (for example, memory unit or IO port or device) may have to be selected from
among the multiple units in the system and activated. A decoder circuit when used as an address
decoder decodes the input addresses and activates the selected output channel from among the
many outputs. For example, there are 8 units of which one has to be selected. An address-select
input of 3 bits is input to the decoder. Based on the input address, the output select line among the
8 activates. If the input address bit is 000, then the 0th output is active and the 0th unit activates.
If the input address bit is 111, then the 7th output is active and the 7th unit activates.
Bus A system might have to be connected to a number of other devices and systems. A bus consists
of a common set of lines to connect multiple devices, hardware units and systems for
communication between any two of these at any given instance. A bus communication protocol
specifies how signals communicate on the bus. A bus may be a serial or parallel bus that transfers
one or multiple data bits at an instance, respectively. The protocol also specifies the following: (i)
ways of arbitration when several devices need to communicate through the bus; (ii) ways of polling
bus requirement from each device at an instance; (iii) ways of daisy chaining the devices so that
bus is granted to a device according to the device-priority in the chain.
For networking the distributed units or systems, there are different types of serial and parallel bus
protocols: FC, CAN, USB, ISA, EISA and PCI. For wireless networking of systems there are
802.11, IrDA, Bluetooth and ZigBee protocols.
A system connects to external physical devices and systems through parallel or serial I/O ports.
Demultiplexers and multiplexers facilitate communication of signals from multiple channels
through a common path. A system often networks to the other devices and systems through an I/O
bus: for example, FC. CAN, USB, ISA, EISA and PCI bus.
DAC Using a PWM and an ADC
DAC is a circuit that converts digital 8 or 10 or 12 bits to the analog output. The analog output is
with respect to the reference voltage. When all input bits are equal to 1, then the analog output is
the difference between the positive and negative reference pin voltages; when all input bits equal
0, then the analog output equals -ve reference pin voltage (usually 0 V).
Suppose a system needs to give the analog output of a control circuit for automation. The analog
output may be to a power system for d.c. motor or furnace.
A pulse width modulator (PWM) with an integrator circuit is used for the DAC. A PWM unit in
the microcontroller operates as follows: Pulse width is made proportional to the analog-output
needed. PWM inputs are from 00000000 to 11111111 for an 8-bit DAC operation. The PWM unit
outputs to an external integrator, which provides the desired analog output. From this information,
the formula to obtain the analog output from the bits in a given PWM register with bits ranging
from 00000000 to 11111111 is as follows: Analog output V = K pw, where K is constant and pw
is the pulse width.
Suppose a circuit (external to the microcontroller) gives an output of 1.024 V when the pulse width
is 50% of the total pulse time period, and 2.047 V when the width is 100%. When the width is
made 25%, by reducing by half the value in the PWM output control-register, the integrator output
will become 0.512 V. The constant K depends on integrator amplifier gain.
Assume that the integrator operates with a dual (plus-minus) supply. The PWM unit in the
microcontroller operates by another method, which is as follows. Assume that when an integrator
circuit gives an output of 1.023 V, the pulse width is 100% of the total pulse time period and of -
1.024 V when the width is 0%. When the width is made 25% by reducing by half the value in an
output control register, the integrator output will be 0.512 V; at 50% the output will be 0.0 V. From
this information, the formula to obtain the analog output from the bits in a given PWM register
ranging from 00000000 to 11111111 in both situations is as follows: Analog output V = 0.01. K'.
(pw-50), where K' is constant and pw is pulse width time in percentage with respect to pulse time
period. K' depends on integrator amplifier gain.
Analog to Digital Converter ADC is a circuit that converts the analog input to digital 4, 8, 10 or
12 bits. The analog input is applied between the positive and negative pins and is converted with
respect to the reference voltage. When input is equal to difference of reference positive and
negative voltages, then all output bits equal 1; when equals negative reference voltage (usually 0
V), then all output bits equal 0.
The ADC in the system microcontroller can be used in many applications such as data acquisition
systems (DAS), digital cameras, analog control systems and voice digitizing systems. Suppose a
system gets the analog inputs from sensors of temperature, pressure, heart-beats and other sources
in a DAS. Suppose a system gets the analog inputs from a digital camera. It has CCD (Charge
Couple Device) which has tiny pixels that charge up on exposure to light. The charging of each
pixel depends upon the light intensity at that point in the image. The analog inputs to the system
generate from each pixel. Each pixel's analog input has to be converted into bits to enable
processing in the next stage.
Suppose a system needs to read an analog input from a sensor or transducer circuit. If converted
to bits by the ADC unit in the system, then these bits, after processing, can also give an output.
This provides a control for automation by a combined use of ADC and DAC features.
The converted bits can be given to the port meant for digital display. The bits may be transferred
to a memory address, a serial port or a parallel port.
A processor may process the converted bits and generate a Pulse Code Modulated (PCM) output.
PCM signals are used to digitize voice into a digital format.
Important points about the ADC are as follows.
1. Either a single or dual analog reference voltage-source is required in the ADC. It sets either the
analog input's upper limit or the lower and upper limits both. For a single reference source, the
lower limit is set to 0 V (ground potential). When the analog input equals the lower limit, the ADC
generates all bits as Os, and when it equals the upper limit it generates all bits as 1s. [As an
example, suppose in an ADC the upper limit or reference voltage is set to 2.255 V. Let the lower
limit reference voltage be 0.255 V. The difference in the limits is 2 V. Therefore, the resolution
will be 2/256 V. If the 8-bit ADC analog- input is 0.255 V, the converted 8 bits will be 00000000.
When the input is 0.255 V+ 1.000 V = 1.255 V, the bits will be 10000000. When the analog input
is 0.255 V+ 0.50 V, the converted bits will be 01000000. [From this information, finding a formula
to obtain converted bits for a given analog input = v volt is as follows: Binary number n bits after
conversion in an n-bit ADC corresponds to decimal number N. Then N = v. (Vreft - V ref-)/2".
Here, Vreft is the reference voltage that gives all the bits that are equal to 1 and Vrer is the reference
voltage that gives all the bits that are equal to 0.] 2. An ADC may be of 8, 10, 12, or 16 bits
depending upon the resolution needed for conversion. 3. The start of the conversion (STC) signal
or input initiates the conversion to 8 bits. In a system, an instruction or a timer signals the STC.
4. There is an end of conversion (EOC) signal. A flag in a register is set to indicate the end of
conversion and the ADC generates an interrupt; the ISR reads the ADC bits and saves them in the
memory buffer. 5. There is a conversion time limit in which the conversion is definite.
6. A Sample and Hold (S/H) unit is used to sample the input for a fixed time and hold till conversion
is over.
An ADC unit can be repeatedly used after the intervals equal to the conversion time. Therefore,
one can digitizes the DAS sensor signals, CCD signals, voice, music or video signals, or heart beat
sensor signals in different systems. An ADC unit in an embedded system microcontroller may
have multichannels. It can then take the inputs in succession from the various pins interconnected
to different analog sources.
For automatic control and signal processing applications, a system provides necessary interfacing
circuit and software for the Digital to Analog Conversion (DAC) unit and Analog to Digital
Conversion (ADC) unit. A DAC operation is done with the help of a combination of a PWM unit
in the microcontroller and an external integrator chip. ADC operations are required for data
acquisition, image processing, voice processing, video processing, instrumentation and automatic
control systems.

LCD, LED and Touchscreen Displays


A system requires an interfacing circuit and software to display the status or message for a line,
for multiline displays, or for flashing displays. An LCD screen may show up a multiline display
of characters or also show a small graph or icon (called a pictogram). A recent innovation in the
mobile phone system turns the screen blue to indicate an incoming call. Third generation system
phones have both image and graphic displays. An LCD needs little power. A supply or battery (a
solar panel in the calculator) powers it. The LCD is a diode that absorbs or emits light and 3 to 4
V and 50 or 60 Hz voltage-pulses with currents less than ~50 μA are required. The pulses are
applied with the same polarity on the crystal front and back plane for no light, and with opposite
polarity for light. Here, polarity means logic '1' or '0'. A display-controller is often used in case of
matrix displays.
To indicate the ON status of the system, there may be an LED that glows. A flashing LED may
indicate that a specific task is under completion or is running or in wait status. The LED is a diode
that emits yellow, green, red or infrared light in a remote controller on application of a forward
voltage of between 1.6-2 V. It needs current up to 12 mA above 5 mA (less in flashing display
mode). It is much brighter than the LCD, making it suitable for flashing displays and for displays
limited to a few digits.
A touchscreen is an input as well as an output device, which can be used to enter a command, a
chosen menu or to give a reply. The information is input by physically touching at a screen position
using a finger or a stylus. A stylus is thin pencil-shaped object. It is held between the fingers and
used just as a pen. The screen displays the choices or commands, menus, dialog boxes and icons.
The display-screen display is similar to a computer video display unit screen. Newer touch screen
senses the fingers even from proximity, for example, in Apple iPhone
The system may need the necessary interfacing circuit and software for the output to the LCD
display controller and the LED interfacing ports or for the I/Os with the touchscreen.
Keypad/Keyboard
The keypad or keyboard is an important device for getting user inputs. The system provides the
necessary interfacing and key-debouncing circuit as well as the software for the system to receive
input from a set of keys, from a keyboard, keypad or virtual keypad. A touchscreen provides for a
virtual keypad in a mobile computing system. A virtual keypad is a keypad displayed on the touch
screen where the user can enter the keys using a stylus or finger.
A keypad has upto a maximum of 32 keys. A keyboard may have 104 keys or more. The keypad
or keyboard may interface serially or parallelly to the processor directly through ports or through
a controller. Mobile phones may have a T9 keypad. A T9 keypad has 16 keys and four up-down
right-left menu keys. Using 0 to 9 keys text messages, such as SMS messages, are generated.
For inputs, a keypad or board may interface to a system. The system provides necessary interfacing
circuit and software to receive inputs directly from the keys or through a controller.
Pulse Dialer, Modem and Transceiver
For user connectivity through the telephone line, wireless or a network, a system provides the
necessary interfacing and circuits. It also provides the software for pulse dialing through the
telephone line, for modem interconnection for fax, for Internet packets routing and for transmitting
and connecting to a wireless cellular system or personal area wireless network. A transceiver is a
circuit that can transmit as well as receive byte streams.
In communication system, a pulse dialer, modem or transceiver is used. A system provides the
necessary interfacing circuit and software for dialing and for the modem and transceiver, directly
or through a controller.
Interrupt Handler
A timing device sends a time-out interrupt when a preset time elapses or sends a compare interrupt
when the present-time equals the preset time. Assume that data have to be transferred from a
keyboard to a printer. A port peripheral generates an interrupt on receiving the input data or when
the transmitting buffer becomes empty. Each action generates an interrupt. A system may possess
a number of devices and the system processor has to control and handle the requirements of each
device by running an appropriate ISR (interrupt service routine) for each. An interrupts-handling
mechanism must exist in each system to handle interrupts from various processes and for handling
multiple interrupts simultaneously pending for service. Chapter 4 describes in detail the interrupts,
ISRS, and their handling mechanisms in a system. Important points regarding the interrupts and
their handling by the program are as follows.
1. There can be a number of interrupt sources and groups of interrupt sources in a processor. An
interrupt may be a hardware signal that indicates the occurrence of an event. [For example, a real-
time clock continuously updates a value at a specified memory address; the transition of that value
is an event that causes an interrupt.] An interrupt may also occur through timers, through an
interrupting instruction of the processor program or through an error during processing. The error
may arise due to an illegal op-code fetch, a division by zero result or an overflow or underflow
during an ALU operation. An interrupt can also arise through a software timer. A software interrupt
may arise in an exceptional condition that may have developed while running a program.
2. The system may prioritize sources and service them accordingly.
3. Certain sources are not maskable and cannot be disabled. Some are assigned the highest priority
during processing.
4. The processor's current program has to divert to a service routine to complete that task on the
occurrence of the interrupt. For example, if a key is pressed, then an ISR reads the key and stores
the key value in the processor memory address. If a sequence of keys is pressed, for instance in a
mobile phone, then an ISR reads the keys and also calls a task to dial the mobile number.
5. There is a programmable unit on-chip for the interrupt handling mechanism in a microcontroller.
6. The operating system is expected to control the handling of interrupts and running of routines
for the interrupts in a particular application. The system always gives priority to the ISRS over the
tasks of an application.
A system provides an interrupt handling mechanism for executing the ISRS in case of the interrupts
from physical devices, systems, software instructions and software exceptions.

EMBEDDED SOFTWARE IN A SYSTEM


The software is like the brain of the embedded system.
Final Machine Implementable Software for a System
An embedded system processor executes software that is specific to a given application of that
system. The instruction codes and data in the final phase are placed in the ROM or flash memory
for all the tasks that are executed when the system runs. The software is also called ROM image.
Why? Just as an image is a unique sequence and arrangement of pixels, embedded software is also
a unique placement and arrangement of bytes for instructions and data.
Each code or datum is available only in the bits and bytes format. The system requires bytes at
each ROM address, according to the tasks being executed. A machine implementable software file
is therefore like a table having in each rows the address and bytes. The bytes are saved at each
address of the system memory. The table has to be readied as a ROM image for the targeted
hardware. Figure 1.5 shows the ROM image in a system memory. The image consists of the boot
up program, stacks address pointers, program counter address pointers, application programs,
ISRS, RTOS, input data and vector addresses.
Final stage software is also called the ROM image. The final machine implementable software for
a product embeds in the once programmable flash or ROM (or PROM) as an image in a frame.
Bytes at each address must be defined to create the ROM image. By changing this image, the same
hardware platform will work differently and can be used for entirely different applications or for
new upgrades of the same system.
Coding of Software in Machine Codes
During coding in this format, the programmer defines the addresses and the corresponding bytes
or bits at each address. In configuring some specific physical device or subsystem, machine code-
based coding is used. For example, in a transceiver, placing certain machine code and bits can
configure it to transmit at specific megabytes per second or gigabytes per second, using specific
bus and networking protocols. Another example is using certain codes for configuring a control
register with the processor. During a specific code-section processing, the register can be
configured to enable or disable use of its internal cache. However, coding in machine
implementable codes is done only in specific situations because it is time consuming and the
programmer must first have to understand the processor instructions set and then memorize the
instructions and their machine codes.
Software in Processor Specific Assembly Language
A program or a small specific part can be coded in assembly language using an assembler after
understanding the processor and its instruction set. Assembler is software used for developing
codes in assembly.
Assembly language coding is extremely useful for configuring physical devices like ports, a line-
display interface, ADC and DAC and reading into or transmitting from a buffer. These codes are
also called low-level codes for the device driver functions. [Sections 1.4.7 and 4.2.4.] They are
useful to run the processor or device-specific features and provide an optimal coding solution.
Lack of knowledge of writing device driver codes or codes that utilize the processor-specific
features- invoking codes in an embedded system design team can cost a lot. A vendor may charge
for the APIs and also charge intellectual property fees for each system shipped out of the company.
To make all the codes in assembly language may, however, be very time consuming. Full coding
in assembly may be done only for a few simple, small-scale systems, such as toys, automatic
chocolate vending machines, robots or data acquisition systems.
Figure 1.6 shows the process of converting an assembly language program into machine
implementable software file and then finally obtaining a ROM image file.
1. An assembler translates the assembly software into the machine codes using a step called
assembling. 2. In the next step, called linking, a linker links these codes with the other codes
required. Linking is necessary because of the number of codes to be linked for the final binary file.
For example, there are the standard codes to program a delay task for which there is a reference in
the assembly language program. The codes for the delay must link with the assembled codes. The
delay code is sequential from a certain beginning address. The assembly software code is also
sequential from a certain beginning address. Both the codes have to be linked at the distinct
addresses as well as at the available addresses in the system. The linked file in binary for run on a
computer is commonly known as an executable file or simply an '.exe' file. After linking, there has
to be reallocation of the sequences of placing the codes before actually placing the codes in
memory.
3. In the next step, the loader program performs the task of reallocating the codes after finding the
physical memory addresses available at a given instant. The loader is a part of the operating system
and places codes into the memory after reading the '.exe' file. This step is necessary because the
available memory addresses may not start from 0x0000, and binary codes have to be loaded at
different addresses during the run. The loader finds the appropriate start address. In a computer,
after the loader loads into a section of RAM, the program is ready to run.
4. The final step of the system design process is locating these codes as a ROM image. The codes
are permanently placed at the addresses actually available in the ROM. In embedded systems, there
is no separate program to keep track of the available addresses at different times during the run, as
in a computer. In embedded systems, therefore, the next step instead of loader after linking is the
use of a locator, which locates the IO tasks and hardware device driver codes at fixed addresses.
Port and device addresses are fixed for a given system as per the interfacing circuit between the
system buses and ports or devices. The locator program reallocates the linked file and creates a
file for a permanent location of the codes in a standard format. The file format may be in the Intel
Hex file format or Motorola S-record format. The designer has to define the available addresses to
locate and create files to permanently locate the codes. 5. Lastly, either (i) a laboratory system,
called device programmer, takes as input the ROM image file and finally burns the image into the
PROM or flash or (ii) at a foundry, a mask is created for the ROM of the embedded system from
the ROM image file. [The process of placing the codes in PROM or flash is also called burning.]
The mask created from the image gives the ROM in IC chip form.
To configure some specific physical device or subsystem such as the transceiver, machine codes
can be used straightaway. For physical device driver codes or codes that utilize processor-specific
features-invoking codes, 'processor-specific' assembly language is used. A file is then created in
three steps using an Assembler, Linker and Locator. The file has the ROM image in a standard
format. A device programmer finally burns the image in the PROM or EPROM. A mask created
from the image gives the ROM in IC chip form.
Software in High Level Language
Since the coding in assembly language is very time consuming in most cases, software is developed
in a high- level language, 'C' or 'C++' or visual C++ or 'Java' in most cases. 'C' is usually the
preferred language. The programmer needs to understand only the hardware organization when
coding in high level language. As an example, consider the following problem.
Example 1.1
Add 127, 29 and 40 and print the square root.
An exemplary C language program for all the processors is as follows. (i) #include <stdio.h> (ii)
#include <math.h> (iii) void main (void) ( (iv) int il, 12, 13, a; float result; (v) il = 127; i2=29;
i3=40; a= il+12+13; result = sqrt (a); (vi) printf (result);)
The coding for square root will need many lines of code and can be done only by an expert
assembly language programmer. To write the program in a high level language is very simple
compared to writing it in assembly language. 'C' programs have a feature that adds the assembly
instructions when using certain processor-specific features and coding for a specific section, for
example, a port device driver. Figure 1.7 shows the different programming layers in a typical
embedded 'C' software. These layers are as follows. (i) Processor Commands. (ii) Main Function.
(iii) Interrupt Service Routine. (iv) Multiple tasks, say, 1 to N. (v) Kernel and Scheduler. (vi)
Standard library functions, protocol handling and stack functions.
Figure 1.8 shows the process of converting a C
program into the ROM image file. A compiler
generates the object codes. It assembles the codes.
according to the processor instruction set and other
specifications. The C compiler for embedded systems
must, as a final step of compilation, use a code-
optimizer that optimizes the codes before linking.
After compilation, the linker links the object codes
with other needed codes. For example, the linker
includes the codes for the functions printf and sqrt
codes. Codes for device and driver (device control
codes) management also link at this stage: for
example, printer device management and driver codes.
After linking, the other steps for creating a file for
ROM image are the same as shown earlier in Figure 1.6.
C, C++, Java, Visual C++ are the languages used for software development. A C program has
various layers: processor commands, main function, task and library functions, interrupt service
routines and kernel (scheduler). The compiler generates an object file. Using a linker and locator,
the file for the ROM image is created for the targeted hardware.

Program Models for Software Designing


The program design task is simplified if a program is modeled.
The different models that are employed during the design processes of the embedded software are
as follows: 1. Sequential Program Model
2. Object Oriented Program Model
3. Control and Data flow graph or Synchronous Data Flow (SDF) Graph or Multi Thread Graph
(MTG) Model 4. Finite State Machine for data path
5. Multithreaded Model for concurrent processing of processes or threads or tasks
UML (Universal Modeling language) is a modeling language for object oriented programming.
Software for Concurrent Processing and Scheduling of Multiple
Tasks and ISRS Using an RTOS
An embedded system program is most often designed using multiple processes or multitasks or a
multithreads. The multiple tasks are processed most often by the OS not sequentially but
concurrently. Concurrent processing tasks can be interrupted for running the ISRs, and a higher
priority task preempts the running of lower priority tasks.
An OS provides for process, memory, devices, IOs and file system management. A file system
specifies the ways in which a file is created, called, named, used, copied, saved or deleted, opened
and closed. File system is the software for using the files on a disk, flash memory, memory card
or memory stick.
OS software have scheduling functions for all the processes (tasks, ISRS and device drivers) in the
system. Since the running of the tasks and ISRS may have real time constraints and deadlines for
finishing the tasks, an RTOS is required in an embedded system. The RTOS provides the OS
functions for coding the system, provides interprocess communication functions and controls the
passing of messages and signals to a task.
RTOS functions are highly complex. There are a number of popular and readily available RTOSS.
RTOS is used in most embedded systems and the system does concurrent processing of multiple
tasks when the tasks have real time constraints and deadlines.
Software for Device Drivers and Device Management in an Operating System
An embedded system is designed to perform multiple functions and has to control multiple
physical and virtual devices. In an embedded system, there may be number of physical devices.
Exemplary physical devices are timers, keyboards, display, flash memory, parallel ports and
network cards.
A program is also be developed using the concept of virtual devices. Examples of virtual devices
are as follows.
1. A file (of records opened, read, written and closed, and saved as a stream of bytes or words)
2. A pipe (for sending and receiving a stream of bytes from a source to destination)
3. A socket (for sending and receiving a stream of bytes between the client and server software
and between source and destination computing systems)
4. A RAM disk (for using the RAM in a way similar to files on the disk)
A file is a data structure (or virtual device) which sends the records (characters or words) to a data
sink (for example, a program function) and which stores the data from the data source (for example,
a program function). A file in a computer may also be stored in the hard disk and in flash memory
in embedded system.
The term virtual device follows from the analogy that just as a keyboard gives an input to the
processor for a read, a file also gives an input to the processor. The processor gives an output to a
printer for a write. Similarly, the processor writes an output to the file.
A device for the purpose of control, handling, reading and writing actions can be taken as
consisting of three components. (i) A control register or word that stores the bits that, on setting or
resetting by a device driver, control device actions. (ii) A status register or word that provides the
flags (bits) to show the device status to the device driver. (iii) A device mechanism that controls
the device actions. There may be input and output data buffers in a device, which may be written
or read by a device driver. Device driver actions are to get input into or send output from the
control registers, input data buffers, output data buffers and status registers of the device.
A device driver is software for opening, connecting or binding, reading, writing and closing or
controlling actions of the device. It is software written in a high level language. It controls
functions for device open (configure), connect, bind, listen, read or write or close. The device
driver executes after the programming of the control register (or word) of a peripheral or virtual
device. The programming is called device initialisation or registration or attachment. The driver
reads the status register, gets the inputs and writes the outputs. It executes on an interrupt to or
from the device.
A driver controls three functions. (i) Initializing, which is activated by placing appropriate bits at
the control register or word. (ii) Calling an ISR on interrupt or on setting a status flag in the status
register and running (driving) the ISR (Interrupt Handler Routine). (iii) Resetting the status flag
after an interrupt service. A driver may be designed for asynchronous operations (multiple use by
tasks one after another) or synchronous operations (concurrent use by the tasks).
Using the functions of the OS, a device driver coding can be made such that the underlying
hardware is hidden as much as possible. An API then defines the hardware separately. This makes
the driver usable when the device hardware changes in a system.
A device driver accesses a parallel or serial port, keyboard, mice, disk, network, display, file, pipe
and socket at specific addresses. An OS also provides device driver codes for system-port
addresses and for hardware access mechanisms.
A device manager software provides codes for detecting the presence of devices, for initializing
these and for testing the devices that are present. The manager includes software for allocating and
registering port (in fact, it may be a register or memory) addresses for the various devices at
distinctly different addresses, including codes for detecting any collision between these, if any. It
ensures that any device accesses to one task only at any given instant. It takes into account that
virtual devices may also have addresses that are allocated by the manager.
An OS also provides and executes modules for managing devices that associate with an embedded
system. The underlying principle is that at an instant, only one physical or virtual device should
get access to or from one task only.
For designing embedded-software, two types of devices are considered: physical and virtual.
Physical devices include keypad, printer or display unit. A virtual device could be a file or pipe or
socket or RAM disk. Device drivers and device manager software are needed in the system. The
RTOS includes device- drivers and a device manager to control and facilitates the use of the
number of physical and virtual devices in the system.
Software Tools for Designing an Embedded System
Table 1.2 lists the applications of software tools for assembly language programming, high level
language programming, RTOS, debugging and system integration.
Software tools are used to develop software for designing an embedded system. Debugging tools,
such as a stethoscope, trace scope, and sophisticated tools such as an integrated development
environment and prototype development tools, are needed for the integrated development of
system software and hardware.
Software Tools Required in Exemplary Cases
Table 1.3 gives the various tools needed to design exemplary systems.
RTOS is essential in most embedded systems to process multiple tasks and ISRS. Embedded
systems for medium scale and sophisticated applications need a number of sophisticated software
and debugging tools.
DESIGN PROCESS IN EMBEDDED SYSTEM
The concepts used during a design process are as follows.
1. Abstraction: Each problem component is first abstracted. For example, in the design of a robotic
system, the problem of abstraction can be in terms of control of arms and motors.
2. Hardware and Software architecture: Architectures should be well understood before a design.
3. Extra functional Properties: Extra functionalities required in the system being developed should
be well understood from the design.
4. System Related Family of designs: Families of related systems developed earlier should be taken
into consideration during designing.
5. Modular Design: Modular design concepts should be used. System designing is fast by
decomposition of software into modules that are to be implemented. Modules should be such that
they can be composed (coupled or integrated) later. Effective modular design should ensure
effective (i) function independence, (ii) cohesion and (iii) coupling.
(a) Modules should be clearly understood and should maintain continuity.
(b) Also, appropriate protection strategies are necessary for each module. A module is not
permitted to change or modify another module functionality. For example, protection from a
device driver modifying the configuration of another device.
6. Mapping: Mapping into various representations is done from software requirements. For
example, data flow in the same path during the program flow can be mapped together as a single
entity. Transform and transaction mapping design processes are used in designing. For example,
an image is input data to a system; it can have a different number of pixels and colours. The system
does not process each pixel and colour individually. Transform mapping of image is done by
appropriate compression and storage algorithms. Transaction mapping is done to define the
sequence of images.
7. User Interface Design: User interface design is an important part of design. User interfaces are
designed as per user requirements, analysis of the environment and system functions. For example,
in an automatic chocolate vending machine (ACVM) system, the user interface is an LCD
multiline graphics display. It can display a welcome message as well as specify the coins needed
to be inserted into the machine for each type of chocolate. The same ACVM may be designed with
touchscreen User Interface (GUI), or it may be designed with Voice User Interfaces (VUIS). Any
of these interface designs has to be validated by the customer. For example, the ACVM customer
who installs the machine must validate message language and messages to be displayed before an
interface design can proceed to the implementation stage. 8. Refinements: Each component and
module design needs to be refined iteratively till it becomes the most appropriate for
implementation by the software team.
The software design process may require use of Architecture Description Language (ADL). It is
used for representing the following: (i) Control Hierarchy (ii) Structural Partitioning (iii) Data
Structure and Hierarchy (iv) Software Procedures.
Design Metrics
A design process takes into account design metrics. There are several design metrics for an
embedded system
Abstraction of Steps in the Design Process
A design process is called bottom-to-top design if it builds by starting from the components. A
design process is called top-to-down design if it first starts with abstraction of the process and then
after abstraction the details are created. Top-to-down design approach is the most favored
approach. The following lists the five levels of abstraction from top to bottom in the design
process:
(1) Requirements: Definition and analysis of system requirement. It is only by a complete clarity
of the required purpose, inputs, outputs, functioning, design metrics and validation requirements
for finally developed systems specifications that a well-designed system can be created. There has
to be consistency in the requirements.
(2) Specifications: Clear specifications of the required system are must. Specifications need to be
precise. Specifications guide customer expectations from the product. They also guide system
architecture. The designer needs specifications for (i) hardware, for example, peripherals, devices
processor and memory specifications, (ii) data types and processing specifications, (iii) expected
system behaviour specifications, (iv) constraints of design, and (v) expected life cycle
specifications. Process specifications are analysed by making lists of inputs on events, outputs on
events and how the processes activate on each event (interrupt).
(3) Architecture: Data modeling designs of attributes of data structure, data flow graphs program
models, software architecture layers and hardware architecture are defined.
Software architectural layers are as follows:
1. The first layer is an architectural design. Here, a design for system architecture is
developed. The question arises as to how the different elements-data structures, databases,
algorithms, control functions, state transition functions, process, data and program flow-
are to be organized.
2. The second layer consists of data-design. Questions at this stage are as follows. What
design of data structures and databases would be most appropriate for the given problem?
Whether data organized as a tree- like structure will be appropriate? What will be the design
of the components in the data? [For example, video information will have two components,
image and sound.]
3. The third layer consists of interface design. Important questions at this stage are as follows.
What shall be the interfaces to integrate the components? What is the design for system
integration?
What shall be design of interfaces used for taking inputs from the data objects, structures and
databases and for delivering outputs? What will be the port structure for receiving inputs and
transmitting outputs?
(4) Components: The fourth layer is a component level design. The question at this stage is as
follows.
What shall be the design of each component? There is an additional requirement in the design of
embedded
systems, that each component should be optimised for memory usage and power dissipation.
Components of hardware, processes, interfaces and algorithms. The following lists the common
hardware components:
1. Processor, ASIP and single purpose processors in the system
2. Memory RAM, ROM or internal and external flash or secondary memory in the system
3. Peripherals and devices internal and external to the system
4. Ports and buses in the system
5. Power source or battery in the system
During software development process we can model the components as object-oriented. Table 1.9
lists the stages as components-based object-oriented software development process.
(5) System Integration: Built components are integrated in the system. Components may work fine
independently, but when integrated may not fullfil the design metrics. The system is made to
function and validated. Appropriate tests are chosen. Debugging tools are used to correct erroneous
functioning. Each component and its interface system is integrated after the design stage. Program
implementation is in a language and may use an integrated development environment (IDE), and
source code engineering tools, which should follow the model, software architecture and design
specifications. Program simplicity should be maintained during the implementation process.
The design stages range from abstraction to detailed designing to verification activities.
Continuous refinement in design can be made by effective communication between designers and
implementers. Software design can be assumed to consist of four layers: architecture design, data
design, interfaces design and component level design.

Actions at each step Research by software engineering experts have shown that on an average, a
designer needs to spend about 50% of the time for planning, analysis and design, 40% for testing,
validation and debugging and 10-15% on coding. Action required to be taken at each step in the
design process is listed in Table 1.10.

Challenges in Embedded System Design: Optimizing Design Metrics Following are the
challenges that arise during the design process.
Amount and type of hardware needed: Optimizing the requirement of microprocessors, ASIPs and
single purpose processors in the system on the basis of performance, power dissipation, cost and
other design metrics are the challenges in a system design. A designer also chooses the appropriate
hardware (memory RAM, ROM or internal and external flash or secondary memory, peripherals
and devices internal and external ports and buses and power source or battery) taking into account
the design metrics given in Table 1.8; for example, power dissipation, physical size, number of
gates and the engineering, prototype development and manufacturing costs.
Optimizing Power Dissipation and Consumption: Power, consumption during the operational and
idle state of system should be optimal. The following methods are used to meet the design
challenges.
Clock Rate Reduction Power dissipation typically reduces 2.5 μW per 100 kHz of reduced clock
rate. So reduction from 8000 kHz to 100 kHz reduces power dissipation by about 200 μW, which
is nearly similar to when the clock is nonfunctional. [Remember, total power dissipated (energy
required) may not reduce. This is because on reducing the clock rate, the computations will take a
longer time and total energy required equals the power dissipation per second multiplied by
computation time].
The power 25 μW is typically the residual dissipation needed to operate the timers and few other
units. By operating the clock at a lower frequency or during the power-down mode of the
processor, the advantages are as follows: (i) Power loss due to heat generation reduces. (ii) Radio
frequency interference also reduces due to the reduced power dissipation within the gates.
[Radiated RF (Radio Frequency) power depends on the RF current inside a gate, which reduces
due to increase in 'ON' state resistance between drain and channel of each MOSFET transistor and
that reduces heat generation.]
Voltage Reduction In portable or hand-held devices such as a cellular phone, compared to 5 V
operation, a CMOS circuit power dissipation reduces by one sixth, ~(2V/5V), in 2.0 V operation.
Thus the time intervals needed for recharging the battery increase by a factor of six.
Wait, Stop and Cache Disable instructions An embedded system may need to be run
continuously, without being switched off; the system design, therefore, is constrained by the need
to limit power dissipation while it is ON but is in idle state. Total power consumption by the system
while in running, waiting and idle states should be limited. A microcontroller must provide for
executing Wait and Stop instructions for the power-down mode. One way to reduce power
dissipation is to cleverly incorporate into software the Wait and Stop instructions. Another is to
operate the system at the lowest voltage levels in the idle state and selecting power-down mode in
that state. Yet another method is to disable use of certain structural units of the processor- for
example, caches-when not necessary and to keep in disconnected state those structure units that
are not needed during a particular software execution, for example timers or IO units.
Operations can be performed at low voltage or reduced clock rate in order to control power
dissipation. For embedded system software, performance analysis during its design phase must
also include the analysis of power dissipation during program execution and during standby. An
embedded system has to perform tasks continuously from power-up to power-off and may even
be kept 'ON' continuously. Clever real-time programming by using 'Wait' and 'Stop' instructions
and disabling certain units when not needed is one method of saving power during program
execution.
Process Deadlines Meeting the deadline of all processes in the system while keeping the memory,
power dissipation, processor clock rate and cost at minimum is a challenge.
Flexibility and Upgrade ability Flexibility and upgrade ability in design while keeping the cost
minimum and without any significant engineering cost is a challenge. Flexibility and upgrade
ability allow different and advanced versions of a product to be introduced in the market later on.
Reliability Designing a reliable product by appropriate design, testing and thorough verification,
is a challenge. The goal of testing is to find errors and to validate that the implemented software is
as per the specifications and requirements. Verification refers to an activity to ensure that specific
functions are correctly implemented. Validation refers to an activity to ensure that the system that
has been created is as per the requirements agreed upon at the analysis phase, and to ensure its
quality.
CLASSIFICATION OF EMBEDDED SYSTEMS
We can classify embedded systems into three types as follows.
1. Small scale embedded systems: These systems are designed with a single 8- or 16-bit
microcontroller; they have little hardware and software complexities and involve board-level
design. They may even be battery operated. When developing embedded software for these, an
editor, assembler and cross assembler, an integrated development environment (ISE) tool specific
to the microcontroller or processor used, are the main programming tools. Using 'C' language,
programs are compiled into the assembly and executable codes are appropriately located in the
system memory. The software has to fit within the memory available and keep in view the need to
limit power dissipation when the system is running continuously.
2. Medium scale embedded systems: These systems are usually designed with a single or a few
16- or 32-bit microcontrollers, DSPs or RISCs. These systems may also employ the readily
available single purpose processors and IPs (explained later) for the various functions-for example,
bus interfacing. [ASSPS and IPs may also have to be appropriately configured by the system
software before being integrated into the system-bus.] Medium scale embedded systems have both
hardware and software complexities. For complex software design, the following programming
tools are available: C/C++/Visual C++/Java, RTOS, source code engineering tool, simulator,
debugger and an integrated development environment. Software tools also provide solutions to
hardware complexities.
3. Sophisticated embedded systems: Sophisticated embedded systems have enormous hardware
and software complexities and may need several IPS, ASIPs, scalable processors or configurable
processors and programmable logic arrays. They are used for cutting edge applications that need
hardware and software co-design and components that have to be integrated in the final system.
They are constrained by the processing speeds available in their hardware units. Certain software
functions such as encryption and deciphering algorithms, discrete cosine transformation and
inverse transformation algorithms, TCP/ IP protocol stacking and network driver functions are
implemented in the hardware to obtain additional speeds. The software implements some of the
functions of the hardware resources in the system. Development tools for these systems may not
be readily available at a reasonable cost or may not be available at all. In some cases, a compiler
or retargetable compiler might have to be developed for these. [A retargetable compiler is one that
configures according to the given target configuration in a system.]
CHARACTERISTICS OF AN EMBEDDED SYSTEM
Unlike general purpose computing systems, embedded systems possess certain specific
characteristic and these characteristics are unique to each embedded system. Some of the important
characteristics o an embedded system are:
1. Application and domain specific
2. Reactive and Real Time
3. Operates in harsh environments
4. Distributed
5. Small size and weight
6. Power concerns

Application and Domain Specific


If you closely observe any embedded system, you will find that each embedded system is having
certain functions to perform and they are developed in such a manner to do the intended functions
only. They cannot be used for any other purpose. It is the major criterion which distinguishes an
embedded system from a general purpose system. For example, you cannot replace the embedded
control unit of your mi- crowave oven with your air conditioner's embedded control unit, because
the embedded control units of microwave oven and airconditioner are specifically designed to
perform certain specific tasks. Also you cannot replace an embedded control unit developed for a
particular domain say telecom with another control unit designed to serve another domain like
consumer electronics.
Reactive and Real Time
As mentioned earlier, embedded systems are in constant interaction with the Real world through
sensors and user-defined input devices which are connected to the input port of the system. Any
changes happening in the Real world (which is called an Event) are captured by the sensors or
input devices in Real Time and the control algorithm running inside the unit reacts in a designed
manner to bring the controlled output variables to the desired level. The event may be a periodic
one or an unpredicted one. If the event is an unpredicted one then such systems should be designed
in such a way that it should be scheduled to capture the events without missing them. Embedded
systems produce changes in output in response to the changes in the input. So they are generally
referred as Reactive Systems.
Real Time System operation means the timing behavior of the system should be deterministic;
meaning the system should respond to requests or tasks in a known amount of time. A Real Time
system should not miss any deadlines for tasks or operations. It is not necessary that all embedded
systems should be Real Time in operations. Embedded applications or systems which are mission
critical, like flight control systems, Antilock Brake Systems (ABS), etc. are examples of Real Time
systems. The design of an embedded Real time system should take the worst-case scenario into
consideration.
Operates in Harsh Environment
It is not necessary that all embedded systems should be deployed in controlled environments. The
environment in which the embedded system deployed may be a dusty one or a high temperature
zone or an area subject to vibrations and shock. Systems placed in such areas should be capable to
withstand all these adverse operating conditions. The design should take care of the operating
conditions of the area where the system is going to implement. For example, if the system needs
to be deployed in a high temperature zone, then all the components used in the system should be
of high temperature grade. Here we cannot go for a compromise in cost. Also proper shock
absorption techniques should be provided to systems which are going to be commissioned in places
subject to high shock. Power supply fluctuations, corrosion and component aging, etc. are the other
factors that need to be taken into consideration for embedded systems to work in harsh
environments.
Distributed
The term distributed means that embedded systems may be a part of larger systems. Many numbers
of such distributed embedded systems form a single large embedded control unit. An automatic
vending machine is a typical example for this. The vending machine contains a card reader (for
pre-paid vending systems), a vending unit, etc. Each of them are independent embedded units but
they work together to perform the overall vending function. Another example is the Automatic
Teller Machine (ATM). An ATM contains a card reader embedded unit, responsible for reading
and validating the user's ATM card, transaction unit for performing transactions, a currency
counter for dispatching/vending currency to the authorised person and a printer unit for printing
the transaction details. We can visualise these as independent embedded systems. But they work
together to achieve a common goal.
Another typical example of a distributed embedded system is the Supervisory Control And Data
Acquisition (SCADA) system used in Control & Instrumentation applications, which contains
physi- cally distributed individual embedded control units connected to a supervisory module.
Small Size and Weight
Product aesthetics is an important factor in choosing a product. For example, when you plan to
buy a new mobile phone, you may make a comparative study on the pros and cons of the products
available in the market. Definitely the product aesthetics (size, weight, shape, style, etc.) will be
one of the deciding factors to choose a product. People believe in the phrase "Small is beautiful".
Moreover, it is convenient to handle a compact device than a bulky product. In embedded domain
also, compactness is a significant deciding factor. Most of the application demands small sized
and low weight products.
Power Concerns
Power management is another important factor that needs to be considered in designing embedded
systems. Embedded systems should be designed in such a way as to minimize the heat dissipation
by the system. The production of high amount of heat demands cooling requirements like cooling
fans which in turn occupies additional space and make the system bulky. Nowadays ultra-low
power components are available in the market. Select the design according to the low power
components like low dropout regulators, and controllers/processors with power saving modes.
Also, power management is a critical constraint in battery operated application. The more the
power consumption the less is the battery life.
QUALITY ATTRIBUTES OF EMBEDDED SYSTEMS
Quality attributes are the non-functional requirements that need to be documented properly in any
system design. If the quality attributes are more concrete and measurable it will give a positive
impact on the system development process and the end product. The various quality attributes that
needs to be addressed in any embedded system development are broadly classified into two,
namely 'Operational Quality Attributes' and 'Non-Operational Quality Attributes'.
Operational Quality Attributes
The operational quality attributes represent the relevant quality attributes related to the embedded
system when it is in the operational mode or 'online' mode. The important quality attributes coming
under this category are listed below:
1. Response
2. Throughput
3. Reliability
4. Maintainability
5. Security
6. Safety

Response Response is a measure of quickness of the system. It gives you an idea about how fast
your system is tracking the changes in input variables. Most of the embedded systems demand fast
response which should be almost Real Time. For example, an embedded system deployed in flight
control application should respond in a Real Time manner. Any response delay in the system will
create potential damages to the safety of the flight as well as the passengers. It is not necessary
that all embedded systems should be Real Time in response. For example, the response time
requirement for an electronic toy is not at all time-critical. There is no specific deadline that this
system should respond within this particular timeline.
Throughput Throughput deals with the efficiency of a system. In general, it can be defined as the
rate of production or operation of a defined process over a stated period of time. The rates can be
expressed in terms of units of products, batches produced, or any other meaningful measurements.
In the case of a Card Reader, throughput means how many transactions the Reader can perform in
a minute or in an hour or in a day. Throughput is generally measured in terms of 'Benchmark'. A
'Benchmark' is a reference point by which something can be measured. Benchmark can be a set of
performance criteria that a product is expected to meet or a standard product that can be used for
comparing other products of the same product line.
Reliability Reliability is a measure of how much % you can rely upon the proper function- ing of
the system or what is the % susceptibility of the system to failures.
Mean Time Between Failures (MTBF) and Mean Time To Repair (MTTR) are the terms used in
de- fining system reliability. MTBF gives the frequency of failures in hours/weeks/months. MTTR
specifies how long the system is allowed to be out of order following a failure. For an embedded
system with critical application need, it should be of the order of minutes.
Maintainability Maintainability deals with support and maintenance to the end user or cli- ent in
case of technical issues and product failures or on the basis of a routine system checkup. Reliability
and maintainability are considered as two complementary disciplines. A more reliable system
means a system with less corrective maintainability requirements and vice versa. As the reliability
of the system increases, the chances of failure and non-functioning also reduces, thereby the need
for maintainability is also reduced. Maintainability is closely related to the system availability.
Maintainability can be broadly classified into two categories, namely, 'Scheduled or Periodic
Maintenance (preventive maintenance)' and 'Maintenance to unexpected failures (corrective
maintenance)'. Some embedded products may use consumable components or may contain
components which are subject to wear and tear and they should be replaced on a periodic basis.
The period may be based on the total hours of the system us- age or the total output the system
delivered. A printer is a typical example for illustrating the two types of maintainability. An inkjet
printer uses ink cartridges, which are consumable components and as per the printer manufacturer
the end user should replace the cartridge after each 'n' number of printouts to get quality prints.
This is an example for 'Scheduled or Periodic maintenance'. If the paper feeding part of the printer
fails the printer fails to print and it requires immediate repairs to rectify this problem. This is an
example of 'Maintenance to unexpected failure'. In both of the maintenances (scheduled and
repair), the printer needs to be brought offline and during this time it will not be available for the
user. Hence it is obvious that maintainability is simply an indication of the availability of the
product for use. In any embedded system design, the ideal value for availability is expressed as

Ai = MTBF/(MTBF + MTTR)
where Ai = Availability in the ideal condition, MTBF = Mean Time Between Failures, and MTTR
= Mean Time To Repair
Security Confidentiality, 'Integrity', and 'Availability' (The term 'Availability' mentioned here is
not related to the term 'Availability' mentioned under the 'Maintainability' section) are the three
major measures of information security. Confidentiality deals with the protection of data and
application from unauthorized disclosure. Integrity deals with the protection of data and
application from unauthorized modification. Availability deals with protection of data and
application from unauthorized users. A very good example of the 'Security' aspect in an embedded
product is a Personal Digital Assistant (PDA). The PDA can be either a shared resource (e.g. PDAs
used in LAB setups) or an individual one. If it is a shared one there should be some mechanism in
the form of a user name and password to access into a particular person's profile-This is an example
of 'Availability'. Also all data and applications present in the PDA need not be accessible to all
users. Some of them are specifically accessible to administrators only. For achieving this,
Administrator and user levels of security should be implemented -An example of Confidentiality.
Some data present in the PDA may be visible to all users but there may not be necessary
permissions to alter the data by the users. That is Read Only access is allocated to all users-An
example of Integrity.
Safety 'Safety' and 'Security' are two confusing terms. Sometimes you may feel both of them as a
single attribute. But they represent two unique aspects in quality attributes. Safety deals with the
possible damages that can happen to the operators, public and the environment due to the
breakdown of an embedded system or due to the emission of radioactive or hazardous materials
from the embedded products. The breakdown of an embedded system may occur due to a hardware
failure or a firmware failure. Safety analysis is a must in product engineering to evaluate the
anticipated damages and deter- mine the best course of action to bring down the consequences of
the damages to an acceptable level. As stated before, some of the safety threats are sudden (like
product breakdown) and some of them are gradual (like hazardous emissions from the product).
Non-Operational Quality Attributes
The quality attributes that needs to be addressed for the product 'not' on the basis of operational
aspects are grouped under this category. The important quality attributes coming under this
category are listed below.
1. Testability & Debug-ability
2. Evolvability
3. Portability
4. Time to prototype and market
5. Per unit and total cost.
Testability & Debug-ability Testability deals with how easily one can test his/her design,
application and by which means he/she can test it. For an embedded product, testability is
applicable to both the embedded hardware and firmware. Embedded hardware testing ensures that
the peripherals and the total hardware functions in the desired manner, whereas firmware testing
ensures that the firm- ware is functioning in the expected way. Debug-ability is a means of
debugging the product as such for figuring out the probable sources that create unexpected
behaviour in the total system. Debug-ability has two aspects in the embedded system development
context, namely, hardware level debugging and firmware level debugging. Hardware debugging
is used for figuring out the issues created by hardware problems whereas firmware debugging is
employed to figure out the probable errors that appear as a result of flaws in the firmware.
Evolvability Evolvability is a term which is closely related to Biology. Evolvability is referred as
the non-heritable variation. For an embedded system, the quality attribute 'Evolvability' refers to
the ease with which the embedded product (including firmware and hardware) can be modified to
take advantage of new firmware or hardware technologies.
Portability Portability is a measure of 'system independence'. An embedded product is said to be
portable if the product is capable of functioning 'as such' in various environments, target
processors/controllers and embedded operating systems. The ease with which an embedded
product can be ported on to a new platform is a direct measure of the re-work required. A standard
embedded product should always be flexible and portable. In embedded products, the term 'porting'
represents the migration of the embedded firmware written for one target processor (e.g. Intel x86)
to a different target processor (say Hitachi SH3 processor). If the firmware is written in a high
level language like 'C' with little target processor-specific functions (operating system extensions
or compiler specific utilities), it is very easy to port the firmware for the new processor by replacing
those 'target processor-specific functions' with the ones for the new target processor and re-
compiling the program for the new target processor- specific settings. Re-compiling the program
for the new target processor generates the new target processor-specific machine codes. If the
firmware is written in Assembly Language for a particular family. of processor (say x86 family),
it will be very difficult to translate the assembly language instructions to the new target processor
specific language and so the portability is poor.
If you look into various programming languages for application development for desktop
applications, you will see that certain applications developed on certain languages run only on
specific operating systems and some of them run independent of the desktop operating systems.
For example, applications developed using Microsoft technologies (e.g. Microsoft Visual C++
using Visual studio) is capable of running only on Microsoft platforms and will not function on
other operating systems; whereas applications developed using 'Java' from Sun Microsystems
works on any operating system that supports Java standards.
Time-to-Prototype and Market Time-to-market is the time elapsed between the concep-
tualisation of a product and the time at which the product is ready for selling (for commercial
product) or use (for non-commercial products). The commercial embedded product market is
highly competitive and time to market the product is a critical factor in the success of a commercial
embedded product. There may be multiple players in the embedded industry who develop products
of the same category (like mobile phone, portable media players, etc.). If you come up with a new
design and if it takes long time to develop and market it, the competitor product may take
advantage of it with their product. Also, embedded technology is one where rapid technology
change is happening. If you start your design by making use of a new technology and if it takes
long time to develop and market the product, by the time you market the product, the technology
might have superseded with a new technology. Product prototyping helps a lot in reducing time-
to-market. Whenever you have a product idea, you may not be certain about the feasibility of the
idea. Prototyping is an informal kind of rapid product development in which the important features
of the product under consideration are developed. The time to prototype is also another critical
factor. If the prototype is developed faster, the actual estimated development time can be brought
down significantly. In order to shorten the time to prototype, make use of all possible options like
the use of off-the-shelf components, re-usable assets, etc.
Per Unit Cost and Revenue Cost is a factor which is closely monitored by both end user (those
who buy the product) and product manufacturer (those who build the product). Cost is a highly
sensitive factor for commercial products. Any failure to position the cost of a commercial product
at a nominal rate, may lead to the failure of the product in the market. Proper market study and
cost benefit analysis should be carried out before taking a decision on the per-unit cost of the
embedded product. From a designer/product development company perspective the ultimate aim
of a product is to generate marginal profit. So, the budget and total system cost should be properly
balanced to provide a marginal profit. Every embedded product has a product life cycle which
starts with the design and development phase. The product idea generation, prototyping, Roadmap
definition, actual product design and development are the activities carried out during this phase.
During the design and development phase there is only investment and no returns. Once the
product is ready to sell, it is introduced to the market. This stage is known as the Product
Introduction stage. During the initial period the sales and revenue will be low. There won't be
much competition and the product sales and revenue increase with time. In the growth phase, the
product grabs high market share. During the maturity phase, the growth and sales will be steady
and the revenue reaches at its peak. The Product Retirement/Decline phase starts with the drop-in
sales volume, market share and revenue. The decline happens due to various reasons like
competition from similar product with enhanced features or technology changes, etc. At some
point of the decline stage, the manufacturer announces discontinuing of the product. The different
stages of the embedded products life cycle-revenue, unit cost and profit in each stage-are
represented in the following Product Life-cycle graph.
From the graph, it is clear that the total revenue increases from the product introduction stage to
the product maturity stage. The revenue peaks at the maturity stage and starts falling in the
decline/retirement stage. The unit cost is very high during the introductory stage (a typical example
is cell phone; if you buy a new model of cell phone during its launch time, the price will be high
and you will get the same model with a very reduced price after three or four months of its
launching). The profit increases. with increase in sales and attains a steady value and then falls
with a dip in sales. You can see a negative value for profit during the initial period. It is because
during the product development phase there is only investment and no returns. Profit occurs only
when the total returns exceed the investment and operating cost.

Common questions

Powered by AI

The time-to-market significantly impacts competitiveness in the commercial market, as companies that quickly bring products to market can capitalize on first-mover advantage. Prolonged development timelines can result in missed opportunities, especially in fast-paced technology sectors where rapid innovations can render products obsolete before release. Efficient prototyping and leveraging off-the-shelf components can reduce time-to-market .

Distributed embedded systems enhance the functionality and efficiency of larger systems by enabling individual embedded units to perform specific tasks within a larger framework. This modular approach allows for scalability, improves redundancy, and allows different tasks to be coordinated effectively. Examples like vending machines and ATMs showcase how independent units work together to achieve a common goal .

Operational quality attributes such as response, throughput, reliability, and maintainability directly influence the functionality of real-time embedded systems. In critical applications like flight control systems, fast response times are essential to prevent catastrophic failures. These attributes ensure that the system can handle input changes promptly and maintain high efficiency over time through consistent operational benchmarks and redundancy for reliability .

Embedded systems ensure reliability in harsh environments by using components that can withstand extreme conditions, such as high temperatures and vibrations. Appropriate materials and design considerations, like shock absorption techniques, help manage environmental stresses. Additionally, power supply modulation, corrosion resistance, and component aging are also considered to maintain system longevity and reliability under adverse conditions .

Using high-level languages for embedded system development enhances productivity by simplifying code syntax and reducing development time, allowing developers to focus on broader system architecture rather than low-level details. Maintenance is also improved due to better readability and structure, facilitating easier updates and debugging compared to assembly language .

The ROM image is significant as it represents the final, implementable form of embedded system software, containing all necessary instruction codes and data for execution. It ensures that the software is uniquely tailored to the hardware's memory map, enabling the same hardware platform to function under different applications or upgrades by simply changing the ROM image .

Power management is critical because it influences system efficiency, battery life, and thermal management. Effective power management minimizes heat dissipation and the need for bulky cooling solutions, thus maintaining system compactness. Low power consumption is pivotal, especially in battery-operated applications, to extend operational duration and reliability. Ultra-low power components are frequently utilized to achieve these objectives .

The location process addresses the implementation of linking object codes to specific memory addresses to create a functional ROM image. By using a locator during development, it ensures precise placement of codes and data among available addresses in memory, which is crucial for effectively executing embedded system operations on the target hardware .

Coding in assembly language provides benefits by allowing access to the processor-specific features and configuring physical devices with optimal precision. It is particularly useful for configuring ports and direct interactions with hardware components such as ADCs, DACs, and line-display interfaces, which can lead to more efficient and tailored device operations despite its complexity .

Coding in machine implementable codes is time-consuming due to the need for programmers to understand the processor's instruction set and memorize the instructions and their corresponding machine codes . This process demands significant resources and time, limiting its use to specific situations where precise control over hardware is necessary. The challenges impact development time, as programming at such a low level requires meticulous attention to detail and extensive knowledge, which can hinder rapid prototyping and development timelines .

You might also like