SlideShare a Scribd company logo
Introduction to Embedded Systems
by: Eslam Said
#Learn_and_Compete@2018 ESLAM SAID
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 2
Agenda
▪ Embedded system standard diploma outline
▪ What’s Embedded Systems ?
▪ Embedded Systems Applications
▪ Embedded systems Components
▪ The Embedded real time systems
▪ Embedded systems Constraints
▪ Embedded Systems Characteristics
▪ Embedded Systems Market
▪ Questions
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 3
Embedded system standard diploma outline
▪ Introduction
▪ C programming
▪ General data structure and algorithms
▪ Computer and processor architecture
▪ Embedded systems SW design
▪ Micro-controller interfacing
▪ Introduction to ARM cortex-M4 processor
▪ Real time operating system (RTOS)
▪ Automotive busses technology
▪ Testing
▪ Final embedded system project
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 4
Introduction to Embedded Systems
Introduction to Embedded Systems
Historical overview
▪ Turing machine , 1930, alan turing
▪ Electric modern computer, 1946,
Mauckly & Eckert , [1800 instruction/sec].
▪ Electric Storage Automatic Computer, 1949,
Mauckly & Eckert , [650 instruction/sec].
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID
5
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID
6
Embedded Systems Definition
An embedded system is a combination of computer hardware and software—and perhaps
additional parts, either mechanical or electronic—designed to perform a dedicated function. A
good example is the washing machine Almost every household has one, and tens of millions of
them are used every day, but very few people realize that a computer processor and software
are involved in.
washing machine parts
▪ Status display panel
▪ Switches & Dials
▪ Motor
▪ Power supply
▪ Control unit
▪ Inner water level sensor and solenoid valve
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 7
Embedded Systems Definition
What is a system?
A system is a way to working and organizing or doing one or many tasks
according to a fixed plan (program) or set of rules.
washing machine rules
1- Wash by spinning
2- Rinse
3-Drying by blinking
5- Display the process stage in Each step
6- In case interruption, execute the remaining
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 8
Embedded Systems Definition
▪ Embedded System is one that has computer hardware with software embedded in
it.
▪ Embedded systems are information processing systems that are embedded into a
larger product.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 9
Embedded Systems Definition
❑ Is Computer Embedded System machine?
Embedded System vs Computer
the design of an embedded system to perform a dedicated function is in contrast
to that of the personal computer. It too is comprised of computer hardware and
software and mechanical components (disk drives, for example). However, a
personal computer is not designed to perform a specific function. Rather, it is able
to do many different things. Many people use the term general-purpose computer
to make this distinction clear.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 10
Embedded System vs general-purpose computer
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID
11
Agenda
▪ Embedded system standard diploma outline
▪ What’s Embedded Systems ?
▪ Embedded Systems Applications
▪ Embedded systems Components
▪ The Embedded real time systems
▪ Embedded systems Constraints
▪ Embedded Systems Characteristics
▪ Embedded Systems Market
▪ Questions
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 12
Embedded Systems Applications
Purpose of Embedded Systems
▪ Data collection/Storage /Representation
▪ Data Communication
▪ Data (signal) processing
▪ Monitoring
▪ Control
▪ Application specific user interface
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 13
Embedded Systems Applications
Data Collection/Storage/Representation
▪ Embedded systems designed for the purpose of data collection performs acquisition of
data from the external world.
▪ Data collection is usually done for storage, analysis, manipulation and transmission.
▪ The term “data” refers all kinds of information, such as text, voice, image, video,
electrical signals and any other measurable quantities.
▪ Data can be either analog (continuous) or digital (discrete).
▪ Embedded systems with analog data capturing techniques collect data directly in the
form of analog signal whereas embedded systems with digital data collection
mechanism converts the analog signal to the digital signal using analog to digital (A/D)
converters and then collects the binary equivalent of the analog data.
▪ If the data is digital, it can be directly captured without any additional interface by
digital embedded systems.
▪ The collected data may be stored directly in the system or may be transmitted to some
other systems or it may be processed by the system or it may be deleted instantly after
giving a meaningful representation.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 14
Data Communication
▪ Embedded data communication systems are deployed in applications from complex
satellite communication systems to simple home networking systems.
▪ The data collected by an embedded terminal may require transferring of the same
to some other system located remotely.
▪ The transmission is achieved either by a wire-line medium or by a wire-less
medium.
▪ As technology is changing, wireless medium is becoming the standard for data
communication in embedded systems. It offers cheaper connectivity solutions and
make the communication link free from the hassle of wire bundles.
▪ The data collecting embedded terminal itself can incorporate data communication
units like Wireless modules (Bluetooth, ZigBee, Wi-Fi, etc.) or wire-line modules
(RS-232, USB,etc.).
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 15
Data (Signal) Processing
▪ The data (voice, image, video, electrical signals and other measurable quantities)
collected by embedded systems may be used for various kinds of data processing.
▪ Embedded systems with signal processing functionalities are employed in
applications demanding signal processing like speech recognition, synthesis, audio
video codec, transmission applications, etc.
Monitoring
▪ Almost all embedded products coming under the medical domain are with
monitoring functions only.
▪ They are used for determining the state of some variables using input sensors.
▪ A very good example is the electro cardiogram (ECG) machine for monitoring the
heartbeat of a patient.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 16
Control
▪ Embedded systems with control functionalities impose control over some
variables according to the changes in input variables.
▪ A system with control functionality contains both sensors and actuators.
▪ 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 the input variable to put an impact on the controlling variable to
bring the controlled variable to the specified range.
▪ Air conditioner system used in our home to control the room temperature
to a specified limit is a typical example for embedded system for control
purpose. An air conditioner contains a room temperature sensing element
(sensor) which may be thermistor and a handheld unit for setting up
(feeding) the desired temperature.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 17
Control(cont.)
▪ 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.
▪ The input variable is the current room temperature and the controlled variable is
also the room temperature. The controlling variable is cool air flow by the
compressor unit.
▪ If the controlled variable and input variable are not at the same value, the
controlling variable tries to equalize them through taking actions on the cool air
flow.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 18
Applications specific user interface
▪ Buttons, switches, keypad, lights, speakers, display units, etc. are application-
specific user interfaces.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 19
Embedded Systems example
Automotive
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 20
Automotive(cont.)
modern cars and trucks contain many embedded systems. One embedded system
controls the brakes, another monitors and controls the vehicle's emissions, and a third
displays information on the dashboard. Some luxury car manufacturers have even
touted the number of processors (often more than 60, including one in each headlight)
in advertisements. In most cases, automotive embedded systems are connected by a
communications network.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 21
Other Embedded systems segments
Robotics
Military
Aircraft
Consumer electronics
Image Processing
Aerospace
Automation
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 22
Agenda
▪ Embedded system standard diploma outline
▪ What’s Embedded Systems ?
▪ Embedded Systems Applications
▪ Embedded systems Components
▪ The Embedded real time systems
▪ Embedded systems Constraints
▪ Embedded Systems Characteristics
▪ Embedded Systems Market
▪ Questions
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 23
Embedded systems Components
❑ Hardware ( Processor, Timers, Interrupt controller,
I/O Devices, Memories, Ports, etc.)
❑ Software(application –RTOS)
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 24
Embedded HW
What is a Microcontroller?
a microcontroller is a programmable single chip which controls a process or
system. Microcontrollers are typically used as embedded controllers where they
control part of a larger system such as an appliance, automobile, scientific
instrument or a computer peripheral. Microcontrollers are designed to be low cost
solutions; therefore using them can drastically reduces part and design costs for a
project.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 25
What is a Microcontroller?(cont.)
▪ Physically, a microcontroller is an integrated circuit with pins along each side.
the pins presented by a microcontroller are used for power, ground, oscillator,
I/O ports, interrupt request signals, reset and control.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 26
The Microcontroller in a System
▪ Microcontrollers do not function in isolation. As their name suggests they are
designed to control other devices.
▪ Microcontrollers can interface with other on chip devices like Sensors, Switches,
LEDs , 7-segments, LCD, Keypad and DC Motor.
▪ The microcontroller can accept inputs from some devices and provide outputs to
other devices within any given system. For example, a microcontroller may accept
input from a switch and may send output to an LED. If the switch is pressed the LED
can be signaled by microcontroller .
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 27
A microcontroller has seven main components:
▪ Central processing unit (CPU)
▪ ROM
▪ RAM
▪ Input and Output buffers
▪ Timer
▪ Interrupt circuitry
▪ Buses
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 28
Microcontroller vs microprocessor
▪ A microcontroller is not the same as a microprocessor. A microprocessor is a single
chip CPU used within other computer systems. A microcontroller is itself a single
chip computer system.
▪ Microprocessor consists of an ALU, register array, and a control unit. ALU performs
arithmetical and logical operations on the data received from the memory or an
input device.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 29
Evolution of Microprocessors
First generation – From 1971 to 1972 the era of the first generation came which
brought microprocessors like INTEL 4004 / 4 bit.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 30
Architecture of microcontroller
▪ There are two basic types of architecture: Harvard and Von Neumann.
▪ Microcontrollers most often use a Harvard based architecture.
Von Neumann Architecture
Von Neumann architecture has a single, common memory space where both
program instructions and data are stored. There is a single data bus which
fetches both instructions and data. Each time the CPU fetches a program
instruction it may have to perform one or more read/write operations to data
memory space. It must wait until these subsequent operations are complete
before it can fetch and decode the next program instruction. The advantage to
this architecture lies in its simplicity and economy.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 31
Harvard Architecture
Harvard architecture computers have separate memory areas for program
instructions and data. There are two or more internal data buses which allow
simultaneous access to both instructions and data. The CPU fetches
instructions on the program memory bus. If the fetched instruction requires an
operation on data memory, the CPU can fetch the next program instruction
while it uses the data bus for its data operation.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 32
The Central Processing Unit
▪ The central processing unit (CPU) does all the computing: it fetches, decodes and
executes program instructions and write or read data to and from memory. The
CPU performs the calculations required by program instructions and places the
results of these calculations, if required, into memory space.
▪ Most CPUs are synchronous. This means that they depend on the cycles of a
processor clock. A clock generates a high-frequency square wave usually driven by
a crystal, a RC (resistor capacitor) or an external source. The clock is sometimes
referred to as an oscillator. The clock speed, or oscillation rate, is measured in
megahertz (MHz) which represents one million cycles/second.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 33
The Central Processing Unit
The most important units inside CPU are:
❑ Arithmetic Logic Unit (ALU)
❑ Control Unit (CU)
❑ Registers
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 34
Arithmetic Logic Unit (ALU)
An ALU performs basic arithmetic and logic operations.
arithmetic operations:
▪ Addition
▪ Subtraction
▪ Shifting
▪ Increment
▪ Decrement
logic operations :
▪ Comparisons of values such as NOT, AND, and OR.
ALU status flags:
▪ N,Z,C and V
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 35
Control unit
▪ Control Unit is the part of the computer’s central processing unit (CPU), which
directs the operation of the processor. It is the responsibility of the Control Unit to
tell the computer’s memory, arithmetic/logic unit and input and output devices
how to respond to the instructions that have been sent to the processor.
▪ Instruction Decoder Converts instructions fetched from program memory into
codes which the ALU can understand.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 36
Registers
Registers are used by the CPU to temporarily store data that they can change during
program execution. Most microcontroller registers are memory-mapped, associated
with a memory location, and can be used like any other memory location.
The registers in the processor serve two functions:
User-visible registers: These enable the assembly-language programmer to
minimize main memory references by optimizing the use of registers. For high-
level languages, an optimizing compiler will attempt to make intelligent choices of
which variables to assign to registers and which to main memory locations. Some
high-level languages, such as C and C++, allow the programmer to suggest to the
compiler which (heavily used) variables should be held in registers.
Control and status registers: These are used by the processor to control the
operation of the processor and by privileged, operating-system routines to control
the execution of program.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 37
User-Visible Registers
Data registers can be assigned to a variety of functions by the programmer. In
some cases, they are general purpose in nature and can be used with any machine
instruction that performs operations on data.
Address registers contain main memory addresses of data and instructions, or they
contain a portion of the address that is used in the calculation of the complete
address. they may be devoted to specific function of addressing mode.
Examples
▪ Index register: Indexed addressing is a common mode of addressing that
involves adding an index to a base value to get the effective address.
▪ Stack pointer: If there is user-visible stack addressing, then typically the stack is
in main memory and there is a special register that points to the top of the
stack. This allows the use of instructions that contain no address field, such as
push and pop.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 38
User-Visible Registers
Address registers Examples (cont.)
Segment pointer: With segmented addressing,
memory is divided into variable length blocks
of words called segments. A memory reference
consists of a reference to a particular segment
and an offset within the segment;
this mode of addressing is important in memory
management. In this mode of addressing,
a Segment pointer is used to hold
the address of the base (starting location) of the segment.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 39
User-Visible Registers
Condition codes Registers are Specific Purpose where their bits set by the processor
hardware as the result of operations. For example, an arithmetic operation may
produce a positive, negative, zero, or overflow result. In addition to the result itself
being stored in a register or memory, a condition code is also set. The code may
subsequently be tested as part of a conditional branch operation. Generally, machine
instructions allow these bits to be read by implicit reference, but they cannot be
altered by the programmer.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 40
User-Visible Registers
The accumulator register is a specific Purpose Registers that
can hold operands or results of operations.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 41
User-Visible Registers
▪ A link register is a special-purpose register which holds the address to return to
when a function call completes. This is more efficient than the more traditional
scheme of storing return addressed on a stack. The link register does not require
the writes and reads of the memory containing the stack which can save a
considerable percentage of execution time with repeated calls of small
subroutines.
▪ It can also be used as a general-purpose register if the return address is stored on
the stack.
▪ A link register is used in many instruction set architectures, such as ARM.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 42
Control and Status Registers
The program counter (PC)
holds the address of the next instruction in program memory space. It contains the
address of the next instruction the CPU will process. As each instruction is fetched and
processed by the ALU, the CPU increments the PC.
Instruction register (IR)
Contains the instruction most recently fetched.
Program Status Word Register(PSW)
Is a flag register which become set(1) or
clear(0) depending upon condition after
Operation.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID
43
Control and Status Registers(cont.)
status flags are:
Negative Flag (N)
Zero Flag (Z)
Global Interrupt Enable(I)
Overflow Flag (V)
Carry Flag (C)
Overflow Flag (O): This flag will be set (1) if the result of operation is to large to fit in the number
of bits available to represent it.
Carry Flag (C): This is set to (1) if there is a carry from an addition or subtraction instruction.
Zero Flag (Z): sets it when the result of any operation is zero.
Global Interrupt Enable(I): The Global Interrupt Enable bit must be set for the interrupts to be
enabled
Negative Flag (N): indicates a negative result in an arithmetic or logic operation.
Introduction to Embedded Systems
44#Learn_and_Compete@2018 ESLAM SAID
general purpose registers vs special purpose registers
General purpose – it can be used by most instructions. One can do
arithmetic with them, store data temporally , store function parameters
,return of function ,use them for memory addresses, and so on.
Special purpose – it can only be used for certain purposes and only by
certain instructions. Other instructions may depend on their values
implicitly. Examples are the Stack Pointer. On using PUSH, POP, CALL,
RETURN by certain instructions.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 45
Instruction cycle
❑ Fetch
❑ Decode
❑ Execute
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 46
AVR core architecture
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 47
THE MEMORY HIERARCHY
The design constraints on a computer’s memory can be summed up by
two questions:
• How fast ?
• How much?
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 48
The memory types
ROM(read only memory)
is non-volatile memory used for program information and permanent data. The
microcontroller uses ROM memory space to store program instructions it will execute when
it is started or reset. Program instructions must be saved in non-volatile memory so that
they are not affected by loss of power. The microcontroller usually cannot write data to
program memory space.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 49
Types of ROM
Mask ROM contains a software mask that is burned onto the chip during the
design phase of the semiconductor manufacturing process. These types of
memories due to their low cost are appropriate for embedded systems where
large volumes will be produced. The major drawback is that update of the program
stored in the memory is not possible.
PROM (Programmable Read-Only Memory) This is a read-only non-volatile
memory that can be written (programmed) only once. A special programming
device has to be used for this purpose.
EPROM (Erasable Programmable Read-Only Memory) This memory can
be electrically programmed, but erasing it requires physically exposing it to
ultraviolet light. Due to this specific it’s no longer used in embedded systems.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 50
Types of ROM
EEPROM (Electrically Erasable Programmable Read-Only Memory)
▪ This type of memory can be electrically programmed and erased. The term
EEPROM is commonly used for memories that can be erased in small chunks
(e.g. bytes). It has limited number of erase/write cycles (100,000 - 1,000,000
cycles).
▪ The contents of this memory may be changed during run time (similar to RAM),
but remains permanently saved even if the power supply is off (similar to
ROM).
▪ The erase and program of a single byte can take as long as 10 milliseconds. This
delay prevents an EEPROM from replacing a normal RAM part.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 51
Types of ROM
Flash memory
▪ The flash memory is among the special types of memory that can be erased
and programmed with a block of data. The flash memory keeps its data even
with no power at all. The flash memory is popular because it works fast and
efficiently than EEPROM.
▪ Flash memory is used to hold program code in microcontrollers.
▪ Can be Write/Erase up to 10,000 Cycles.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 52
The memory types
RAM(Random Access Memory)
▪ RAM is used for data memory and allows the CPU to create and
modify data as it executes the application program.
▪ RAM is volatile, it holds its contents only as long as it has a
constant power supply. If power to the chip is turned off, the
contents of RAM are lost.
▪ Integrated RAM chips are available in two form:
SRAM(Static RAM)
DRAM(Dynamic RAM)
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 53
RAM types
DRAM(Dynamic RAM)
▪ DRAM stores data by “writing a charge to the capacitor by way of an access
transistor” and was invented in 1966 by Robert Dennard at IBM and was patented
in 1967. DRAM looks at the state of charge in a transistor-capacitor circuit.
▪ The capacitor arrays will hold their charge only for a short period before it begins to
diminish.
▪ The capacitor is used for storing the data
where bit value 1 signifies that the capacitor
is charged and a bit value 0 means
that capacitor is discharged.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 54
RAM types
SRAM(Static RAM)
▪ SRAM does not use capacitors. SRAM uses several transistors in a
cross-coupled flip-flop configuration and does not have the leakage
issue and does not need to be refreshed.
▪ SRAM does not require power to refresh circuitry.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 55
SRAM vs DRAM
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 56
I/O Ports
▪ The microcontroller has to be connected to additional external electronics and
peripherals. For that reason, each microcontroller has one or more registers called
“port” in this case.
▪ These ports are bidirectional could be output or input.
▪ Each I/O port is under control of another SFR, which means that each bit of that
register determines state of the corresponding microcontroller pin.
▪ Each port has 3 control registers associated with it called DDRx, PORTx, and PINx.
Introduction to Embedded Systems
#Learn_and_Compete@2018
ESLAM SAID 57
Timer
▪ A timer is a counter that is incremented at a fixed rate when the system clock
pulses. There are several different types of timers available. A timer/counter
can perform several different tasks. The CPU uses the timer to keep track of
time accurately. The timer can generate a stream of pulses or a single pulse at
different frequencies. It can be used to start and stop tasks at desired times.
▪ Timer/Counter modules are used to perform timing or counting operations in the
controller. These include counting events, time passed between two events,
generate interrupt after a certain time and generate PWM signals.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 58
Watchdog timer
▪ The Watchdog Timer is a hardware or software generated timer interrupt which
reboots/resets the system in the situations of a software or hardware fault .
▪ The intention is to bring the system back from the unresponsive state into normal operation.
▪ During normal operation, the CPU regularly restarts the watchdog timer to prevent it
from elapsing, or "timing out". If due to a hardware fault or program error, the computer
fails to restart the watchdog, the timer will elapse and generate a reset signal to reset
the CPU.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 59
Interrupts
▪ An interrupt is an event that suspends regular program operation while the
event is serviced by another program. Interrupts increase the response speed to
external events. Different microcontrollers have different interrupt sources
which can include external, timer and serial port interrupts. When an interrupt
is received current operation is suspended, the interrupt is identified and the
controller jumps (vectors) to an interrupt service routine.
▪ There are two different interrupt types: maskable and non-maskable.
• maskable interrupt can be disabled and enabled.
• non-maskable interrupts can not be disabled and are therefore always enabled.
▪ Most 8 bit microcontrollers use vectored arbitration interrupts. Vectored
arbitration means that when a specific interrupt occurs the interrupt handler
automatically branches to an address associated with that interrupt.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID
60
Interrupts
Why interrupt?
Interrupts allow the microcontroller to interact with its environment. If your
microcontroller does not have interrupts you must poll peripherals to determine if require
servicing. It is much more efficient to have peripheral devices inform, or interrupt, the controller
when they require servicing.
Interrupt Handling
▪ Code executed by an interrupt is not generally considered part of the main application. Since
this code handles the cases where an interrupt occurs, it is called an interrupt handler or an
interrupt service routine.
▪ Interrupt handlers are usually short sections of code that are designed to handle the
immediate needs of the device and return control to the operating system or user program.
void ISR (void)
{
//code
}
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 61
Steps in handling interrupts
▪ Interrupt event has occurred.
▪ Store current state of program.
▪ Get the address of the handler routine(vector interrupts only).
▪ Execute appropriate interrupt handling routine.
▪ Restore state of program.
▪ Resume program execution.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 62
Interrupt Latency
▪ The interrupt latency is the interval of time measured from the instant an interrupt
is asserted until the corresponding ISR begins to execute.
▪ The time it takes to finish the program instructions in progress and save the current
program state and begin the ISR.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 63
Interrupt Priority
▪ If more than one interrupt is requesting service , the higher priority one will be
serviced first.
▪ Interrupt priority is determined through interrupt priority register ( in some
microcontrollers).
▪ If two interrupts with the same priority are requesting service, the priority will be
determined by their position in the vector table.
▪ Reset has the highest priority in the vector table.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 64
AVR Architecture
Other Microcontroller ‘s Peripherals:
General Purpose I/O Ports(e.g.)
Blinking an LED with µC
Switch Interface
Switch Interface (using ext. Interrupt)
8-bit Timer/Counter with PWM
Analog Digital Converter(ADC).
Universal Synchronous/Asynchronous Receiver Transmitter(USART).
Serial Peripheral Interface(SPI).
Inter Integrated Circuits(I2C).
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 65
Agenda
▪ Embedded system standard diploma outline
▪ What’s Embedded Systems ?
▪ Embedded Systems Applications
▪ Embedded systems Components
▪ The Embedded Real Time systems
▪ Embedded systems Constraints
▪ Embedded Systems Characteristics
▪ Embedded Systems Market
▪ Questions
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 66
The Embedded Real Time systems
Real-Time Operation
As we know that real-time embedded systems have a time constrained to execute the task. This
time is called a deadline. The soft-real time system may vary the deadline. But the hard real-
time system must complete the task in a given time frame.
Soft-Real-Time System
The example of the soft-real time system could be our day to day lifer products like washing
machine, microwave oven, printer and fax machine. Let’s suppose we are cooking something.
We put some item to cook. We set a time and temperature. As soon as we press the start button
of the oven it takes some random time to start to suppose 15sec. Even after a 15sec delay, it
cooked perfectly, nothing went wrong in cooking. It missed the time by approx. 15sec. This is
generally happening in the soft real-time system.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 67
The Embedded Real Time systems
Hard-Real-Time System
In hard real time system, the time requirement is a critical constraint. The system
should perform within the deadline. If the system didn’t perform within the deadline,
it is considered as a task failure. These types of systems should not miss the deadline.
Missing the deadline can be catastrophic. Air traffic control systems, missile, and
nuclear reactor control systems are few examples for hard real time systems. If the
aircraft control system didn’t give the instructions to the aircraft within the deadline, it
can cause the air craft to crash. Therefore, in a hard-real time system, meeting the
deadline is extremely important. These systems are deployed mainly into safety critical
systems.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 68
Agenda
▪ Embedded system standard diploma outline
▪ What’s Embedded Systems ?
▪ Embedded Systems Applications
▪ Embedded systems Components
▪ The Embedded Environment
▪ Embedded systems Constraints
▪ Embedded Systems Characteristics
▪ Embedded Systems Market
▪ Questions
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 69
Embedded systems Constraints
Main factors in embedded system
➢ Development Tools
• C compiler
• simulator or emulator
• development board
➢ Memory Size
➢ Interfaces
I/O interface for display
I/O interface for keypad
A/D device for temperature sensing
➢ Special Features - e.g. watchdog
➢ Operating Environment
➢ Software Planning
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 70
Embedded systems Constraints
Embedded Systems Design Issues
• Size
• Cost
• Speed
• Power Consumption
• real time applications
There are many aspects of embedded systems development which must be
considered. These are:
Reliability
Efficiency
Cost
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 71
Agenda
▪ Embedded system standard diploma outline
▪ What’s Embedded Systems ?
▪ Embedded Systems Applications
▪ Embedded systems Components
▪ The Embedded Environment
▪ Embedded systems Constraints
▪ Embedded Systems Characteristics
▪ Embedded Systems Market
▪ Questions
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 72
Embedded Systems Characteristics
❑ Embedded systems have to be dependable
▪ Reliability: Reliability is the probability that a system will not fail.
▪ Maintainability: Maintainability is the probability that a failing system can be
repaired within a certain time-frame.
▪ Availability: Availability is the probability that the system is available.
▪ Safety: This term describes the property that a failing system will not cause
any harm.
▪ Security: This term describes the property that confidential data remains
confidential and that authentic communication is guaranteed.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 73
Embedded Systems Characteristics
❑ Embedded systems have to be efficient
Energy: Many embedded systems are mobile systems obtaining their
energy through batteries. computational requirements are increasing at a rapid rate (especially
for multimedia applications) and customers are expecting long run-times from their batteries.
Therefore, the available electrical energy must be
used very efficiently.
Code-size: All the code to be run on an embedded system has to be stored with the system.
Typically, there are no hard discs on which code can be stored.
Run-time efficiency: The minimum amount of resources should be used for implementing the
required functionality. We should be able to meet time constraints using the least amount of
hardware resources and energy. In order to reduce the energy consumption, clock frequencies
and supply voltages should be as small as possible.
Weight: some applications must be of low weight.
Cost: For high-volume embedded systems, especially in consumer electronics, competitiveness
on the market is an extremely crucial issue, and efficient use of hardware components and the
software development budget are required.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 74
Embedded Systems Characteristics
❑ Embedded systems are dedicated towards a certain application
For example, processors running control software in a car or a train will always run that
software, and there will be no attempt to run a computer game. There are mainly reason
for this:
▪ Running additional programs would make those systems less dependable.
❑ Many embedded systems must meet real-time constraints
❑ Portability and flexibility
❑ Software Characteristics
The first step in the software plan is to select an algorithm that solves the problem specified
in your problem specification. Various algorithms should be considered and compared in
terms of code size, speed, difficulty, and ease of maintenance.
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 75
Agenda
▪ Embedded system standard diploma outline
▪ What’s Embedded Systems ?
▪ Embedded Systems Applications
▪ Embedded systems Components
▪ The Embedded Environment
▪ Embedded systems Constraints
▪ Embedded Systems Characteristics
▪ Embedded Systems Market
▪ Questions
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 76
Embedded systems market
Introduction to Embedded Systems
#Learn_and_Compete@2018 ESLAM SAID 77
Contact me
#learn_and_compete
Eng. Eslam Said
Mobile: 01061684411
E-mail: eslam_said199@yahoo.com
linked IN: www.linkedin.com/in/eslam-said-a60694166
Embedded system & RTOS Facebook group:
https://www.facebook.com/groups/2361963167199160/
#Learn_and_Compete@2018 ESLAM SAID 78

More Related Content

What's hot

Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Moe Moe Myint
 
Introduction to Avr Microcontrollers
Introduction to Avr MicrocontrollersIntroduction to Avr Microcontrollers
Introduction to Avr Microcontrollers
Mohamed Tarek
 
Embedded systems ppt
Embedded systems pptEmbedded systems ppt
Embedded systems ppt
Bhavana Sharma
 
Embedded system Design
Embedded system DesignEmbedded system Design
Embedded system Design
AJAL A J
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
Manju Nathan
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
Aditya Porwal
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
Sandeep Reddy
 
1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT
IEEE MIU SB
 
Embedded system
Embedded systemEmbedded system
Embedded system
Anmol Bagga
 
Introduction to arm processor
Introduction to arm processorIntroduction to arm processor
Introduction to arm processor
RAMPRAKASHT1
 
Language for Embedded System
Language for Embedded System Language for Embedded System
Language for Embedded System
vkrhanjeeth .
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
Nishant Kayal
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system design
Mukesh Bansal
 
embedded system and AVR
embedded system and AVRembedded system and AVR
embedded system and AVR
Urvashi Khandelwal
 
ATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part I
VineethMP2
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
Joy Dutta
 
Embedded Software Development
Embedded Software DevelopmentEmbedded Software Development
Embedded Software Development
Sanjay Kumar
 
Introduction To Embedded Systems
Introduction To Embedded SystemsIntroduction To Embedded Systems
Introduction To Embedded Systems
anishgoel
 
Embedded System Presentation
Embedded System PresentationEmbedded System Presentation
Embedded System Presentation
Prof. Erwin Globio
 
AVR ATmega32
AVR ATmega32AVR ATmega32
AVR ATmega32
Prashant Tiwari
 

What's hot (20)

Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
 
Introduction to Avr Microcontrollers
Introduction to Avr MicrocontrollersIntroduction to Avr Microcontrollers
Introduction to Avr Microcontrollers
 
Embedded systems ppt
Embedded systems pptEmbedded systems ppt
Embedded systems ppt
 
Embedded system Design
Embedded system DesignEmbedded system Design
Embedded system Design
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Introduction to arm processor
Introduction to arm processorIntroduction to arm processor
Introduction to arm processor
 
Language for Embedded System
Language for Embedded System Language for Embedded System
Language for Embedded System
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system design
 
embedded system and AVR
embedded system and AVRembedded system and AVR
embedded system and AVR
 
ATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part I
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
Embedded Software Development
Embedded Software DevelopmentEmbedded Software Development
Embedded Software Development
 
Introduction To Embedded Systems
Introduction To Embedded SystemsIntroduction To Embedded Systems
Introduction To Embedded Systems
 
Embedded System Presentation
Embedded System PresentationEmbedded System Presentation
Embedded System Presentation
 
AVR ATmega32
AVR ATmega32AVR ATmega32
AVR ATmega32
 

Similar to Introduction to embedded systems

embeddedsystemspresentation-140524063909-phpapp01.pdf
embeddedsystemspresentation-140524063909-phpapp01.pdfembeddedsystemspresentation-140524063909-phpapp01.pdf
embeddedsystemspresentation-140524063909-phpapp01.pdf
Ashwin180668
 
BEE 049- design of embedded system.pdf
BEE 049- design of embedded system.pdfBEE 049- design of embedded system.pdf
BEE 049- design of embedded system.pdf
abdisahirko
 
embeddedsystemspresentation-140524063909-phpapp01-converted.pptx
embeddedsystemspresentation-140524063909-phpapp01-converted.pptxembeddedsystemspresentation-140524063909-phpapp01-converted.pptx
embeddedsystemspresentation-140524063909-phpapp01-converted.pptx
DrVikasMahor
 
EIOT Unit 1n.pdf
EIOT Unit 1n.pdfEIOT Unit 1n.pdf
EIOT Unit 1n.pdf
RameshGande2
 
Vinod report es 1
Vinod report es   1Vinod report es   1
Vinod report es 1
Govt. Engg. Collage Ajmer
 
Vinod report es 1
Vinod report es   1Vinod report es   1
Vinod report es 1
Govt. Engg. Collage Ajmer
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
lalithamani sampath
 
EMBEDDED SYSTEMS INTRODUCTION.pptx
EMBEDDED SYSTEMS INTRODUCTION.pptxEMBEDDED SYSTEMS INTRODUCTION.pptx
EMBEDDED SYSTEMS INTRODUCTION.pptx
MohammedtajuddinTaju
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
JuliaAndrews11
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
Fahad Farooq
 
Introduction to EMBEDDED SYSTEM.pdf
Introduction to EMBEDDED SYSTEM.pdfIntroduction to EMBEDDED SYSTEM.pdf
Introduction to EMBEDDED SYSTEM.pdf
AkashBhagat32
 
R20 REGULATION JNTUK EMBEDDED SYSTEMS UNIT-1
R20 REGULATION JNTUK EMBEDDED SYSTEMS UNIT-1R20 REGULATION JNTUK EMBEDDED SYSTEMS UNIT-1
R20 REGULATION JNTUK EMBEDDED SYSTEMS UNIT-1
swarna pasupuleti
 
Unit-I Basic Embedded System Notes
Unit-I Basic Embedded System NotesUnit-I Basic Embedded System Notes
Unit-I Basic Embedded System Notes
Dr. Pankaj Zope
 
An entire concept of embedded systems entire ppt
An entire concept of embedded systems entire pptAn entire concept of embedded systems entire ppt
An entire concept of embedded systems entire ppt
Prabhakar Captain
 
An Entire Concept of Embedded systems
An Entire Concept of Embedded systems An Entire Concept of Embedded systems
An Entire Concept of Embedded systems
Prabhakar Captain
 
embededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).pptembededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).ppt
kimavathmukeshnaik
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
Shivashankar Sawalgi
 
Embedded system
Embedded systemEmbedded system
Embedded system
Vinod Srivastava
 
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
kimavathmukeshnaik
 
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
kimavathmukeshnaik
 

Similar to Introduction to embedded systems (20)

embeddedsystemspresentation-140524063909-phpapp01.pdf
embeddedsystemspresentation-140524063909-phpapp01.pdfembeddedsystemspresentation-140524063909-phpapp01.pdf
embeddedsystemspresentation-140524063909-phpapp01.pdf
 
BEE 049- design of embedded system.pdf
BEE 049- design of embedded system.pdfBEE 049- design of embedded system.pdf
BEE 049- design of embedded system.pdf
 
embeddedsystemspresentation-140524063909-phpapp01-converted.pptx
embeddedsystemspresentation-140524063909-phpapp01-converted.pptxembeddedsystemspresentation-140524063909-phpapp01-converted.pptx
embeddedsystemspresentation-140524063909-phpapp01-converted.pptx
 
EIOT Unit 1n.pdf
EIOT Unit 1n.pdfEIOT Unit 1n.pdf
EIOT Unit 1n.pdf
 
Vinod report es 1
Vinod report es   1Vinod report es   1
Vinod report es 1
 
Vinod report es 1
Vinod report es   1Vinod report es   1
Vinod report es 1
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
EMBEDDED SYSTEMS INTRODUCTION.pptx
EMBEDDED SYSTEMS INTRODUCTION.pptxEMBEDDED SYSTEMS INTRODUCTION.pptx
EMBEDDED SYSTEMS INTRODUCTION.pptx
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
Introduction to EMBEDDED SYSTEM.pdf
Introduction to EMBEDDED SYSTEM.pdfIntroduction to EMBEDDED SYSTEM.pdf
Introduction to EMBEDDED SYSTEM.pdf
 
R20 REGULATION JNTUK EMBEDDED SYSTEMS UNIT-1
R20 REGULATION JNTUK EMBEDDED SYSTEMS UNIT-1R20 REGULATION JNTUK EMBEDDED SYSTEMS UNIT-1
R20 REGULATION JNTUK EMBEDDED SYSTEMS UNIT-1
 
Unit-I Basic Embedded System Notes
Unit-I Basic Embedded System NotesUnit-I Basic Embedded System Notes
Unit-I Basic Embedded System Notes
 
An entire concept of embedded systems entire ppt
An entire concept of embedded systems entire pptAn entire concept of embedded systems entire ppt
An entire concept of embedded systems entire ppt
 
An Entire Concept of Embedded systems
An Entire Concept of Embedded systems An Entire Concept of Embedded systems
An Entire Concept of Embedded systems
 
embededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).pptembededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).ppt
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
 
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
 

Recently uploaded

Gas agency management system project report.pdf
Gas agency management system project report.pdfGas agency management system project report.pdf
Gas agency management system project report.pdf
Kamal Acharya
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
PreethaV16
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
Yasser Mahgoub
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
bijceesjournal
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
mahaffeycheryld
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
PriyankaKilaniya
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Gas agency management system project report.pdf
Gas agency management system project report.pdfGas agency management system project report.pdf
Gas agency management system project report.pdf
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 

Introduction to embedded systems

  • 1. Introduction to Embedded Systems by: Eslam Said #Learn_and_Compete@2018 ESLAM SAID
  • 2. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 2
  • 3. Agenda ▪ Embedded system standard diploma outline ▪ What’s Embedded Systems ? ▪ Embedded Systems Applications ▪ Embedded systems Components ▪ The Embedded real time systems ▪ Embedded systems Constraints ▪ Embedded Systems Characteristics ▪ Embedded Systems Market ▪ Questions Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 3
  • 4. Embedded system standard diploma outline ▪ Introduction ▪ C programming ▪ General data structure and algorithms ▪ Computer and processor architecture ▪ Embedded systems SW design ▪ Micro-controller interfacing ▪ Introduction to ARM cortex-M4 processor ▪ Real time operating system (RTOS) ▪ Automotive busses technology ▪ Testing ▪ Final embedded system project Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 4
  • 5. Introduction to Embedded Systems Introduction to Embedded Systems Historical overview ▪ Turing machine , 1930, alan turing ▪ Electric modern computer, 1946, Mauckly & Eckert , [1800 instruction/sec]. ▪ Electric Storage Automatic Computer, 1949, Mauckly & Eckert , [650 instruction/sec]. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 5
  • 6. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 6
  • 7. Embedded Systems Definition An embedded system is a combination of computer hardware and software—and perhaps additional parts, either mechanical or electronic—designed to perform a dedicated function. A good example is the washing machine Almost every household has one, and tens of millions of them are used every day, but very few people realize that a computer processor and software are involved in. washing machine parts ▪ Status display panel ▪ Switches & Dials ▪ Motor ▪ Power supply ▪ Control unit ▪ Inner water level sensor and solenoid valve Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 7
  • 8. Embedded Systems Definition What is a system? A system is a way to working and organizing or doing one or many tasks according to a fixed plan (program) or set of rules. washing machine rules 1- Wash by spinning 2- Rinse 3-Drying by blinking 5- Display the process stage in Each step 6- In case interruption, execute the remaining Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 8
  • 9. Embedded Systems Definition ▪ Embedded System is one that has computer hardware with software embedded in it. ▪ Embedded systems are information processing systems that are embedded into a larger product. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 9
  • 10. Embedded Systems Definition ❑ Is Computer Embedded System machine? Embedded System vs Computer the design of an embedded system to perform a dedicated function is in contrast to that of the personal computer. It too is comprised of computer hardware and software and mechanical components (disk drives, for example). However, a personal computer is not designed to perform a specific function. Rather, it is able to do many different things. Many people use the term general-purpose computer to make this distinction clear. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 10
  • 11. Embedded System vs general-purpose computer Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 11
  • 12. Agenda ▪ Embedded system standard diploma outline ▪ What’s Embedded Systems ? ▪ Embedded Systems Applications ▪ Embedded systems Components ▪ The Embedded real time systems ▪ Embedded systems Constraints ▪ Embedded Systems Characteristics ▪ Embedded Systems Market ▪ Questions Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 12
  • 13. Embedded Systems Applications Purpose of Embedded Systems ▪ Data collection/Storage /Representation ▪ Data Communication ▪ Data (signal) processing ▪ Monitoring ▪ Control ▪ Application specific user interface Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 13
  • 14. Embedded Systems Applications Data Collection/Storage/Representation ▪ Embedded systems designed for the purpose of data collection performs acquisition of data from the external world. ▪ Data collection is usually done for storage, analysis, manipulation and transmission. ▪ The term “data” refers all kinds of information, such as text, voice, image, video, electrical signals and any other measurable quantities. ▪ Data can be either analog (continuous) or digital (discrete). ▪ Embedded systems with analog data capturing techniques collect data directly in the form of analog signal whereas embedded systems with digital data collection mechanism converts the analog signal to the digital signal using analog to digital (A/D) converters and then collects the binary equivalent of the analog data. ▪ If the data is digital, it can be directly captured without any additional interface by digital embedded systems. ▪ The collected data may be stored directly in the system or may be transmitted to some other systems or it may be processed by the system or it may be deleted instantly after giving a meaningful representation. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 14
  • 15. Data Communication ▪ Embedded data communication systems are deployed in applications from complex satellite communication systems to simple home networking systems. ▪ The data collected by an embedded terminal may require transferring of the same to some other system located remotely. ▪ The transmission is achieved either by a wire-line medium or by a wire-less medium. ▪ As technology is changing, wireless medium is becoming the standard for data communication in embedded systems. It offers cheaper connectivity solutions and make the communication link free from the hassle of wire bundles. ▪ The data collecting embedded terminal itself can incorporate data communication units like Wireless modules (Bluetooth, ZigBee, Wi-Fi, etc.) or wire-line modules (RS-232, USB,etc.). Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 15
  • 16. Data (Signal) Processing ▪ The data (voice, image, video, electrical signals and other measurable quantities) collected by embedded systems may be used for various kinds of data processing. ▪ Embedded systems with signal processing functionalities are employed in applications demanding signal processing like speech recognition, synthesis, audio video codec, transmission applications, etc. Monitoring ▪ Almost all embedded products coming under the medical domain are with monitoring functions only. ▪ They are used for determining the state of some variables using input sensors. ▪ A very good example is the electro cardiogram (ECG) machine for monitoring the heartbeat of a patient. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 16
  • 17. Control ▪ Embedded systems with control functionalities impose control over some variables according to the changes in input variables. ▪ A system with control functionality contains both sensors and actuators. ▪ 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 the input variable to put an impact on the controlling variable to bring the controlled variable to the specified range. ▪ Air conditioner system used in our home to control the room temperature to a specified limit is a typical example for embedded system for control purpose. An air conditioner contains a room temperature sensing element (sensor) which may be thermistor and a handheld unit for setting up (feeding) the desired temperature. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 17
  • 18. Control(cont.) ▪ 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. ▪ The input variable is the current room temperature and the controlled variable is also the room temperature. The controlling variable is cool air flow by the compressor unit. ▪ If the controlled variable and input variable are not at the same value, the controlling variable tries to equalize them through taking actions on the cool air flow. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 18
  • 19. Applications specific user interface ▪ Buttons, switches, keypad, lights, speakers, display units, etc. are application- specific user interfaces. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 19
  • 20. Embedded Systems example Automotive Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 20
  • 21. Automotive(cont.) modern cars and trucks contain many embedded systems. One embedded system controls the brakes, another monitors and controls the vehicle's emissions, and a third displays information on the dashboard. Some luxury car manufacturers have even touted the number of processors (often more than 60, including one in each headlight) in advertisements. In most cases, automotive embedded systems are connected by a communications network. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 21
  • 22. Other Embedded systems segments Robotics Military Aircraft Consumer electronics Image Processing Aerospace Automation Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 22
  • 23. Agenda ▪ Embedded system standard diploma outline ▪ What’s Embedded Systems ? ▪ Embedded Systems Applications ▪ Embedded systems Components ▪ The Embedded real time systems ▪ Embedded systems Constraints ▪ Embedded Systems Characteristics ▪ Embedded Systems Market ▪ Questions Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 23
  • 24. Embedded systems Components ❑ Hardware ( Processor, Timers, Interrupt controller, I/O Devices, Memories, Ports, etc.) ❑ Software(application –RTOS) Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 24
  • 25. Embedded HW What is a Microcontroller? a microcontroller is a programmable single chip which controls a process or system. Microcontrollers are typically used as embedded controllers where they control part of a larger system such as an appliance, automobile, scientific instrument or a computer peripheral. Microcontrollers are designed to be low cost solutions; therefore using them can drastically reduces part and design costs for a project. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 25
  • 26. What is a Microcontroller?(cont.) ▪ Physically, a microcontroller is an integrated circuit with pins along each side. the pins presented by a microcontroller are used for power, ground, oscillator, I/O ports, interrupt request signals, reset and control. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 26
  • 27. The Microcontroller in a System ▪ Microcontrollers do not function in isolation. As their name suggests they are designed to control other devices. ▪ Microcontrollers can interface with other on chip devices like Sensors, Switches, LEDs , 7-segments, LCD, Keypad and DC Motor. ▪ The microcontroller can accept inputs from some devices and provide outputs to other devices within any given system. For example, a microcontroller may accept input from a switch and may send output to an LED. If the switch is pressed the LED can be signaled by microcontroller . Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 27
  • 28. A microcontroller has seven main components: ▪ Central processing unit (CPU) ▪ ROM ▪ RAM ▪ Input and Output buffers ▪ Timer ▪ Interrupt circuitry ▪ Buses Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 28
  • 29. Microcontroller vs microprocessor ▪ A microcontroller is not the same as a microprocessor. A microprocessor is a single chip CPU used within other computer systems. A microcontroller is itself a single chip computer system. ▪ Microprocessor consists of an ALU, register array, and a control unit. ALU performs arithmetical and logical operations on the data received from the memory or an input device. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 29
  • 30. Evolution of Microprocessors First generation – From 1971 to 1972 the era of the first generation came which brought microprocessors like INTEL 4004 / 4 bit. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 30
  • 31. Architecture of microcontroller ▪ There are two basic types of architecture: Harvard and Von Neumann. ▪ Microcontrollers most often use a Harvard based architecture. Von Neumann Architecture Von Neumann architecture has a single, common memory space where both program instructions and data are stored. There is a single data bus which fetches both instructions and data. Each time the CPU fetches a program instruction it may have to perform one or more read/write operations to data memory space. It must wait until these subsequent operations are complete before it can fetch and decode the next program instruction. The advantage to this architecture lies in its simplicity and economy. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 31
  • 32. Harvard Architecture Harvard architecture computers have separate memory areas for program instructions and data. There are two or more internal data buses which allow simultaneous access to both instructions and data. The CPU fetches instructions on the program memory bus. If the fetched instruction requires an operation on data memory, the CPU can fetch the next program instruction while it uses the data bus for its data operation. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 32
  • 33. The Central Processing Unit ▪ The central processing unit (CPU) does all the computing: it fetches, decodes and executes program instructions and write or read data to and from memory. The CPU performs the calculations required by program instructions and places the results of these calculations, if required, into memory space. ▪ Most CPUs are synchronous. This means that they depend on the cycles of a processor clock. A clock generates a high-frequency square wave usually driven by a crystal, a RC (resistor capacitor) or an external source. The clock is sometimes referred to as an oscillator. The clock speed, or oscillation rate, is measured in megahertz (MHz) which represents one million cycles/second. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 33
  • 34. The Central Processing Unit The most important units inside CPU are: ❑ Arithmetic Logic Unit (ALU) ❑ Control Unit (CU) ❑ Registers Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 34
  • 35. Arithmetic Logic Unit (ALU) An ALU performs basic arithmetic and logic operations. arithmetic operations: ▪ Addition ▪ Subtraction ▪ Shifting ▪ Increment ▪ Decrement logic operations : ▪ Comparisons of values such as NOT, AND, and OR. ALU status flags: ▪ N,Z,C and V Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 35
  • 36. Control unit ▪ Control Unit is the part of the computer’s central processing unit (CPU), which directs the operation of the processor. It is the responsibility of the Control Unit to tell the computer’s memory, arithmetic/logic unit and input and output devices how to respond to the instructions that have been sent to the processor. ▪ Instruction Decoder Converts instructions fetched from program memory into codes which the ALU can understand. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 36
  • 37. Registers Registers are used by the CPU to temporarily store data that they can change during program execution. Most microcontroller registers are memory-mapped, associated with a memory location, and can be used like any other memory location. The registers in the processor serve two functions: User-visible registers: These enable the assembly-language programmer to minimize main memory references by optimizing the use of registers. For high- level languages, an optimizing compiler will attempt to make intelligent choices of which variables to assign to registers and which to main memory locations. Some high-level languages, such as C and C++, allow the programmer to suggest to the compiler which (heavily used) variables should be held in registers. Control and status registers: These are used by the processor to control the operation of the processor and by privileged, operating-system routines to control the execution of program. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 37
  • 38. User-Visible Registers Data registers can be assigned to a variety of functions by the programmer. In some cases, they are general purpose in nature and can be used with any machine instruction that performs operations on data. Address registers contain main memory addresses of data and instructions, or they contain a portion of the address that is used in the calculation of the complete address. they may be devoted to specific function of addressing mode. Examples ▪ Index register: Indexed addressing is a common mode of addressing that involves adding an index to a base value to get the effective address. ▪ Stack pointer: If there is user-visible stack addressing, then typically the stack is in main memory and there is a special register that points to the top of the stack. This allows the use of instructions that contain no address field, such as push and pop. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 38
  • 39. User-Visible Registers Address registers Examples (cont.) Segment pointer: With segmented addressing, memory is divided into variable length blocks of words called segments. A memory reference consists of a reference to a particular segment and an offset within the segment; this mode of addressing is important in memory management. In this mode of addressing, a Segment pointer is used to hold the address of the base (starting location) of the segment. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 39
  • 40. User-Visible Registers Condition codes Registers are Specific Purpose where their bits set by the processor hardware as the result of operations. For example, an arithmetic operation may produce a positive, negative, zero, or overflow result. In addition to the result itself being stored in a register or memory, a condition code is also set. The code may subsequently be tested as part of a conditional branch operation. Generally, machine instructions allow these bits to be read by implicit reference, but they cannot be altered by the programmer. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 40
  • 41. User-Visible Registers The accumulator register is a specific Purpose Registers that can hold operands or results of operations. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 41
  • 42. User-Visible Registers ▪ A link register is a special-purpose register which holds the address to return to when a function call completes. This is more efficient than the more traditional scheme of storing return addressed on a stack. The link register does not require the writes and reads of the memory containing the stack which can save a considerable percentage of execution time with repeated calls of small subroutines. ▪ It can also be used as a general-purpose register if the return address is stored on the stack. ▪ A link register is used in many instruction set architectures, such as ARM. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 42
  • 43. Control and Status Registers The program counter (PC) holds the address of the next instruction in program memory space. It contains the address of the next instruction the CPU will process. As each instruction is fetched and processed by the ALU, the CPU increments the PC. Instruction register (IR) Contains the instruction most recently fetched. Program Status Word Register(PSW) Is a flag register which become set(1) or clear(0) depending upon condition after Operation. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 43
  • 44. Control and Status Registers(cont.) status flags are: Negative Flag (N) Zero Flag (Z) Global Interrupt Enable(I) Overflow Flag (V) Carry Flag (C) Overflow Flag (O): This flag will be set (1) if the result of operation is to large to fit in the number of bits available to represent it. Carry Flag (C): This is set to (1) if there is a carry from an addition or subtraction instruction. Zero Flag (Z): sets it when the result of any operation is zero. Global Interrupt Enable(I): The Global Interrupt Enable bit must be set for the interrupts to be enabled Negative Flag (N): indicates a negative result in an arithmetic or logic operation. Introduction to Embedded Systems 44#Learn_and_Compete@2018 ESLAM SAID
  • 45. general purpose registers vs special purpose registers General purpose – it can be used by most instructions. One can do arithmetic with them, store data temporally , store function parameters ,return of function ,use them for memory addresses, and so on. Special purpose – it can only be used for certain purposes and only by certain instructions. Other instructions may depend on their values implicitly. Examples are the Stack Pointer. On using PUSH, POP, CALL, RETURN by certain instructions. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 45
  • 46. Instruction cycle ❑ Fetch ❑ Decode ❑ Execute Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 46
  • 47. AVR core architecture Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 47
  • 48. THE MEMORY HIERARCHY The design constraints on a computer’s memory can be summed up by two questions: • How fast ? • How much? Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 48
  • 49. The memory types ROM(read only memory) is non-volatile memory used for program information and permanent data. The microcontroller uses ROM memory space to store program instructions it will execute when it is started or reset. Program instructions must be saved in non-volatile memory so that they are not affected by loss of power. The microcontroller usually cannot write data to program memory space. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 49
  • 50. Types of ROM Mask ROM contains a software mask that is burned onto the chip during the design phase of the semiconductor manufacturing process. These types of memories due to their low cost are appropriate for embedded systems where large volumes will be produced. The major drawback is that update of the program stored in the memory is not possible. PROM (Programmable Read-Only Memory) This is a read-only non-volatile memory that can be written (programmed) only once. A special programming device has to be used for this purpose. EPROM (Erasable Programmable Read-Only Memory) This memory can be electrically programmed, but erasing it requires physically exposing it to ultraviolet light. Due to this specific it’s no longer used in embedded systems. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 50
  • 51. Types of ROM EEPROM (Electrically Erasable Programmable Read-Only Memory) ▪ This type of memory can be electrically programmed and erased. The term EEPROM is commonly used for memories that can be erased in small chunks (e.g. bytes). It has limited number of erase/write cycles (100,000 - 1,000,000 cycles). ▪ The contents of this memory may be changed during run time (similar to RAM), but remains permanently saved even if the power supply is off (similar to ROM). ▪ The erase and program of a single byte can take as long as 10 milliseconds. This delay prevents an EEPROM from replacing a normal RAM part. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 51
  • 52. Types of ROM Flash memory ▪ The flash memory is among the special types of memory that can be erased and programmed with a block of data. The flash memory keeps its data even with no power at all. The flash memory is popular because it works fast and efficiently than EEPROM. ▪ Flash memory is used to hold program code in microcontrollers. ▪ Can be Write/Erase up to 10,000 Cycles. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 52
  • 53. The memory types RAM(Random Access Memory) ▪ RAM is used for data memory and allows the CPU to create and modify data as it executes the application program. ▪ RAM is volatile, it holds its contents only as long as it has a constant power supply. If power to the chip is turned off, the contents of RAM are lost. ▪ Integrated RAM chips are available in two form: SRAM(Static RAM) DRAM(Dynamic RAM) Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 53
  • 54. RAM types DRAM(Dynamic RAM) ▪ DRAM stores data by “writing a charge to the capacitor by way of an access transistor” and was invented in 1966 by Robert Dennard at IBM and was patented in 1967. DRAM looks at the state of charge in a transistor-capacitor circuit. ▪ The capacitor arrays will hold their charge only for a short period before it begins to diminish. ▪ The capacitor is used for storing the data where bit value 1 signifies that the capacitor is charged and a bit value 0 means that capacitor is discharged. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 54
  • 55. RAM types SRAM(Static RAM) ▪ SRAM does not use capacitors. SRAM uses several transistors in a cross-coupled flip-flop configuration and does not have the leakage issue and does not need to be refreshed. ▪ SRAM does not require power to refresh circuitry. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 55
  • 56. SRAM vs DRAM Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 56
  • 57. I/O Ports ▪ The microcontroller has to be connected to additional external electronics and peripherals. For that reason, each microcontroller has one or more registers called “port” in this case. ▪ These ports are bidirectional could be output or input. ▪ Each I/O port is under control of another SFR, which means that each bit of that register determines state of the corresponding microcontroller pin. ▪ Each port has 3 control registers associated with it called DDRx, PORTx, and PINx. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 57
  • 58. Timer ▪ A timer is a counter that is incremented at a fixed rate when the system clock pulses. There are several different types of timers available. A timer/counter can perform several different tasks. The CPU uses the timer to keep track of time accurately. The timer can generate a stream of pulses or a single pulse at different frequencies. It can be used to start and stop tasks at desired times. ▪ Timer/Counter modules are used to perform timing or counting operations in the controller. These include counting events, time passed between two events, generate interrupt after a certain time and generate PWM signals. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 58
  • 59. Watchdog timer ▪ The Watchdog Timer is a hardware or software generated timer interrupt which reboots/resets the system in the situations of a software or hardware fault . ▪ The intention is to bring the system back from the unresponsive state into normal operation. ▪ During normal operation, the CPU regularly restarts the watchdog timer to prevent it from elapsing, or "timing out". If due to a hardware fault or program error, the computer fails to restart the watchdog, the timer will elapse and generate a reset signal to reset the CPU. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 59
  • 60. Interrupts ▪ An interrupt is an event that suspends regular program operation while the event is serviced by another program. Interrupts increase the response speed to external events. Different microcontrollers have different interrupt sources which can include external, timer and serial port interrupts. When an interrupt is received current operation is suspended, the interrupt is identified and the controller jumps (vectors) to an interrupt service routine. ▪ There are two different interrupt types: maskable and non-maskable. • maskable interrupt can be disabled and enabled. • non-maskable interrupts can not be disabled and are therefore always enabled. ▪ Most 8 bit microcontrollers use vectored arbitration interrupts. Vectored arbitration means that when a specific interrupt occurs the interrupt handler automatically branches to an address associated with that interrupt. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 60
  • 61. Interrupts Why interrupt? Interrupts allow the microcontroller to interact with its environment. If your microcontroller does not have interrupts you must poll peripherals to determine if require servicing. It is much more efficient to have peripheral devices inform, or interrupt, the controller when they require servicing. Interrupt Handling ▪ Code executed by an interrupt is not generally considered part of the main application. Since this code handles the cases where an interrupt occurs, it is called an interrupt handler or an interrupt service routine. ▪ Interrupt handlers are usually short sections of code that are designed to handle the immediate needs of the device and return control to the operating system or user program. void ISR (void) { //code } Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 61
  • 62. Steps in handling interrupts ▪ Interrupt event has occurred. ▪ Store current state of program. ▪ Get the address of the handler routine(vector interrupts only). ▪ Execute appropriate interrupt handling routine. ▪ Restore state of program. ▪ Resume program execution. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 62
  • 63. Interrupt Latency ▪ The interrupt latency is the interval of time measured from the instant an interrupt is asserted until the corresponding ISR begins to execute. ▪ The time it takes to finish the program instructions in progress and save the current program state and begin the ISR. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 63
  • 64. Interrupt Priority ▪ If more than one interrupt is requesting service , the higher priority one will be serviced first. ▪ Interrupt priority is determined through interrupt priority register ( in some microcontrollers). ▪ If two interrupts with the same priority are requesting service, the priority will be determined by their position in the vector table. ▪ Reset has the highest priority in the vector table. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 64
  • 65. AVR Architecture Other Microcontroller ‘s Peripherals: General Purpose I/O Ports(e.g.) Blinking an LED with µC Switch Interface Switch Interface (using ext. Interrupt) 8-bit Timer/Counter with PWM Analog Digital Converter(ADC). Universal Synchronous/Asynchronous Receiver Transmitter(USART). Serial Peripheral Interface(SPI). Inter Integrated Circuits(I2C). Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 65
  • 66. Agenda ▪ Embedded system standard diploma outline ▪ What’s Embedded Systems ? ▪ Embedded Systems Applications ▪ Embedded systems Components ▪ The Embedded Real Time systems ▪ Embedded systems Constraints ▪ Embedded Systems Characteristics ▪ Embedded Systems Market ▪ Questions Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 66
  • 67. The Embedded Real Time systems Real-Time Operation As we know that real-time embedded systems have a time constrained to execute the task. This time is called a deadline. The soft-real time system may vary the deadline. But the hard real- time system must complete the task in a given time frame. Soft-Real-Time System The example of the soft-real time system could be our day to day lifer products like washing machine, microwave oven, printer and fax machine. Let’s suppose we are cooking something. We put some item to cook. We set a time and temperature. As soon as we press the start button of the oven it takes some random time to start to suppose 15sec. Even after a 15sec delay, it cooked perfectly, nothing went wrong in cooking. It missed the time by approx. 15sec. This is generally happening in the soft real-time system. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 67
  • 68. The Embedded Real Time systems Hard-Real-Time System In hard real time system, the time requirement is a critical constraint. The system should perform within the deadline. If the system didn’t perform within the deadline, it is considered as a task failure. These types of systems should not miss the deadline. Missing the deadline can be catastrophic. Air traffic control systems, missile, and nuclear reactor control systems are few examples for hard real time systems. If the aircraft control system didn’t give the instructions to the aircraft within the deadline, it can cause the air craft to crash. Therefore, in a hard-real time system, meeting the deadline is extremely important. These systems are deployed mainly into safety critical systems. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 68
  • 69. Agenda ▪ Embedded system standard diploma outline ▪ What’s Embedded Systems ? ▪ Embedded Systems Applications ▪ Embedded systems Components ▪ The Embedded Environment ▪ Embedded systems Constraints ▪ Embedded Systems Characteristics ▪ Embedded Systems Market ▪ Questions Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 69
  • 70. Embedded systems Constraints Main factors in embedded system ➢ Development Tools • C compiler • simulator or emulator • development board ➢ Memory Size ➢ Interfaces I/O interface for display I/O interface for keypad A/D device for temperature sensing ➢ Special Features - e.g. watchdog ➢ Operating Environment ➢ Software Planning Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 70
  • 71. Embedded systems Constraints Embedded Systems Design Issues • Size • Cost • Speed • Power Consumption • real time applications There are many aspects of embedded systems development which must be considered. These are: Reliability Efficiency Cost Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 71
  • 72. Agenda ▪ Embedded system standard diploma outline ▪ What’s Embedded Systems ? ▪ Embedded Systems Applications ▪ Embedded systems Components ▪ The Embedded Environment ▪ Embedded systems Constraints ▪ Embedded Systems Characteristics ▪ Embedded Systems Market ▪ Questions Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 72
  • 73. Embedded Systems Characteristics ❑ Embedded systems have to be dependable ▪ Reliability: Reliability is the probability that a system will not fail. ▪ Maintainability: Maintainability is the probability that a failing system can be repaired within a certain time-frame. ▪ Availability: Availability is the probability that the system is available. ▪ Safety: This term describes the property that a failing system will not cause any harm. ▪ Security: This term describes the property that confidential data remains confidential and that authentic communication is guaranteed. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 73
  • 74. Embedded Systems Characteristics ❑ Embedded systems have to be efficient Energy: Many embedded systems are mobile systems obtaining their energy through batteries. computational requirements are increasing at a rapid rate (especially for multimedia applications) and customers are expecting long run-times from their batteries. Therefore, the available electrical energy must be used very efficiently. Code-size: All the code to be run on an embedded system has to be stored with the system. Typically, there are no hard discs on which code can be stored. Run-time efficiency: The minimum amount of resources should be used for implementing the required functionality. We should be able to meet time constraints using the least amount of hardware resources and energy. In order to reduce the energy consumption, clock frequencies and supply voltages should be as small as possible. Weight: some applications must be of low weight. Cost: For high-volume embedded systems, especially in consumer electronics, competitiveness on the market is an extremely crucial issue, and efficient use of hardware components and the software development budget are required. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 74
  • 75. Embedded Systems Characteristics ❑ Embedded systems are dedicated towards a certain application For example, processors running control software in a car or a train will always run that software, and there will be no attempt to run a computer game. There are mainly reason for this: ▪ Running additional programs would make those systems less dependable. ❑ Many embedded systems must meet real-time constraints ❑ Portability and flexibility ❑ Software Characteristics The first step in the software plan is to select an algorithm that solves the problem specified in your problem specification. Various algorithms should be considered and compared in terms of code size, speed, difficulty, and ease of maintenance. Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 75
  • 76. Agenda ▪ Embedded system standard diploma outline ▪ What’s Embedded Systems ? ▪ Embedded Systems Applications ▪ Embedded systems Components ▪ The Embedded Environment ▪ Embedded systems Constraints ▪ Embedded Systems Characteristics ▪ Embedded Systems Market ▪ Questions Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 76
  • 77. Embedded systems market Introduction to Embedded Systems #Learn_and_Compete@2018 ESLAM SAID 77
  • 78. Contact me #learn_and_compete Eng. Eslam Said Mobile: 01061684411 E-mail: eslam_said199@yahoo.com linked IN: www.linkedin.com/in/eslam-said-a60694166 Embedded system & RTOS Facebook group: https://www.facebook.com/groups/2361963167199160/ #Learn_and_Compete@2018 ESLAM SAID 78