5.embedded Systems Design PDF
5.embedded Systems Design PDF
IV YEAR ECE
UNIT-I
INTRODUCTION TO EMBEDDED SYSTEMS
E.g. Electronic Toys, Mobile Handsets, Washing Machines, Air Conditioners, Automotive
Control Units, Set Top Box, DVD Player etc…
Unique in character and behavior
With specialized hardware and software
Embedded Systems Vs General Computing Systems: (March-2017)
First Recognized Modern Embedded System: Apollo Guidance Computer (AGC) developed by
Charles Stark Draper at the MIT Instrumentation Laboratory.
It has two modules
1.Command module(CM) 2.Lunar Excursion
module(LEM)
RAM size 256 , 1K ,2K words
ROM size 4K,10K,36K words
Clock frequency is 1.024MHz
5000 ,3-input RTL NOR gates are used
User interface is DSKY(display/Keyboard)
First Mass Produced Embedded System: Autonetics D-17 Guidance computer for Minuteman-I missile
Third Generation: Embedded Systems built around high performance 16/32 bit
Microprocessors/controllers, Application Specific Instruction set processors like Digital
Signal Processors (DSPs), and Application Specific Integrated Circuits (ASICs).The
instruction set is complex and powerful.
EX. Robotics, industrial process control, networking etc.
Small Scale: The embedded systems built around low performance and low cost 8 or 16
bit microprocessors/ microcontrollers. It is suitable for simpleapplications and where
performance is not time critical. It may or may not contain OS.
Medium Scale: Embedded Systems built around medium performance, low cost 16 or 32
These are slightly complex in hardware
bit microprocessors / microcontrollers or DSPs.
and firmware. It may contain GPOS/RTOS.
Large Scale/Complex: Embedded Systems built around high performance 32 or 64 bit
RISC processors/controllers, RSoC or multi-core processors and PLD. It requires
complex hardware and software. These system may contain multiple
processors/controllers and co-units/hardware accelerators for offloading the processing
requirements from the main processor. It contains RTOS for scheduling, prioritization
and management.
1. Soft Real time Systems: Missing a deadline may not be critical and can be
tolerated to a certain degree
2. Hard Real time systems: Missing a program/task execution time deadline can have
catastrophic consequences (financial, human loss of life, etc.)
1. Event Triggered : Activities within the system (e.g., task run-times) are dynamic and
depend upon occurrence of different events .
2. Time triggered: Activities within the system follow a statically computed schedule (i.e.,
they are allocated time slots during which they can take place) and thus by nature are
predictable.
Each Embedded Systems is designed to serve the purpose of any one or a combination of the
following tasks.
o Data Collection/Storage/Representation
o Data Communication
o Monitoring
o Control
acquisition of data from the external
Performs
world.
The collected data can be either analog or
digital
Data collection is usually done for storage,
analysis, manipulation and transmission
The collected data may be stored directly in the system or may be transmitted to some
by the system or it may be deleted instantly after
other systems or it may be processed
giving a meaningful representation
2. Data Communication:-
The sensors used in ECG are the different Electrodes connected to the patient‟s body
Measuring instruments like Digital CRO, Digital Multi meter, Logic Analyzer etc used in
Control & Instrumentation applications are also examples of embedded systems for
monitoring purpose
5. Control:-
Sensors are connected to the input port for capturing the changes in environmental
variable or measuring variable
The actuators connected to the output port are controlled according to the changes in input
variable to put an impact on the controlling variable to bring the controlled variable to the
specified range
Air conditioner for controlling room temperature is a typical example for embedded
system with „Control‟ functionality
Air conditioner contains a room temperature sensing element (sensor) which may be a
thermistor and a handheld unit for setting up (feeding) the desired temperature
The air compressor unit acts as the actuator. The compressor is controlled according to the
current room temperature and the desired temperature set by the end user.
This section provides an overview of the embedded system design process aimed at two
objectives. First, it will give us an introduction to the various steps in embedded system design
before we delve into them in more detail. Second, it will allow us to consider the design
methodology itself. A design methodology is important for three reasons. First, it allows us to
keep a scorecard on a design to ensure that we have done everything we need to do, such as
optimizing performance or performing functional tests. Second, it allows us to develop
computer-aided design tools. Developing a single program that takes in a concept for an
embedded system and emits a completed design would be a daunting task, but by first breaking
the process into manageable steps, we can work on automating (or at least semi automating) the
steps one at a time. Third, a design methodology makes it much easier for members of a design
team to communicate.
The below Figure summarizes the major steps in the embedded system design process. In this top–down
view, we start with the system requirements.
■ Physical size and weight: You should give some indication of the physical size of the system
to help guide certain architectural decisions. A desktop machine has much more flexibility in the
components used than, for example, a lapel mounted voice recorder.
GPS MODULE:
Specification
The specification is more precise—it serves as the contract between the customer and the
architects. As such, the specification must be carefully written so that it accurately reflects the
customer’s requirements and does so in a way that can be clearly followed during design.
The specification should be understandable enough so that someone can verify that it meets
system requirements and overall expectations of the customer.
A specification of the GPS system would include several components:
Data received from the GPS satellite constellation.
Map data.
User interface.
Operations that must be performed to satisfy customer requests.
Background actions required to keep the system running, such as operating the GPS
receiver.
The hardware block diagram clearly shows that we have one central CPU surrounded by memory
and I/O devices. In particular, we have chosen to use two memories: a frame buffer for the pixels
to be displayed and a separate program/data memory for general use by the CPU. The software
block diagram fairly closely follows the system block diagram, but we have added a timer to
control when we read the buttons on the user interface and render data onto the screen. To have a
truly complete architectural description, we require more detail, such as where units in the
software block diagram will be executed in the hardware block diagram and when operations
will be performed in time.
The architectural description tells us what components we need. The component design effort
builds those components in conformance to the architecture and specification. The components
will in general include both hardware—FPGAs, boards, and so on—and software modules. Some
of the components will be ready-made. The CPU, for example, will be a standard component in
almost all cases, as will memory chips and many other components .In the moving map, the GPS
receiver is a good example of a specialized component that will nonetheless be a predesigned,
standard component. We can also make use of standard software modules.
System Integration:
Only after the components are built do we have the satisfaction of putting them together and
seeing a working system. Of course, this phase usually consists of a lot more than just plugging
everything together and standing back. Bugs are typically found during system integration, and
good planning can help us find the bugs quickly. By building up the system in phases and
running properly chosen tests, we can often find bugs more easily. If we debug only a few
modules at a time, we are more likely to uncover the simple bugs and able to easily recognize
them. Only by fixing the simple bugs early will we be able to uncover the more complex or
obscure bugs that can be identified only by giving the system a hard workout
Embedded systems possess certain specific characteristics and these are unique to each
Embedded system.
4. Distributed
6. Power concerns
7. Single-functioned
8. Complex functionality
9. Tightly-constrained
10. Safety-critical
• Each E.S has certain functions to perform and they are developed in such a manner to do
the intended functions only.
• Ex – The embedded control units of the microwave oven cannot be replaced with AC‟S
embedded control unit because the embedded control units of microwave oven and AC
are specifically designed to perform certain specific tasks.
• E.S 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 in the real world 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.
• E.S produce changes in output in response to the changes in the input, so they are referred
as reactive systems.
• Real Time system operation means the timing behavior of the system should be
deterministic ie the system should respond to requests in a known amount of time.
• Example – E.S which are mission critical like flight control systems, Antilock Brake
Systems (ABS) etc are Real Time systems.
• The design of E.S should take care of the operating conditions of the area where the
system is going to implement.
• Ex – 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.
• Also proper shock absorption techniques should be provided to systems which are going
to be commissioned in places subject to high shock.
4. Distributed: –
• Many numbers of such distributed embedded systems form a single large embedded
control unit.
• Ex – Automatic vending machine. It contains a card reader, a vending unit etc. Each of
them are independent embedded units but they work together to perform the overall
vending function.
• Product aesthetics (size, weight, shape, style, etc) is an important factor in choosing a
product.
• E.S should be designed in such a way as to minimize the heat dissipation by the system.
9. Tightly-constrained:-
10. Safety-critical:-
I. 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.
1. Response :-
It tells how fast the system is tracking the changes in input variables.
Most of the E.S demands fast response which should be almost real time.
The rates can be expressed in terms of products, batches produced or any other
meaningful measurements.
Ex – In case of card reader throughput means how many transactions the reader
can perform in a minute or in an hour or in a day.
3. Reliability :-
• It is a measure of how much we can rely upon the proper functioning of the system.
• Mean Time Between Failure (MTBF) and Mean Time To Repair (MTTR) are the
terms used in determining system reliability.
• MTTR specifies how long the system is allowed to be out of order following a
failure.
• For embedded system with critical application need, it should be of the order of
minutes.
4. Maintainability:-
• It deals with support and maintenance to the end user or client in case of technical issues
and product failure or on the basis of a routine system checkup.
• A more reliable system means a system with less corrective maintainability requirements
and vice versa.
• Confidentiality, Integrity and availability are the three major measures of information
security.
• Integrity deals with the protection of data and application from unauthorized
modification.
• Availability deals with protection of data and application from unauthorized users.
6. Safety :-
Safety deals with the possible damages that can happen to the operator, public and the
environment due to the breakdown of an Embedded System.
Safety analysis is a must in product engineering to evaluate the anticipated damages and
determine the best course of action to bring down the consequences of damage to an
acceptable level.
II. 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.
• Testability deals with how easily one can test the design, application and by which means
it can be done.
• For an E.S testability is applicable to both the embedded hardware and firmware.
• Embedded hardware testing ensures that the peripherals and total hardware functions in
the desired manner, whereas firmware testing ensures that the firmware is functioning in
the expected way.
• 1. Hardware level: It is used for finding the issues created by hardware problems.
• 2. Software level: It is employed for finding the errors created by the flaws in the software.
• For an embedded system evolvability refers to the ease with which the embedded product
can be modified to take advantage of new firmware or hardware technologies.
3. Portability:-
• „Porting‟ represents the migration of embedded firmware written for one target processor
to a different target processor.
• It is the time elapsed between the conceptualization of a product and the time at which
the product is ready for selling.
• The commercial embedded product market is highly competitive and time to market the
product is critical factor in the success of commercial embedded product.
• There may be multiple players in embedded industry who develop products of the same
category (like mobile phone).
• Cost is a factor which is closely monitored by both end user and product manufacturer.
• 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.
• The ultimate aim of the product is to generate marginal profit so the budget and total cost
should be properly balanced to provide a marginal profit.
8. Wearable devices refer to embedded systems which are incorporated into accessories and
apparels. It envisions the bonding of embedded technology in our day to day lives.
OBJECTIVE QUESTIONS
1. Embedded systems are
(a) General Purpose (b) Special Purpose
2. Embedded system is
(a) An electronic system (b) A pure mechanical system
(c)An electro-mechanical system (d) (a) or (c)
3. Which of the following is not true about embedded systems?
(a)Built around specialized hardware (b) Always contain an operating system
(c)Execution behavior may be deterministic (d) All of these (e) none of these
4. Which of the following is not an example of small scale embedded system?
(a) Electronic Barbie doll (b) Simple calculator
(c) Cell Phone (d) Electronic toy car
T.VINAYSIMHA REDDY
DEPT OF ECE
MRCET
Embedded systems are domain and application specific and are built around a
central core. The core of the embedded system falls into any of the following categories:
· Developers of microprocessors.
Intel – Intel 4004 – November 1971(4-bit)
Intel – Intel 4040.
Intel – Intel 8008 – April 1972.
Intel – Intel 8080 – April 1974(8-bit).
Motorola – Motorola 6800.
Intel – Intel 8085 – 1976.
Zilog - Z80 – July 1976.
RISC and CISC are the two common Instruction Set Architectures (ISA)
available for processor design.
A microcontroller is a highly integrated chip that contains a CPU, scratch pad RAM,
special and general purpose register arrays, on chip ROM/FLASH memory for
program storage , timer and interrupt control units and dedicated I/O ports.
Some embedded system application require only 8 bit controllers whereas some
requiring superior performance and computational needs demand 16/32 bit
controllers.
DSP are powerful special purpose 8/16/32 bit microprocessor designed to meet
the computational demands and power constraints of today’s embedded audio,
video and communication applications.
2.Because of using single chip for integrates several functions there by reduces the
system development cost.
3.Most of the ASICs are proprietary (which having some trade name) products, it is
referred as Application Specific Standard Products(ASSP).
4.As a single chip ASIC consumes a very small area in the Total system.
5.Thereby helps in the design of smaller system with high capabilities or
functionalities.
6.The developers of such chips may not be interested in revealing the internal detail of it
.
Programmable logic devices(PLD’s):
A PLD is an electronic component. It used to build digital circuits which are
reconfigurable.
A logic gate has a fixed function but a PLD does not have a defined function at the
time of manufacture.
PLDs offer customers a wide range of logic capacity, features, speed, voltage
characteristics.
Advantages of PLDs :-
o PLDs offer customer much more flexibility during the design cycle.
o PLDs do not require long lead times for prototypes or production parts
because PLDs are already on a distributors shelf and ready for shipment.
o PLDs can be reprogrammed even after a piece of equipment is shipped to a
customer
LED (Light Emitting Diode): LED is an important output device for visual
indication in any embedded system.LED used as an indicator for the status of various
signals or situations
LED is a p-n junction diode and contains a CATHODE and
ANODE. For functioning the anode is connected to +ve end of power supply and
cathode is connected to –ve end of power supply. The maximum current flowing
through the LED is limited by connecting a RESISTOR in series between the power
supply and LED as shown in the figure below
A seven segment is generally available in ten pin package. While eight pins
correspond to the eight LEDs, the remaining two pins (at middle) are common and
internally shorted. These segments come in two configurations, namely, Common
cathode (CC) and Common anode (CA). In CC configuration, the negative terminals of
all LEDs are connected to the common pins. The common is connected to ground and a
particular LED glows when its corresponding pin is given high. In CA arrangement, the
Pin Diagram:
when an electrical current is applied to the LED, infrared light is produced and
passes through the material inside the optoisolator. The beam travels across a transparent
gap and is picked up by the receiver, which converts the modulated light or IR back into
Stepper motor :
The Reset circuit is essential to ensure that the device is not operating at a voltage
level where the device is not guaranteed to operate, during system power ON.
The Reset signal brings the internal registers and the different hardware systems of
the processor/controller to a known state and starts the firmware execution from the
The reset signal can be either active high (The processor undergoes reset when
the reset pin of the processor is at logic high) or active low (The processor
undergoes reset when the reset pin of the processor is at logic low).
The reset signal to the processor can be applied at power ON through an
external passive reset circuit comprising a capacitor and resistor or through a
standard rest IC like MAX 810 from maxim Dallas.
Some microprocessors contain inbuilt reset circuitry and they don’t need
external reset circuitry.
The processor behavior may not be predictable if the supply voltage falls below
the recommended operating voltage. It may lead to situations like data corruption
Certain processor/controller chips may not contain a built-in oscillator unit and
require the clock pulses to be generated and supplied externally
Quartz crystal Oscillators are example for clock pulse generating devices.
The total system power consumption is directly proportional to the clock
frequency. The power consumption increase with the increase in the clock
frequency .
The accuracy of the program execution depends on the accuracy of the clock
signal. The accuracy of the clock frequency of the crystal oscillator is
normally expressed in terms of parts per million.
The system component responsible for keeping track of time. RTC holds
information like current time (In hour, minutes and seconds) in 12 hour /24
hour format, date, month, year, day of the week etc and supplies timing
reference to the system
The RTC chip contains a microchip for holding the time and date related
information and backup battery cell for functioning in the absence of power,
in a single IC package
One IRQ can be assigned to the RTC interrupt and the kernel can perform
necessary operations like system date time updation, managing software
timers etc when an RTC timer tick interrupt occurs
Microoprocesso
r/
Controller
Watchdog
Free Running
Reset Pin
Counter
Watchdog Reset
System Clock
1. I2C
2. SPI
3. UART
4. 1-WIRE INTERFACE
Each I2C bus consists of two signals: SCL and SDA. SCL is the clock signal, and SDA
is the data signal. The clock signal is always generated by the current bus master;
some slave devices may force the clock low at times to delay the master sending
more data (or to require more time to prepare data before the master attempts
to clock it out).This is called “clock stretching” .
Messages are broken up into two types of frame: an address frame, where the
master indicates the slave to which the message is being sent, and one or more
data frames, which are 8-bit data messages passed from master to slave or vice
versa. Data is placed on the SDA line after SCL goes low, and is sampled after the
SCL line goes high. The time between clock edge and data read/write is defined by
the devices on the bus and will vary from chip to chip.
Start Condition:
To initiate the address frame, the master device leaves SCL high and pulls SDA
low. This puts all slave devices on notice that a transmission is about to start. If
two master devices wish to take ownership of the bus at one time, whichever
device pulls SDA low first wins the race and gains control of the bus.
Address Frame:
The address frame is always first in any new communication sequence. For a 7-bit
address, the address is clocked out most significant bit (MSB) first, followed by a
R/W bit indicating whether this is a read
(1) or write (0) operation.
The 9th bit of the frame is the NACK/ACK bit. This is the case for all frames (data or
address). Once the first 8 bits of the frame are sent, the receiving device is given
control over SDA. If the receiving device does not pull the SDA line low before the
9th clock pulse, it can be inferred that the receiving device either did not receive
the data or did not know how to parse the message.
MOSI: Master Output Slave Input, or Master Out Slave In (data output from
master).
MISO: Master Input Slave Output, or Master In Slave Out (data output from slave).
UART:
A universal asynchronous receiver/transmitter (UART)is computer hardware
device for asynchronous serial communication which the data format and
transmission speeds are configurable.
The universal asynchronous receiver/transmitter (UART) takes bytes of data
and transmits the individual bits in a sequential fashion. At the destination, a
second UART re-assembles the bits into complete bytes. Each UART contains a
shift register, which is the fundamental method of conversion between serial and
parallel forms.
Communication may be simplex (in one direction only, with no provision for
the receiving device to send information back to the transmitting device), full
duplex (both devices send and receive at the same time) or half duplex (devices
take turns transmitting and receiving).
Parallel communication is and always has been widely used within integrated
circuits, in peripheral buses, and in memory devices such as RAM.
3.INFRARED
4.Bluetooth
5.Wi-Fi
6.Zigbee
7.GPRS
RS485:
RS-485, also known as TIA-485(-A), EIA-485, is a standard defining the electrical
characteristics of drivers and receivers for use in serial communications systems.
Electrical signaling is balanced, and multipoint systems are supported.
RS485 supports inexpensive localnetworks and multidrop communications
links, using the same differential balanced line over twisted pair.
The RS-485 standard specifies differential signaling on two lines rather than
single-ended with a voltage referenced to ground. A logic 1 is a level greater
than
–200 mV, and a logic 0 is a level greater than +200 mV.
The standard transmission medium is twisted-pair cable of either #22 or
[Dept of ECE, MRCET] Page 12
#24 AWG solid wire.
Cable length defines the upper data rate. But because of the lower logic
voltage levels and the differential connection, data rates can exceed 10
Mbits/s depending on cable length.
Maximum cable length is commonly defined as 1200 meters or about 4000
feet. The typical maximum data rate at 4000 feet is 100 kbits/s.
The RS-485 interface can be used in simplex of half- duplex modes with a
single-pair cable.
INFRARED:
BLUETOOTH:
Bluetooth is a wireless technology standard for short distances
(using short-wavelength UHF band
from
2.4 to 2.485 GHz)for exchanging data over radio waves in the ISM
and mobile devices, and building personal area networks (PANs).
Invented by telecom vendor Ericsson in 1994, it was originally
conceived as a wireless alternative to RS- 232 data cables.
Bluetooth uses a radio technology called frequency- hopping spread
spectrum. Bluetooth divides transmitted data into packets, and
WiFi:
Wi-Fi is trademarked name for popular wireless technology
that uses radio waves to provide high-speed Internet and
network connections.
The governing body that owns the term Wi- Fi, the Wi-Fi
Alliance, defines it as any WLAN (wireless area network)
products that are based on the Institute of Electrical and
Electronics Engineers’ (IEEE) 802.11 standards.
The way Wi-Fi works is through the use of radio signals like in
phones. The wireless adapter card that is found inside of computers
then uses the data that is being sent to change it into a radio signal to
then be transmitted by the antenna. A router then receives these
signals and decodes them in order to send the information contained
within to the Internetvia a Local Area Network or a wired Ethernet
connection like a cable network connection.
Formed in 1999
[Dept of ECE, MRCET] Page 17
FoundingCompanies:
3Com
Aironet
Harris Semi Conductor
Lucent
Symbol Technologies
Nokia
Specification:
802.11a
802.11b
802.11g
802.11n
Devices that can use Wi-Fi technology include personal computers,
video-game consoles, smartphones, digital cameras, tablet
computers, smart TVs, digital audio players and modern printers.
Wi-Fi compatible devices can connect to the Internet via a WLAN
and a wireless access point. Such an access point (or hotspot) has a
range of about 20 meters (66 feet) indoors and a greater range
outdoors.
Wi-Fi most commonly uses the 2.4 gigahertz (12 cm) UHF and 5
gigahertz (6 cm) SHF ISM radio bands.
Having no physical connections, it is more vulnerable to attack than
wired connections, such as Ethernet.
The IEEE 802.11 standard is a set of media access control (MAC) and
physical layer(PHY) specifications for implementing wireless local
area network (WLAN) computer communication in the 2.4, 3.6, 5,
and 60 GHz frequency bands. They are created and maintained by
the IEEE LAN/MAN Standards Committee (IEEE802).
The Wi-Fi Alliance approved Wi-Fi Protected Access (WPA) which
uses TKIP. WPA was specifically designed to work with older
equipment usually through a firmware upgrade. Though more secure
than WEP, WPA has known vulnerabilities.
The more secure WPA2 using Advanced Encryption Standard was
introduced in 2004 and is supported by most new Wi-Fi devices.
WPA2 is fully compatible with WPA .
Wi-Fi supports data rates ranging from 1Mbps to 150Mbps
depending on the standards and access/modulation method.
[Dept of ECE, MRCET] Page 18
Depending on the type of antenna and usage location. Wi-Fi offers a
range of 100 to 300 feet.
ZIGBEE:
Zigbee is an IEEE 802.15.4-based specification for a suite of high-
level communication protocols used to create personal area
networks with small, low-power digital radios, such as for home
automation, medical device data collection, and other low-power
low-bandwidth needs, designed for small scale projects which need
wireless connection.
Hence, zigbee is a low-power, low data rate, and close proximity (i.e.,
personal area) wireless ad hoc network.
The technology defined by the zigbee specification is intended to be
simpler and less expensive than other wireless personal area
networks (WPANs), such as Bluetooth or Wi-Fi .
Applications include wireless light switches, electrical meters with
in-home-displays, traffic management systems, and other consumer
and industrial equipment that requires short-range low- rate
wireless data transfer.
Its low power consumption limits transmission distances to 10– 100
meters line-of-sight, depending on power output and environmental
characteristics.
Zigbee devices can transmit data over long distances by passing data
through a mesh network of intermediate devices to reach more
distant ones.
Zigbee Coordinator: The zigbee coordinator acts as the root of the zigbee
network. The ZC is responsible for initiating the Zigbee network and it has
the capability to store information about the network.
[Dept of ECE, MRCET] Page 19
Zigbee Router: Responsible for passing information from device to another device or to
another ZR.
Zigbee end device:End device containing zigbee functionality for data communication. It
can talk only with a ZR or ZC and doesn’t have the capability to act as a mediator for
transferring data from one device to another.
Zigbee supports an operating distance of up to 100 metres an data rate of 20 to 250
Kbps.