3. 15-Feb-24 3
Introduction to Embedded Systems
Structural units in Embedded processor
selection of processor & memory devices
DMA – Memory management methods
Timer and Counting devices
Watchdog Timer,Real Time Clock
In circuit emulator
Target Hardware Debugging.
Characteristics and quality attributes (Design Metric) of embedded
system.
Real time system’s requirements, real time issues, interrupt latency.
4. 15-Feb-24 4
What is Embedded System?
DRIVES
Embedded system is a system that has Hardware with Software
embedded in it, for a dedicated application.
5. 15-Feb-24 5
Redefining - Embedded System
An Embedded system is a
Microcontroller based, Software driven, Reliable ,Real time
control system, Autonomous or Human interactive ,Operate
in diverse environments
6. 15-Feb-24 6
Applications of Embedded Systems
Consumer Electronics
Automobile
Communication
Office Equipments Household Appliances
Avionics
and Every where in our day-to-day life.
7. 15-Feb-24 7
3 main components :
HARDWARE
Processor, RAM, ROM, ADC, DAC, Timers, Ports, etc.
APPLICATION SOFTWARE
written in Assembly, C, C++, Java, etc.
RTOS(Real Time Operating System)
(-To supervise the Application Software
COMPONENTS of Embedded System
8. 8
RTOS (Real Time Operating System)
RTOS defines the way the system work.
RTOS supervises the application software running
on hardware .
It provides a mechanism to let(allow) the processor
to perform a task as per schedule.
It sets the rules during the execution of the
application software.
9. 9
Embedded system design
Constraints
An Embedded system has designed to keep
in view Three constrains
i. Available system memory
ii. Available processor speed
iii. The need to limit power dissipation.
An embedded system also has
constraints with regard to performance, size
and design & manufacturing costs.
10. 10
Classification of Embedded System
Three types
1. Small scale Embedded systems
2. Medium Scale Embedded systems
3. Sophisticated Embedded Systems
1.Small scale Embedded systems
These systems are designed with a single 8-bit or 16-bit
microcontroller.
They have little hardware and software complexities.
Programming tools- Assembler and cross assemblers are used.
“C program” is used for developing these systems.
No need for RTOS.
Applications:
1.Automatic Chocolate Vending machine
2.Washing or cooking system 3.multitasking Toys
4.Robotic systems 5.Automotive system
11. 11
2.Medium scale Embedded systems
These systems are designed with a single of few 16-bit or 32-bit
microcontrollers or DSPs.
They have hardware and software complexities.
Programming tools-RTOS, compiler, Simulator, Debugger and
Integrated Development Environment (IDE) are used.
Programmers or Developers use an IDE to write, manage, and
execute code while running their applications.
“C program” is used for developing these systems.
Example of Applications:
1.Computer Networking Systems
2.Entertainment Systems-such as a video games and a music systems.
3.Banking systems-Bank ATM and Credit card Transactions.
4.Communication Systems -such as mobile communication SIM card .
Cellular Phone.
12. 12
3. Sophisticated Embedded systems
These systems are designed with a single of few 32 bit(ARM)
Microcontroller or 64-bit RISCs(Reduced Instruction Set Computer.
They have Enormous hardware and software complexities.
Programming tools-RTOS.
“C program” is used for developing these systems.
Example of Applications:
1.Wireless LAN
2.Networking Systems
3.Space lifeboat(NASA)-ISS-International Space Station
13. 13
Skills Required for an embedded system
designer
An embedded system engineer should have full skills in hardware
units and complete knowledge of “C”,python..,etc ,RTOS and
other programming tools.
14. 14
Types of processors in embedded system
a. General purpose processor(GPP)
i. Microprocessor
ii. Microcontroller
iii. Embedded processor
iv. Digital signal processor
v. Media processor
b. Application Specific System Processor (ASSP)
- a processor which has been designed to be optimal for a particular
application or domain.
c. Multiprocessor system
-A multiprocessor system consists of multiple processors and a method for
communication between the processors.
-Multiprocessing is the ability for computers to complete multiple tasks at the
same time without having to wait for one task to complete before the next
task can be started. A dual-core processor is twice as fast as a single
processor, and a quad-core processor is four times as fast.
Selection of Processor
15. 15
Selection of Processor
A system designer, the following are
considerations when selecting a processor
1.A processor which operates at higher speed
2.Process execute more instructions per second
3.Processor ability to solve the complex
algorithms.
4. The need to limit power dissipation.
5. A processor that has a burst mode accesses
external memories fast, reads fast and
writes fast.
16. 15-Feb-24 16
Selection of Memory Devices
• Memory is the most important part of a processing system
considering the fact that both the instructions to be executed as
well as the data being manipulated are stored in memory.
• Types of memory devices
• Non-volatile memory (NVM) or non-volatile storage is a type of
computer memory that can retain stored information even
after power is removed.
• In contrast, volatile memory needs constant power in order to
retain data.
- Volatile memory
- SRAM – Static Random Access Memory
- DRAM – Dynamic Random Access Memory
- Non-volatile memory
- Flash memory -EEPROM SD cards (Secure Digital cards)
17. 15-Feb-24 NSS / SECE 17
Factors that are considered while selecting the
memory devices,
1.Data storage size and capacity
2.Speed
3.Bus width
4.Power consumption
5.Cost
18. 15-Feb-24 18
Direct Memory Access (DMA)
Definition:
•Direct memory access (DMA) is a method that allows
an input/output (I/O) device to send or receive data
directly to or from the main memory, bypassing the
CPU to speed up memory operations.
•The process is managed by a chip known as a DMA
controller (DMAC.
•DMA controller performs read and write operations
directly between devices and memory.
22. Memory Allocation
• When a process is created, the memory manager allocates the
memory addresses (blocks) to it by mapping the process
address space.
• Threads of a process share the memory space of the process.
Memory managing strategy for a system
1. Fixed blocks allocation
2. Dynamic blocks allocation
3. Dynamic page allocation
4. Dynamic data memory allocation
5. Dynamic address reallocation
6. Multiprocessor memory allocation
7. Memory protection to OS functions
8. Memory protection among the tasks
9. Budding memory allocation
23. 1. Fixed blocks allocation
Memory address space is divided into fixed blocks and allocated for
processes.
2. Dynamic blocks allocation
Memory address space is divided into blocks . Memory manager
allocates variable size blocks dynamically. Free memory blocks are
allocated for same task to complete the process quickly.
3. Dynamic page allocation
Memory has fixed size blocks called pages.
MMU allocates pages dynamically.(Memory Management Unit)
4. Dynamic data memory allocation
Manager allocates Memory dynamically
structures like nodes , queues and stacks.
5. Dynamic address reallocation
to different data
Manager dynamically allocates the addresses through address
binding.
24. 6. Multiprocessor memory allocation
Memory allocation is between two or more processes.
7. Memory protection to OS functions
The OS function code, data and stack
are in the protected memory area.
8. Memory protection among the tasks
A task function call cannot attempt to
write or read in the exclusive area of memory
space allocated to another task.
9. Budding memory allocation
Allocates memory in powers of 2. It only allocates blocks of
certain sizes.
25. Memory management
Static memory management
Dynamic memory management
• Static Allocation means, that the memory for your variables is
allocated when the program starts. The size is fixed when the
program is created.
• The systems free memory is divided into a group of fixed size
memory blocks.
• When a task finishes using a memory block it must return it to
the group.
26. Memory management
• Dynamic memory management
Dynamic memory allocation –
Dynamic allocation means, that the memory for your
variables is allocated when the program starts. The size is
variable when the program is created.
The exact size and the lifetime of these memory locations
can be controlled.
Employs memory swapping, overlays and
multiprogramming,
Overlay- Allow programs larger than available memory to
be executed by partitioning the code and swapping them from
disk to memory.
27. Memory protection
Hardware failure should not corrupt data in memory. So
use of hardware protection mechanism is recommended.
Hardware protection mechanism is found in
processor .
28. 28
Structural units (or)Components of
an Embedded system Hardware
An Embedded system has software designed to keep
in view Three constrains
i. Available system memory
ii. Available processor speed
iii. The need to limit power dissipation when running
the system continuously in cycles of wait for
event,start,run and stop.
29. 29
Some of the hardware parts of embedded systems are
i. Processor
ii. Power source
iii. Clock oscillator circuit
iv. Timers
v. Memory units
vi. DAC and ADC
vii. LCD and LED displays
viii. Keyboard/Keypad
30. 30
Processors
Processors is the heart of the Embedded System.
Structual units at a Processors in the Embedded System:
A Processor has two essential units:
1. Program Flow Control Unit (CU) –It includes a Fetch Unit for fetching
instructions from the memory.
2. Execution unit (EU) – data transfer operation and data conversion
from one circuit another.
The EU includes the ALU and also the circuit that executes instruction for
program control task, say, Halt, Interrupt and Jump to another set of
Instructions.
A Processor runs the cycles of Fetch and Execute.
31. 31
Types of processors in embedded system
a. General purpose processor(GPP)
i. Microprocessor
ii. Microcontroller
iii. Embedded processor
iv. Digital signal processor
v. Media processor
b. Application Specific System Processor (ASSP)
- a processor which has been designed to be optimal for a particular
application or domain.
c. Multiprocessor system
-A multiprocessor system consists of multiple processors and a method for
communication between the processors.
-Multiprocessing is the ability for computers to complete multiple tasks at the
same time without having to wait for one task to complete before the next
task can be started. A dual-core processor is twice as fast as a single
processor, and a quad-core processor is four times as fast.
32. 32
Power Source:
Generally Embedded system has its own Power supply unit. Four
range of voltage
(i)5.0V ± 0.25V
(ii)3.3V ± 0.3V
(iii) 2.0V ± 0.2V
(iv)1.5V ± 0.2V are use for operation of different units.
Clock Oscillator circuit:
The processor needs a clock oscillator as clock controls the various
clocking requirements of CPU machine cycle.
The machine cycle includes
(i) Fetching the code and data from memory and then decoding and
executing at the processor and (ii) Transferring results to memory .
The clock controls the time for executing an instruction.
33. 33
Reset circuit:
Reset means that the processor starts the processing of
instructions from a starting address.
The reset circuit activates for a fixed period and then deactivates
to let the instruction proceed from a starting address.
Timer:
Timer device is used to count the regular interval clock
pulses at its input.
Memories:
Memory is the important resource, there is a constant
interaction and communication between the processor.
Semiconductor memory is the primary memory
(ROM,EPROM,RAM)
Hard disk is the secondary memory.
All programs run with the data in the RAM.
Software usually Embeds in ROM.
34. 34
Interrupt Handler:
Interrupt handlers are a fundamental component of
operating systems and are essential for managing hardware
interrupts, handling asynchronous events, and ensuring the
proper functioning of Embedded systems. They play a crucial
role in maintaining system stability, responsiveness, and
overall performance.
ADC/DAC
1.ADC stands for Analog-to-Digital Converter. It is a hardware
component or a peripheral device used in embedded systems
and digital circuits to convert analog signals into digital form.
Analog signals are continuous-time signals with varying voltage
or current levels, while digital signals are discrete-time signals
represented by binary numbers (0s and 1s).
2. DAC stands for Digital-to-Analog Converter. It is a device or
a circuit used to convert digital signals into analog signals. In
contrast to ADCs (Analog-to-Digital Converters).
35. 15-Feb-24 NSS / SECE 35
LCD/LED Display(output device)
1.LCD stands for Liquid Crystal Display. It is a flat-panel display
technology commonly used in electronic devices such as televisions,
computer monitors, smartphones, tablets, and digital watches.
2. LCDs work by modulating the light passing through a layer of liquid
crystals to produce images or text.
3.LED stands for Light Emitting Diode. It is a semiconductor device
that emits light when an electric current passes through it. LEDs are
widely used in various applications, including lighting, displays,
indicators, and backlighting.
Keyboard(Input device)
A keypad is a set of buttons arranged in a grid or matrix format,
typically used as a human interface device for inputting numbers,
letters, or other characters into electronic devices. Keypads are
commonly found on various electronic devices such as telephones,
calculators, remote controls, security systems, and electronic locks.
36. 15-Feb-24 NSS / SECE 36
Serial(USART) and Parallel Port
USART stands for Universal Synchronous/Asynchronous
Receiver/Transmitter.
USART facilitates serial communication between a microcontroller
and external devices using a single wire for transmitting data (Tx)
and another wire for receiving data (Rx). This allows for the
exchange of data in a bit-by-bit fashion, enabling reliable
communication over long distances.
A parallel port is a type of interface found on computers and other
devices used for connecting peripherals such as printers, scanners,
and external storage devices.
It allows for parallel communication, meaning that multiple bits of
data are transmitted simultaneously over several wires, as opposed
to serial communication where data is transmitted one bit at a time
over a single wire.
37. Timer and Counting devices
• A timer is a specialized type of clock which is used to
measure time intervals.
• A counter is a device that stores (and sometimes
displays) the number of times a particular event or
process occurred, with respect to a clock signal.
38. Uses of Timer
• Real Time Clock (RTC).
• Watch Dog Timer
• Scheduling of various tasks
• Time Division Multiplexing (TDM)
39. Watch Dog Timer (WDT)
• Watchdog timers are commonly found in embedded
systems and other computer-controlled equipment
where humans cannot easily access the equipment or
would be unable to react to faults in a timely manner.
• Is a timing device that can be set for a preset time
interval and an event must occur during that
interval else the device will generate the time out
signal.
E.g - Mobile phone
The display is turned off in case no GUI interaction
takes place within specified time. This saves power.
40. Watch Dog Timer
When a processorgets reset by the WDT , it is called a soft reset or warm boot
41. Real time clock (RTC)
• Functions as a system heart beat.
• Once the system starts , the clock starts counting and does not
stop.
E.g. – Mobile phone, PC, Laptop
• Displays the system clock which refers to real world time.
• This clock gives us a reading in terms of seconds , minutes
and hour.
• RTC is a dedicated chip.
Lithium battery inside the real-time clock IC
42. In-Circuit Emulator
• In-circuit emulation (ICE) is a specific debugging technique
performed using instruments known as in-circuit emulators.
• An In-circuit emulator (ICE) is a debugging tool that allows
you to access a target MCU for in-depth debugging.
• ICE consists of a hardware board with associated software for
the host computer.
• The ICE is physically connected between the host
computer and the target MCU.
43. In-Circuit Emulator
• ICEs attach a computer terminal or personal computer (PC) to
the embedded system.
• The terminal or PC provides an interactive user interface for
the programmer to investigate and control the
embedded
44. • Without an ICE, the development of embedded systems can be
extremely difficult, because there is usually no way to tell
what went wrong.
• The disadvantage of ICE debugging is that the ICE hardware
must be physically connected to the MCU.
• As chips get smaller, adapters can help in connecting tiny
surface mounted chips to the ICE.
In-Circuit Emulator
45. 15-Feb-24 45
Working principle
The programmer uses the emulator to load programs into
the embedded system, run them, step through them slowly
and view and change data used by the system‘s software. It
imitates the central processing unit of the embedded
system‘s computer.
ICE consists of a small dual port . One port is a probe
that plugs into the microprocessor socket of the target
system. The second port is interfaced to a computer (or)
workstation.
Limitations of ICE:
1. Availability and cost
2. On chip functions
3. Transparency
46. Some of the Hardware debugging tools are
• Magnifying Glass (Lens)
• Multimeter
• Digital CRO
• Logic Analyzer
• Function Generator
Target Hardware Debugging
Hardware debugging involves the monitoring of various
signals of the target board (address/data lines, port pins,
etc.),checking the inter-connection among various
components, circuit continuity checking.
47. Magnifying Glass (lens)
• It is a visual inspection tool.
• Surface of target board can be examined for dry
soldering ,improper soldering, track damage etc..
• Magnifying station incorporates magnifying glass
attached to CFL tubes.
• The station may incorporate multiple lens.
• Main lens acts as visual inspection tool.
• Other small lens is used for magnifying small area of the
board for thorough inspection.
48. Multimeter
• Mutimeter is used for measuring various electrical
quantities.
• Primary debugging tool for physical
contact based hardware debugging.
• Mainly used for checking circuit continuity,
signal value, polarity, measuring supply voltage.
• Both analog and digital versions are available.
• Digital versions have better readability and accuracy.
49. Digital CRO
• CRO is used for waveform capturing and analysis,
measurement of signal strength etc.
• It is a very good tool in analyzing interference noise in
power line and other signal lines.
• They are available in both analog and digital form.
• Digital CROs are suitable for high frequency support
and best suited or target board debugging.
50. Logic analyzer
• Used for capturing digital data from digital circuitry.
• It contains special connectors andclips attached to
target board.
• It captures states of various port pins, address bus and data bus
of target processor.
• Logic analyzers give exact reflection of what happens when
the firmware is running.
51. Function generator
• It is an input signal simulator tool.
• It is capable of producing various periodic waveforms
like sine, square, sawtooth waves.
• The waveforms are of different frequencies and
amplitudes.
• In debugging environment, the function generator
generating and supplying
serves the purpose of
required signals.
52. Characteristics and quality attributes (Design
Metric) of embedded system
Characteristics of embedded system:
It describes six key characteristics of embedded
systems: they are
1. Application specific
2. Reactive and operate in real-time
3. Can operate in harsh environments
4. may be distributed across multiple components
5. aim to be small in size and weight
6. have power concerns.
15-Feb-24 NSS / SECE 52
53. Real time system’s requirements
A real-time system means that the system is subjected
to real-time.
It describes seven key requirement of embedded
systems: they are
1. Application specific
2. High speed
3. Memory space
4. Reactive and operate in real-time
5. Can operate in harsh environments
6. aim to be small in size and weight
7. consume less power
15-Feb-24 53
54. 54
Embedded system design
Constraints (issues)
An Embedded system has designed to keep
in view Three constrains
i. Selection of memory
ii. Selection of processor
iii. Power concern.
An embedded system also has
constraints with regard to application
specific ,performance, size ,design &
manufacturing costs.
55. 15-Feb-24 NSS / SECE 55
An interrupt is a signal sent to the processor asking it to
stop what it’s doing and start handling the interrupt service
routine.
Latency mean DELAY.
The term interrupt latency refers to the “delay between
the start of an Interrupt Request (IRQ) and the start of the
respective Interrupt Service Routine (ISR).
Interrupt Latency
57. 15-Feb-24 57
A few of the Embedded Majors
HCL INFOSYS
TCS Cognizant
Agilent Technologies Boeing
BPL Ford
Hitachi Hyundai
Philips Playstation
Sega Siemens
Sony SCM Microsystems
TATA ELXSI Texas Instruments
Tektronix Vestion