Combined Unit 1 ESIOT
Combined Unit 1 ESIOT
1
Embedded system
Embedded systems are a combination of
hardware and software where software is
usually known as firmware that is
embedded into the hardware. One of its
most important characteristics of these
systems is, it gives the o/p within the time
limits. Embedded systems support to make
the work more perfect and convenient. So,
we frequently use embedded systems in
simple and complex devices too.
The applications of embedded systems
mainly involve in our real life for several
devices like microwave, calculators, TV
remote control, home security and
neighborhood traffic control systems
2
Embedded Processor?
• An embedded processor is a microprocessor that is used in an embedded
system. An embedded system is a computer system that is designed to
perform a specific task within a larger system. It is a self-contained system
that is embedded within a larger device or system and is used to control the
operation of the device.
• Embedded processors are typically found in devices that require real-time
processing capabilities, such as industrial control systems, automotive
systems, and consumer electronics.
• Embedded processors are designed to be small, low-power, and efficient, as
they are typically used in devices where space and power are at a premium.
• They are also designed to be reliable and to operate for long periods of time
without failure.
• Some examples of devices that use embedded processors include
smartphones, TVs, washing machines, and aircraft systems.
3
Types of Embedded Processors
4
Microprocessor
• A microprocessor is a processor that is contained on a microchip, or integrated circuit
(IC). It is a central processing unit (CPU) that executes the instructions of a computer
program. Some features of microprocessors include:
• Instruction set: Microprocessors have a specific instruction set that defines the
operations that they can perform.
• Clock speed: The clock speed of a microprocessor determines how fast it can execute
instructions. Microprocessors typically have high clock speeds, which allows them to
perform tasks quickly.
• Data bus: The data bus is a communication pathway that is used to transfer data
between the microprocessor and other components in a system.
• Address bus: The address bus is a communication pathway that is used to transfer the
address of a memory location between the microprocessor and other components in a
system.
• Cache: Many microprocessors have one or more levels of cache, which is a small amount
of high-speed memory that is used to store frequently accessed data. This helps to
improve the performance of the microprocessor.
5
Microprocessor
• Power consumption:
Microprocessors can have
relatively high power
consumption, which can be a
concern in devices where power is
limited.
• Size: Microprocessors are
designed to be small, as they are
typically used in devices where
space is at a premium.
• Cost: Microprocessors can vary in
cost depending on their
capabilities and features.
6
Microcontroller
A microcontroller is a small, low-power computer that is contained in a single integrated
circuit (IC). It is a type of embedded processor that is used in a wide range of devices,
including consumer electronics, industrial control systems, and automotive systems.
Some features of microcontrollers include:
On-chip peripherals: Many microcontrollers have a variety of on-chip peripherals, such as
timers, serial ports, and analog-to-digital converters, which allow them to interface with
external devices.
Memory: Microcontrollers have both program memory, which stores the instructions
that are executed by the processor, and data memory, which is used to store variables
and other data.
Input/output (I/O) pins: Microcontrollers have a set of I/O pins that can be used to
interface with external devices, such as sensors or actuators.
Low power consumption: Microcontrollers are designed to be low-power, which makes
them suitable for use in battery-powered devices. 7
Microcontroller
9
Characteristics of Embedded System
Generally, an embedded system executes a particular operation and does the
similar work continually. For instance: A pager is constantly functioning as a pager.
• Embedded system must posses the design metric in terms of execution
features like size, power, cost and also performance.
• It must perform fast enough and consume less power to increase battery life.
• Several embedded systems should constantly react to changes in the system
and also calculate particular results in real time without any delay. For
instance, a car cruise controller; it continuously displays and responds to speed
& brake sensors. It must calculate acceleration/de-accelerations frequently in a
limited time; a delayed computation can consequence in letdown to control
the car.
10
Characteristics of Embedded System
11
Applications of Embedded systems
these are applications of microcontroller
12
Applications of Embedded systems
these are also microcontroller applications
13
Introduction to Von Neumann Architecture
Same physical memory address is used for Separate physical memory address is used for
instructions and data. instructions and data.
There is common bus for data and instruction Separate buses are used for transferring data and
transfer. instruction.
Two clock cycles are required to execute single An instruction is executed in a single cycle.
instruction.
CPU can not access instructions and read/write at CPU can access instructions and read/write at the
the same time. same time.
It is used in personal computers and small It is used in micro controllers and signal
computers. processing. 16
Embedded Systems Architecture
18
Embedded Hardware Units and Devices
in a System
1. 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 range
of voltages. Various unis in an embedded system operate in one of the
following four power ranges: 5.0V ± 0.25V, 3.3V ± 0.3V, 2.0V ± 0.2V and
1.5V ± 0.2V. There is generally an inverse relationship between
propagation delay in the gates and operational voltage. Therefore, the 5V
system processor and units are used in most high performance systems.
2. 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 date from memory and then decoding and executing them at the
processor and for transferring the results to memory.
19
Embedded Hardware Units and Devices
in a System
3. 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.
4. Reset Circuit: the reset circuit activates for a fixed period 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 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.
20
Embedded Hardware Units and Devices
in a System
5. Watchdog Timer: It is timing device that resets the system after a
predefined timeout. It is activated within the first few clock cycles after
power-up. It has 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.
6. Memory: In a system, there are various types of memory as shown below:
21
Embedded Software in a System
22
Application Specific Integrated Circuit
(ASIC)
What is an ASIC Chip (Application Specific Integrated Circuit)?
• ASICs are integrated circuits that are specifically
designed and tailored for a particular application or use.
24
Types of ASIC
26
Gate Array ASIC
• Gate Array ASICs: Gate Array ASICs are a type of semi-custom ASIC with predefined transistors on
the silicon wafer, where the designer cannot alter the transistor placement but can change the
interconnections between them using the die's initial metal layers.
• The design utilizes a gate array library for configuration, typically resulting in Channeled, Channel-
less, or Structured Gate Arrays, each varying in interconnection approach. This method, known as
Masked Gate Array, relies on a base array pattern and base cells for circuit design.
27
Gate Array ASIC and Programmable
ASIC
• Channeled Gate Arrays: Utilize predefined routing channels between logic cells for wire
connections, suitable for standardized designs needing flexible interconnect pathways.
• Channel-less Gate Arrays: Lack predefined routing channels, allowing more compact
designs by placing interconnects directly over cells, enhancing chip density.
• Structured Gate Arrays: Combine predefined logic blocks with customizable
interconnect layers, offering a balance between design flexibility and rapid
development.
3. Programmable ASICs
• Programmable Logic Devices (PLD): a type of digital integrated circuit that can
be programmed to perform a wide range of logical operations. They are used
in various applications to implement custom logic circuits without the need for
custom semiconductor manufacturing.
• FPGAs: Reprogrammable and can be used for various applications. They can be
configured by the user after manufacturing according to different needs.
28
Applications of ASIC
29
Embedded Networking and Standards
Communication Interface:
• Communication interface is essential for communicating
with various subsystems of the embedded system and
with the external world.
31
Embedded Networking and Standards
33
Serial Communication-RS232
• RS232 data is sent serially, each bit is sent one after the
next because there is only one data line in each direction.
This mode of data transmission also requires that the
receiver knows when the actual data bits are arriving so
that it can synchronize itself to the incoming data.
34
Serial Communication-RS232
RS-232 Signals:
• Architecturally RS-232 is a bi-
directional point to point link.
• Two independent channels are
established for two-way (full-
duplex) communications.
• RS-232 can also carry
additional signals used for flow
control (RTS, CTS) and modem
control (DCD, DTR, DSR, RI).
35
Serial Communication-RS232
37
Difference Between RS 485 and RS 232
38
Serial Peripheral Interface (SPI)
39
Serial Peripheral Interface (SPI)
40
I2C (Inter Integrated Circuit)
I2C:
• Inter Integrated Circuit Bus (I2C - Pronounced as I square C) is a
synchronous bi-directional half duplex (one-directional
communication at a given point of time).
• The concept of I2C bus was developed by Philips Semiconductors
in the early 1980’s.
• The original intention of I2C was to provide an easy way of
connection between a microprocessor/microcontroller system and
the peripheral chips in Television sets.
• The I2C bus is comprised of two bus lines, namely: Serial Clock –
SCL and Serial Data – SDA.
41
I2C (Inter Integrated Circuit)
I2C Bus
42
I2C (Inter Integrated Circuit)
I2C:
• SCL line is responsible for generating synchronization clock pulses and SDA is
responsible for transmitting the serial data across devices.
• I2C bus is a shared bus system to which many number of I2C devices can be
connected. Devices connected to the I2C bus can act as either Master device or
Slave device.
• The Master device is responsible for controlling the communication by
initiating/terminating data transfer, sending data and generating necessary
synchronization clock pulses.
• Slave devices wait for the commands from the master and respond upon
receiving the commands.
• Master and Slave devices can act as either transmitter or receiver. Regardless
whether a master is acting as transmitter or receiver, the synchronization clock
signal is generated by the Master device only.
• I2C supports multi masters on the same bus.
43
USB (Universal Serial Bus)
USB:
• A common interface that is used to allow
communication between different peripheral devices
like mouse, digital cameras, printers, keyboards, media
devices, scanners, flash drives & external hard drives as
well as a host controller like a smartphone or PC is
known as USB protocol.
The pins of Type A USB are indicated with color wires to perform a particular
function.
• Pin1 (VBUS): It is a red color wire, used for providing power supply.
• Pin2 (D-): It is a differential pair pin available in white color, used for
connectivity of USB.
• Pin3 (D+): It is a differential pair pin available in green color, used for
connectivity of USB.
• Pin4 (GND): It is a Ground pin, available in black color. 45
USB (Universal Serial Bus)
• In the above pins, both the D+ & D- pins indicate the transfer of
data. When a ‘1’ is sent across the wires, then the D+ line will
have positive flow, and if ‘0’ is sent then the reverse happens.
46
USB (Universal Serial Bus)
49
USB (Universal Serial Bus)
• Bluetooth simply follows the principle of transmitting and receiving data using
radio waves.
• It can be paired with the other device which has also Bluetooth but it should
be within the estimated communication range to connect.
• When two devices start to share data, they form a network called piconet
which can further accommodate more than five devices.
53
Bluetooth
54
Bluetooth
Architecture of Bluetooth
The architecture of Bluetooth defines two types of networks:
• Piconet: Piconet is a type of Bluetooth network that
contains one primary node called the master node and
seven active secondary nodes called slave nodes.
• Thus, we can say that there is a total of 8 active nodes which
are present at a distance of 10 meters.
• The communication between the primary and secondary
nodes can be one-to-one or one-to-many.
• Possible communication is only between the master and
slave.
• Slave-slave communication is not possible.
55
Bluetooth
Architecture of Bluetooth
56
Bluetooth
Architecture of Bluetooth
Scatternet:
• It is formed by using various piconets.
57
Bluetooth
Advantages of Bluetooth
• It is a low-cost and easy-to-use device.
Disadvantages of Bluetooth
• It can be hacked and hence, less secure.
58
Zigbee
• ZigBee is a technological standard created for controlling and
sensing the network.
• ZigBee is the Personal Area Network and it is based on IEEE
802.15.4 and is created by Zigbee Alliance.
• ZigBee is an open, global, packet-based protocol designed to
provide an easy-to-use architecture for secure, reliable, low
power wireless networks.
• ZigBee is a standard that addresses the need for very low-cost
implementation of Low power devices with Low data rates for
short-range wireless communications.
• IEEE 802.15.4 supports star and peer-to-peer topologies. The
ZigBee specification supports star and two kinds of peer-to-peer
topologies, mesh and cluster tree.
• ZigBee-compliant devices are sometimes specified as supporting
point-to-point and point-to-multipoint topologies. 59
Zigbee
60
Zigbee
62
Zigbee
Zigbee Network:
63
Zigbee
Zigbee Applications:
1. Home Automation
6. Commercial
8. Home Networking
64
Real Time Embedded Systems
• One of the earliest decision points in embedded systems
design is whether the system will require real-time
computing capabilities
• From controlling elevators, stoplights, the valves of your
washing machine or even how long your toaster toasts,
embedded computing is everywhere.
• Real time systems are those systems that work within
strict time constraints and provide a worst case time
estimate for critical situations
• Think of a car’s airbag deployment system. If the
microcontroller doesn’t detect a collision or
electronically trigger the airbag within a fraction of a
second, the result is tragic.
• Real time computing describes the ability to react to
inputs and deliver the prescribed output within a
constrained time frame. Devices that use real-time
computing are deployed in applications where their
correct functioning can make the difference between life
and death.
Embedded Systems v/s Real Time Embedded
Systems
Feature Embedded System Real-Time Embedded System
Specialized computing system Subset of embedded systems
Definition performing dedicated functions designed to perform tasks within
within a larger system strict timing constraints
May or may not have real-time Always have strict timing
Timing Constraints
constraints constraints
Timing is less critical Timing is crucial
Application
Focus on reliability and Deadlines must be met to avoid
Sensitivity
functionality unacceptable consequences
Generally more complex due to
Can range from simple to
the need to guarantee timely
Design Complexity complex, focusing on
responses, predictability, and
functionality, efficiency and cost
reliability
Real Time Systems
I/O - data
event
time
Real-time
computing system
action
I/O - data
A real time system is a system that reacts to events in the
environment by performing predefined actions WITHIN
SPECIFIED TIME INTEVALS
Real Time Embedded
Systems
• The embedded systems which
respond to real time situation with
the help of its embedded software
and hardware, within the specified
time constraints are called real time
embedded systems
Real Time Embedded
Systems
• The Real time System is a system
which is used for performing
some specific tasks.
• The tasks assigned to real-time
systems need to be completed in
given time interval.
• A real-time embedded system
combines the technologies of
embedded systems and real-time
computing. To achieve the most
complete and accurate
description
Real Time Operating System (RTOS)
• An RTOS is used for embedded systems applications that
are time sensitive or time critical.
• In a time-critical system, the value of completing a task
is linked to its timeliness and tasks that are completed
past the deadline may have a negative value.
• RTOS includes a task scheduler component whose goal is
to ensure that critical tasks meet their deadline, even
when it means sacrificing other areas of performance.
Characteristics of RTES
1. Constant Response: A real-time embedded system
always responds in the same manner to a certain
situation, it is not allowed to deviate from its normal
designated output.
2. Deadline: A deadline is crucial to the working of an
embedded system, a missed deadline can cost lives and
finances
3. Accuracy: Accuracy is important characteristic for RTES.
what would happen if the pacemaker can't maintain the
heartbeat, patient would eventually die
4. Quick Response: The real-time embedded system must
be swift enough to respond to the changing external
environment with immediate effect
Examples of RTES
Domain Application
Pacemaker
Hard RTES Example
Periodic
activity occurs repeatedly
e.g., to monitor environment values, temperature, etc.
period
time
periodic
Types of Event to trigger RTES
Aperiodic
can occur any time
no arrival pattern given
time
aperiodic
aperiodic
Types of Event to trigger RTES
Sporadic
can occur any time, but
minimum time between arrivals
mint
time
sporadic
Typical Real time system example
Temperature
sensor Input port
CPU
Memory