Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
EMBEDDED SYSTEM BASICS
AND APPLICATION
Prepared by:
Dr. Amr Rashed
Perquisites
• Basics of electric and electronic circuits
• Computer architecture and organization
• Control system
• Digital logic design
• Basics of C programming language
Agenda
System
Embedded
System
Components History
Processors
Other
Hardware
Software Applications
What is a system
• A system is an arrangement where all components work together according to a set of rules.
• It can be defined as a way of working, organizing, or doing tasks according to a fixed plan.
• Examples of systems include watches that display time, with components following set rules
for functioning.
• All subcomponents within a system depend on each other for proper functioning.
• A system follows a plan, program, or set of rules.
• Its units assemble and work together according to the plan or program.
SYSTEM EXAMPLES
WATCH
It is a time display SYSTEM
Parts: Hardware, Needles, Battery, Dial, Chassis and Strap
Rules
1.All needles move clockwise only
2.A thin needle rotates every second
3.A long needle rotates every minute
4.A short needle rotates every hour
5.All needles return to the original position after 12 hours
SYSTEM EXAMPLES
• WASHING MACHINE
• It is an automatic clothes washing SYSTEM
• Parts: Status display panel, Switches & Dials,
Motor, Power supply & control unit, Inner water
level sensor and solenoid valve.
• Rules
• 1.Wash by spinning 2.Rinse 3.Drying 4.Wash over by
blinking 5.Each step display the process stage 6.In
case interruption, execute only the remaining
EMBEDDED
SYSTEM
• An embedded system is a type of electronic system
programmed and embedded in computer hardware to
perform single or multiple tasks according to a set of rules.
• It can be programmable or non-programmable and
includes both hardware and software components that
work together to perform a specific function.
• Examples of embedded systems include microwave
ovens, washing machines, automobiles, and cameras
using microprocessors, microcontrollers, and DSPs.
• Embedded means something attached to another thing
and can be an independent system or part of a larger
system.
• It is designed to perform a specific task and is usually
microcontroller or microprocessor based.
• A fire alarm is an example of an embedded system as it
senses only smoke.
COMPUTER HARDWARE
Embedded
system
application
Examples of Embedded sytems
introduction to embedded system presentation
COMPONENTS OF EMBEDDED SYSTEM
It has Hardware
Processor, Timers, Interrupt controller, I/O Devices, Memories, Ports, etc.
• It has main Application Software
Which may perform concurrently the series of tasks or multiple tasks.
• It has Real Time Operating System (RTOS)
RTOS defines the way the system work. Which supervise the application software.
It sets the rules during the execution of the application program. A small-scale
embedded system may not need an RTOS
So, we can define an embedded system as a Microcontroller based, software
driven, reliable, real-time control system
EMBEDDED SYSTEM HARDWARE
HISTORY OF EMBEDDED SYSTEMS
 Embedded Systems were in existence even before the IT evolution.
 In the olden days embedded systems were built around the old vacuum tube and
transistor technologies and the embedded algorithm was developed in low level languages.
 Advances in semiconductor and Nano-Technology and IT revolution gave way to the
development of miniature embedded systems.
HISTORY OF EMBEDDED SYSTEMS
introduction to embedded system presentation
HISTORY OF EMBEDDED
SYSTEMS
• The first recognized modern embedded system is
the Apollo Guidance Computer(AGC)
• developed by the MIT instrumentation
laboratory for the LUNAR EXPEDITION( ‫الي‬ ‫البعثة‬
‫)القمر‬.
• They ran the inertial guidance systems of both
the Command Module(CM) and Lunar Excursion
Module(LEM).
• The command module was designed to encircle
the moon while the Lunar Module
• and its crew were designed to go down to the
moon surface and land there safely.
HISTORY OF EMBEDDED SYSTEMS
• The Lunar Module featured in total 18 engines. There were 16 reaction control thrusters, a descent engine and an ascent engine.
• The descent engine was designed to provide thrust (
‫توجه‬
) to the lunar module out of the lunar orbit and land it safely on the moon.
• The MIT’s original design was based on 4K words of ROM and 256 words of RAM.
• By june 1963, it reached 10K ROM and 1K RAM.
• The final configuration was 36K ROM and 2K of RAM.
• The clock frequency of the first microchip photo model used in AGC was 1.024MHz and it was derived from a
2.048MHz crystal clock.
• Around 5000 ICs supplied by Fairchild Semiconductor were used in this design.
• The user interface unit of AGC is known as DSKY(Display/Keyboard).
• DSKY looked like a calculator type keypad with an array of numerals.
• The first mass-produced embedded system was the guidance computer for the Minuteman-I missile in 1961.
• It was the “AUTONETICS D-17” guidance computer but using discrete transistor logic and a hard-disk for main
memory.
Characteristics of an Embedded System
• Single-functioned − An embedded system usually repeats a specialized operation. For example: A
pager always functions as a pager.
• Tightly constrained − All computing systems have constraints on design metrics like cost, size,
power, and performance but those on an embedded system can be especially tight. Design metrics
is a measure of an implementation's features. It must be of a size to fit on a single chip, must
perform fast enough to process data in real time and consume minimum power to extend battery
life.
• Reactive (
‫تفاعلي‬
) and Real time − Many embedded systems must continually react to changes in
the system's environment and must compute certain results in real time without any delay. For
example, a car cruise(‫)االنسيابية‬ controller that continually monitors and reacts to speed and brake
sensors. It must compute acceleration or decelerations repeatedly within a limited time; a delayed
computation can result in failure to control of the car.
• Microprocessors based − It must be microprocessor or microcontroller based.
• Memory − It must have a memory, as its software usually embeds in ROM.
• Connected − It must have connected peripherals to connect input and output devices.
• HW-SW systems − Software is used for more features and flexibility. Hardware is used for
performance and security
Advantages and
disadvantages
• Advantages
• Small size
• Low power consumption
• Low cost
• Enhanced performance
• Easily customizable
• Disadvantages
• High development effort
• Larger time to market
Basic Structure of an Embedded
System
• a processor, sensor, memory, D-A converters, input/output (I/O) interfaces, graphical user interfaces, and software.
• The processor is the heart of the embedded system. It is a central processing unit (CPU) that allows all the integrations of the
embedded system. The design of the type of processor used in an embedded system depends on the application. For example, a
simple embedded system for a toy may use a microcontroller, while a more complex embedded system, such as the one in an airplane,
may use a microprocessor.
• A sensor is a device that converts physical quantity into electrical signals. It senses the conditions of the external world and provides
input to the embedded system.
• Memory stores data and programs. There are two types of memory: volatile and non-volatile. Volatile memory, such as RAM, loses its
contents when the power is off. Non-volatile memory, such as ROM, retains its contents even when the power is off.
• D-A converters convert digital signals into analog signals.
• I/O interfaces connect the embedded system to the outside world. They provide a means for the system to receive input from and
send output to the external world.
• Graphical user interfaces (GUI) provide a visual interface between the embedded system and the user. The GUI enables the user to
interact with the embedded system without needing to understand the underlying hardware and software"
Cont .
• The Embedded system hardware
includes elements like user
interface, input/output interfaces,
display and memory, etc.
• Generally, an embedded system
comprises power supply,
processor, memory, timers, serial
communication ports and system
application specific circuits.
Needs skills for embedded software engineering
Firmware vs Software (Nature of the code)
Firmware vs Software (Nature of the code)
Firmware vs Software (failure)
Firmware vs Software (failure)
Embedded systems terminology
Embedded systems terminology
Processors in a System
• Processor is the heart of an embedded system. It is the basic unit that takes inputs and produces an output after processing the
data. For an embedded system designer, it is necessary to have the knowledge of both microprocessors and microcontrollers.
• A processor has two essential units
1. Program Flow Control Unit (CU)
2. Execution Unit (EU) The CU includes a fetch unit for fetching instructions from the memory.
The EU has circuits that implement the instructions pertaining to data transfer operation and data conversion from one form to
another.
The EU includes the Arithmetic and Logical Unit (ALU) and also the circuits that execute instructions for a program control task
such as interrupt, or jump to another set of instructions.
A processor runs the cycles of fetch and executes the instructions in the same sequence as they are fetched from memory.
Types of Processors
• Processors can be of the following categories −
 General Purpose Processor (GPP)
o Microprocessor
o Microcontroller
o Embedded Processor
o Digital Signal Processor
o Media Processor
 Application Specific System Processor (ASSP)
 Application Specific Instruction Processors (ASIPs)
 GPP core(s) or ASIP core(s) on either an Application Specific Integrated Circuit (ASIC) or a Very Large-Scale
Integration (VLSI) circuit.
MICROPROCESSOR
• A microprocessor is a single chip semi
conductor device also which is a computer on
chip, but not a complete computer.
• Its CPU contains an ALU, a program counter, a
stack pointer, some working register, a clock
timing circuit and interrupt circuit on a single
chip.
• To make complete micro computer, one must
add memory usually ROM and RAM, memory
decoder, an oscillator and a number of serial and
parallel ports
Microprocessor
• A microprocessor is a single VLSI chip
having a CPU. In addition, it may also
have other units such as coaches,
floating point processing arithmetic
unit, and pipelining units that help in
faster processing of instructions.
• Earlier generation microprocessors’
fetch-and-execute cycle was guided
by a clock frequency of order of ~1
MHz. Processors now operate at a
clock frequency of 2GHz
Microcontroller
• A microcontroller is a single-chip VLSI
unit (also called microcomputer) which,
although having limited computational
capabilities, possesses enhanced
input/output capability and a number of
on-chip functional units.
• Microcontrollers are particularly used
in embedded systems for real-time
control applications with on-chip program
memory and devices.
CPU RAM ROM
I/O Port Timer Serial COM
Port
Difference between General purpose computer and Embedded systems
Difference between General purpose computer
and Microcontroller
MICROPROCESSOR
Vs
MICROCONTROLLE
R
Difference between General purpose
computer and Microcontroller
Embedded Systems - Architecture Types
• The 8051 microcontrollers work with 8-bit data bus. So they can support external
data memory up to 64K and external program memory of 64k. They can address
128k of external memory
• When data and code lie in different memory blocks, then the architecture is
referred as Harvard architecture.
• In case data and code lie in the same memory block, then the architecture is
referred as Von Neumann architecture.
Architecture of Embedded
Systems
• Von Neumann architecture
• Von Neumann Architecture: The Von Neumann architecture was first proposed by a computer
scientist John von Neumann. In this architecture, one data path or bus exists for both
instruction and data. As a result, the CPU does one operation at a time. It either fetches an
instruction from memory or performs read/write operation on data. So, an instruction fetch,
and a data operation cannot occur simultaneously, sharing a common bus. Von-Neumann
architecture supports simple hardware. It allows the use of a single, sequential memory.
Today's processing speeds vastly outpace memory access times, and we employ a very fast
but small amount of memory (cache) local to the processor.
• Harvard Architecture
• The Harvard architecture offers separate storage and signal buses for instructions and data.
This architecture has data storage entirely contained within the CPU, and there is no access
to the instruction storage as data. Computers have separate memory areas for program
instructions and data using internal data buses, allowing simultaneous access to both
instructions and data. Programs needed to be loaded by an operator; the processor could not
boot itself. In a Harvard architecture, there is no need to make the two memories share
properties.
Von
Neumann
architecture
Harvard
Architecture
Harvard Vs Von-Neuman architecture
Von-Neumann Architecture vs Harvard Architecture
CISC and RISC architecture
CISC is a Complex Instruction Set
Computer. It is a computer that can
address a large number of instructions.
In the early 1980s, computer designers
recommended that computers should
use fewer instructions with simple
constructs so that they can be executed
much faster within the CPU without
having to use memory. Such computers
are classified as Reduced Instruction
Set Computer or RISC.
RISC Processor
 RISC stands for Reduced Instruction Set Computer Processor
 It uses a simple collection and highly customized set of instructions
 Its architecture is built to minimize instruction execution time by
optimizing and limiting the number of instructions
 Each instruction cycle requires only one clock cycle with three
parameters: fetch, decode, and execute
 RISC processors are used to perform various complex instructions
by combining them into simpler ones
 RISC chips require several transistors, which makes it cheaper to
design and reduces execution time for instructions
 Examples of RISC processors are SUN's SPARC, PowerPC,
Microchip PIC processors, RISC-V.
Advantages of RISC
Processor
1.The RISC processor's performance is better due to
the simple and limited number of the instruction set.
2.It requires several transistors that make it cheaper
to design.
3.RISC allows the instruction to use free space on a
microprocessor because of its simplicity.
4.RISC processor is simpler than a CISC processor
because of its simple and quick design, and it can
complete its work in one clock cycle.
Disadvantages of
RISC Processor
1.The RISC processor's performance may vary
according to the code executed because
subsequent instructions may depend on the
previous instruction for their execution in a cycle.
2.Programmers and compilers often use complex
instructions.
3.RISC processors require very fast memory to save
various instructions that require a large collection of
cache memory to respond to the instruction in a
short time.
RISC
Architectur
e
• It is a highly customized
set of instructions used
in portable devices due
to system reliability
such as Apple iPod,
mobiles/smartphones,
Nintendo DS
Features of RISC
Processor
• Some important features of RISC processors are:
1. One cycle execution time: For executing each instruction in a computer, the
RISC processors require one CPI (Clock per cycle). And each CPI includes the
fetch, decode and execute method applied in computer instruction.
2. Pipelining technique: The pipelining technique is used in the RISC processors to
execute multiple parts or stages of instructions to perform more efficiently.
3. A large number of registers: RISC processors are optimized with multiple
registers that can be used to store instruction and quickly respond to the computer
and minimize interaction with computer memory.
4. It supports a simple addressing mode and fixed length of instruction for executing
the pipeline.
5. It uses LOAD and STORE instruction to access the memory location.
6. Simple and limited instruction reduces the execution time of a process in a RISC.
CISC Processor
• CISC stands for Complex Instruction Set Computer and was
developed by Intel.
• It has a large collection of complex instructions that range from
simple to very complex and specialized in the assembly language
level.
• CISC approaches reducing the number of instructions on each
program and ignores the number of cycles per instruction.
• It emphasizes building complex instructions directly in the hardware
because the hardware is always faster than software.
• CISC chips are relatively slower compared to RISC chips but use
fewer instructions than RISC.
• Examples of CISC processors include VAX, AMD, Intel x86, and the
System/360.
Characteristics of
CISC Processor
• Following are the main characteristics of the RISC processor:
1. The length of the code is shorts, so it requires very little RAM.
2. CISC or complex instructions may take longer than a single clock cycle to
execute the code.
3. Less instruction is needed to write an application.
4. It provides easier programming in assembly language.
5. Support for complex data structure and easy compilation of high-level
languages.
6. It is composed of fewer registers and more addressing nodes, typically 5
to 20.
7. Instructions can be larger than a single word.
8. It emphasizes the building of instruction on hardware because it is faster
to create than the software.
CISC
Processors
Architecture
• The CISC architecture helps reduce
program code by embedding multiple
operations on each program instruction,
which makes the CISC processor more
complex. The CISC architecture-based
computer is designed to decrease
memory costs because large programs
or instruction required large memory
space to store the data, thus increasing
the memory requirement, and a large
collection of memory increases the
memory cost, which makes them more
expensive
Advantages
of CISC
Processors
1.The compiler requires little effort to translate high-level
programs or statement languages into assembly or
machine language in CISC processors.
2.The code length is quite short, which minimizes the
memory requirement.
3.To store the instruction on each CISC, it requires very
less RAM.
4.Execution of a single instruction requires several low-
level tasks.
5.CISC creates a process to manage power usage that
adjusts clock speed and voltage.
6.It uses fewer instructions set to perform the same
instruction as the RISC.
Disadvantag
es of CISC
Processors
1.CISC chips are slower than RSIC chips to execute per
instruction cycle on each program.
2.The performance of the machine decreases due to the
slowness of the clock speed.
3.Executing the pipeline in the CISC processor makes it
complicated to use.
4.The CISC chips require more transistors as compared
to RISC design.
5.In CISC it uses only 20% of existing instructions in a
programming event.
RISC vs CISC
An example of a
RISC instruction
• Example Instruction: ADD R1, R2, R3
• This instruction adds the contents of registers R2 and R3 and stores the result in
register R1.
• Step 1: Fetch Instruction The processor fetches the ADD instruction from memory and
loads it into the instruction register.
• Step 2: Decode Instruction The processor decodes the instruction by determining the
operation to be performed (addition), and the source and destination registers (R1, R2,
and R3).
• Step 3: Execute Instruction The processor executes the ADD instruction by adding the
contents of registers R2 and R3 and storing the result in register R1.
• Step 4: Store Result The processor stores the result of the addition operation (sum of
R2 and R3) in register R1.
• This simple example demonstrates how RISC instructions are executed. By using a
simplified instruction set, RISC processors can perform operations quickly and
efficiently, making them ideal for applications that require high-speed processing, such
as real-time control systems, signal processing, and multimedia applications.
An example
of a CISC
instruction
• Example Instruction: MOV AX, [BX+SI+10]
• This instruction moves the contents of the memory location specified by the sum of registers BX, SI,
and 10 into register AX.
• Step 1: Fetch Instruction The processor fetches the MOV instruction from memory and loads it into
the instruction register.
• Step 2: Decode Instruction The processor decodes the instruction by determining the operation to
be performed (move data), the source (memory location specified by [BX+SI+10]), and the
destination (register AX).
• Step 3: Calculate Memory Address The processor calculates the memory address by adding the
values in registers BX, SI, and 10. This involves several sub-steps:
• The processor reads the value of register BX, which contains a memory address.
• The processor reads the value of register SI, which contains an offset.
• The processor adds the values of BX, SI, and 10 to calculate the memory address.
• Step 4: Retrieve Data from Memory The processor retrieves the data from memory using the
calculated memory address. This involves several sub-steps:
• The processor sends the memory address to the memory controller.
• The memory controller accesses the memory location and retrieves the data.
• The memory controller sends the data back to the processor.
• Step 5: Move Data to Destination Register The processor moves the retrieved data into register AX.
• This example demonstrates how CISC instructions are executed. By including a wide range of
instructions, CISC processors can perform complex operations using multiple sub-steps. While this
can result in slower execution times compared to RISC processors, CISC processors excel at
handling complex data structures and performing a wide range of operations on them. This makes
them ideal for applications such as database management, scientific computing, and high-level
programming languages.
CISC and
RISC
architecture
• RISC:
• Reduced Instruction Set Computing
• Examples of processors that use this
architecture include ARM Cortex-A series,
MIPS, and PowerPC.
• Smaller instruction set with simpler
instructions
• Each instruction performs a simple task
• Executes instructions in a single clock
cycle
• Relies heavily on memory access
• Uses pipelining to execute instructions
faster
• Produces small code sizes
• CISC:
• Complex Instruction Set Computing
• Examples of processors that use this
architecture include Intel x86,
AMD64, and DEC VAX.
• Larger instruction set with more
complex instructions
• Each instruction can perform a more
complex task
• Requires multiple clock cycles to
execute complex instructions
• Has more registers available to store
data
• Also uses pipelining, but may be less
efficient due to longer instruction
length
• Produces larger code sizes
Overall, the choice between RISC and CISC architectures
depends on the specific needs of the application being
developed.
introduction to embedded system presentation
EMBEDDED SYSTEM
CONSTRAINTS
An embedded system is software designed to keep in
view three constraints:
– Available system memory
– Available processor speed
– The need to limit the power dissipation
When running the system continuously in cycles of
wait for events, run, stop and wakeup.
What makes embedded systems different ? Real-time
operation ,size, cost, time , reliability, safety, energy,
security
Types of Embedded
systems
• Embedded systems can be classified into different types
based on
• Based on Generation (first generation-second generation-
third generation-fourth generation)
• Based on Complexity (small-scale-medium-scale-large-
scale or sophisticated)
• Based on functional requirements and performance of
the microcontroller (real-time-stand-alone-networked-
mobile)
• Based on deterministic behavior (Hard real time-soft real
time)
• Based on triggering (time triggered-event triggered)
introduction to embedded system presentation
Alternative Ways to Categorize Embedded
Systems
• Power consumption: Embedded systems can be categorized based on their power
consumption, which may range from low-power, battery-operated devices to high-
power systems that require external power sources.
• Size and form factor: The size and form factor of an embedded system can vary
widely, ranging from small, single-board computers to large, rack-mounted systems.
• Application domain: Embedded systems can be classified depending on their
application domain such as automotive, medical, consumer electronics, industrial
automation, and military applications.
• Development methodology: Embedded systems can also be categorized based on
the development methodology used. This includes traditional software engineering
practices, model-based design, agile methodologies, or other specialized development
approaches.
• Each of these categorizations can provide insight into the unique features and
characteristics of an embedded system, which can help guide the design process and
selection of appropriate hardware and software components
Classification based on Generation
First Generation
• Early embedded systems were based on discrete circuits and used simple logic gates.
• They were designed to perform a single dedicated task or function, such as controlling industrial machinery or
handling data from sensors.
• Assembly language was typically used for programming, which required deep knowledge of the processor's
architecture and instruction set.
• Memory was limited and costly, so code had to be written with maximum efficiency in mind.
• Input/output (I/O) devices were often custom-designed and connected directly to the system's hardware.
• Real-time performance was important, but not always guaranteed due to the lack of sophisticated scheduling
mechanisms.
• Reliability was a key concern, and redundancy was often built into the hardware design to prevent system
failures.
• Debugging and testing were difficult and time-consuming, requiring specialized tools and expertise.
• These early systems were typically stand-alone and not connected to external networks.
• System updates and maintenance required physical access to the device.
Second Generation
• The use of microprocessors led to smaller and more cost-effective systems.
• Assembly language was still commonly used for programming, although higher-level languages such as C
began to emerge.
• Memory capacity increased, allowing for larger programs and more complex processing.
• I/O devices were standardized and could be connected via common interfaces such as serial or parallel ports.
• Real-time operating systems (RTOS) were developed, providing better control over system scheduling and
resource allocation.
• Systems became more interconnected through the use of local networks and communication protocols such as
Ethernet and CAN bus.
• Hardware components became more specialized, with dedicated chips for tasks such as graphics rendering and
signal processing.
• Power management became more sophisticated, with sleep modes and other techniques used to conserve
energy.
• Debugging and testing tools improved, making it easier to detect and fix errors in software.
• System updates and maintenance could often be performed remotely.
Third Generation
• The use of system-on-chip (SoC) technology integrated more functionality onto a single chip, reducing size and cost while
increasing performance.
• Complex systems could be designed using hardware description languages (HDLs) such as Verilog and VHDL, allowing for
hardware and software design to be done concurrently.
• High-level languages such as C++ became more commonly used for programming, aided by the development of software tools
such as compilers and debuggers.
• Operating systems became more advanced, with support for virtual memory, multitasking, and networking.
• Connectivity continued to improve, with wireless communication protocols such as ZigBee and Bluetooth becoming more widely
used.
• Energy efficiency techniques such as dynamic voltage and frequency scaling (DVFS) were introduced, as well as low-power
sleep modes for idle periods.
• Field-programmable gate arrays (FPGAs) became more common, allowing for reconfigurable hardware and faster prototyping.
• Security became an increasingly important concern, leading to the development of secure boot mechanisms and encryption
technologies.
• Cloud-based services began to be incorporated into embedded systems, enabling remote updates and data storage.
• The Internet of Things (IoT) emerged as a major trend, with embedded systems being used to connect devices and enable smart
home and industrial automation.
Fourth Generation
• Advanced microprocessors and microcontrollers with higher processing power
• Integration of digital signal processing (DSP) and analog-to-digital converters (ADCs)
• Use of real-time operating systems (RTOS) to enable multitasking and scheduling of tasks
• Incorporation of hardware accelerators, such as graphics processing units (GPUs) and field-programmable gate
arrays (FPGAs)
• Increased connectivity through wired and wireless protocols, including Ethernet, Wi-Fi, Bluetooth, and cellular
networks
• Higher security through hardware-based security mechanisms, such as trusted platform modules (TPMs) and
secure enclaves
• Support for machine learning and artificial intelligence (AI) algorithms, enabling intelligent decision-making and
automation
• Lower power consumption through advanced power management techniques and low-power components
• Improved software development tools and frameworks, such as integrated development environments (IDEs)
and middleware
• Enhanced reliability through redundancy, fault-tolerant design, and self-diagnostic capabilities.
Classification based on
Complexity
B. Classification based on Complexity
• Embedded systems can be classified based on their complexity and
performance into four categories:
1.Small-scale embedded systems: These are the simplest and least
complex type of embedded systems. They have limited resources,
low processing power, and typically perform a single function.
Examples include simple household appliances like toasters or rice
cookers.
2.Medium-scale embedded systems: These systems are more
complex than small-scale embedded systems and have moderate
processing power and memory. They can handle multiple functions
and may have some capability for networking. Examples include
home automation systems and smart thermostats.
3.Sophisticated embedded systems or complex or large-scale
1-Small Scale Embedded Systems
• Use low-cost microprocessors/microcontrollers
• Have little hardware and software complexity
• Designed to consume very little power
• May or may not contain an operating system
• Use C programming language for software development
• Programming tools include editor, assembler, cross-
assembler and IDE
• Limited processing power and memory
• Perform specific functions with limited resources
• Used in home appliances, toys, wearables, smart home
devices, temperature sensors etc.
• Simple, low-cost and energy-efficient.
2-Medium Scale Embedded
Systems
• Slightly more complex than small-scale embedded systems
• Moderate processing power and memory
• Capable of handling multiple functions and some networking capability
• Use a single 16 or 32-bit microcontroller, DSP, or RISC
• May have real-time operating systems (RTOS) or general-purpose
operating systems (GPOS)
• Programming tools include C++, Java, C, debuggers, simulators,
emulators, IDEs, and source code engineering tools
• Used in applications such as home automation, medical monitoring, and
automotive control systems
• Require more development time and effort compared to small-scale
embedded systems
• Cost varies depending on the desired level of complexity and performance
3-Sophisticated Embedded
Systems(Complex Embedded Systems or
large-scale)
• Designed using multiple 32-bit or 64-bit micro-controllers
• Developed for large-scale complex functions
• Have enormous hardware and software complexities
• High performance RTOS
• May require ASIPs, IPs, scalable or configurable processors and programmable logic arrays (PLAs)
• Development tools may not be readily available or may need to be developed
• In some cases, a compiler or retargetable compiler is necessary
• Used for cutting-edge applications that require hardware and software co-design
• Use both hardware and software components to design final systems or hardware products
• Components need to be assembled in the final system
Classification based on
functional requirements
and performance
Classification based on functional
requirements and performance
• Stand-alone embedded systems: operate
independently without any network connections or
communication with other devices.
• Real-time embedded systems: require processing
data in real-time with low latency, such as medical
devices, automotive control systems, or avionics
systems.
• Networked embedded systems are connected to a
network, allowing them to communicate with other
devices or systems. Examples include smart home
systems or industrial automation systems.
• Mobile embedded systems: designed for mobile
platforms, such as smartphones or tablets, which
have restricted resources that must be optimized to
conserve energy and processing power.
1-Stand Alone Embedded
Systems
• Operate independently without requiring a host system or processor to function.
• Input data is taken from ports as analog or digital signals, and processing is done within the port itself.
• Output data is displayed on the connected device or used to control, drive, or display the device depending on
the type of data.
• Examples include washing machines, mobile phones, mp3 players, digital cameras, video game consoles,
microwave ovens, and temperature measurement systems.
• Limited functionality and processing power but are low-cost, energy-efficient, and suitable for simple
applications.
• Common programming tools used for developing software for stand-alone embedded systems include
assembler, cross-assembler, editor, and debuggers.
• Typically use single 8-bit or 16-bit microprocessors or microcontrollers that have limited processing power.
• Stand-alone embedded systems have limited hardware and software complexity, which makes them relatively
easy to design and program.
• Small in size and portable, given their intended use in consumer electronics.
• Designed for specific functions with minimal resources.
2-Real Time Embedded Systems
• Defined as systems that must produce a required output within a specific timeframe and follow time deadlines for task
completion.
• Typically used in applications where timing is crucial, such as control systems or signal processing systems.
• Can be classified into two types: soft real-time systems and hard real-time systems.
• Soft real-time systems focus on managing processes and do not prioritize meeting deadlines.
• Hard real-time systems consider timelines as the deadline and must meet strict timing requirements.
• Real-time embedded systems can be scheduled either statically or dynamically.
• Missing deadlines in soft embedded systems may result in system degradation.
• Hard embedded systems often have no permanent memory and must complete processes correctly the first time.
• The best example of a hard embedded system is an aircraft control system.
• Programming languages commonly used for real-time embedded systems include C and assembly language.
• Require specialized software development tools and expertise.
• Can be costly to develop and test depending on the level of performance and complexity required.
• Suitable for applications such as avionics systems, automotive control systems, or industrial automation systems.
3-Networked Embedded Systems
• Consist of interconnected embedded devices that communicate with each other over a network
• Can be connected to LAN, WAN, or the internet using wired or wireless communication protocols such as Ethernet, Wi-Fi, Bluetooth, or Zigbee
• Typically have limited processing capabilities and memory but may incorporate various sensors and actuators to interact with the physical environment
• Used in industrial applications such as manufacturing and automation where real-time data exchange is critical
• Require designing to handle challenges of distributed computing such as latency, reliability, and security
• Programmed using software platforms and languages such as C, Python, or ROS
• Embedded web servers are a type of networked embedded system where all embedded devices are connected to a web server and accessed and
controlled by a web browser
• Examples include home security systems, ATM machines, and card swipe machines
• Have potential to improve efficiency, optimize processes, and reduce costs in various industries.
• Formed when a program runs inside another device, controlling the running program using a microprocessor or controller
• The network can be either LAN or WAN, and it is not necessary that the connection should be wired or wireless
• Fastest-growing category of embedded systems due to their flexibility and connectivity
• Security systems in any office or tech park are examples of network embedded systems where all connections are made through a common network and
controlled under one umbrella.
4-Mobile Embedded Systems
• Used in portable embedded devices such as cell phones, mobiles, digital cameras, mp3 players, and personal digital
assistants.
• Consist of embedded devices that are designed to be portable and used on-the-go.
• Often powered by batteries or other portable power sources.
• May incorporate various sensors such as GPS, accelerometers, and gyroscopes to provide location and motion data.
• Use wireless communication protocols such as Bluetooth, Wi-Fi, cellular network, or Near Field Communication (NFC).
• Typically have limited processing capabilities and memory due to battery life and size constraints.
• Must be designed to handle the challenges of mobility, such as intermittent connectivity and changing network
conditions.
• Can be programmed using various software platforms and languages, such as Java, C++, or Swift.
• Examples include smartphones, tablets, wearable devices such as smartwatches and fitness trackers, and unmanned
aerial vehicles (UAVs).
• Have the potential to provide personalized and contextualized services and improve convenience and efficiency in
various aspects of daily life.
• All the devices that are portable and working with an embedded system is a mobile embedded system.
• Despite limitations in memory and functionality, mobile embedded systems remain useful due to their portability and
ease of use.
• Examples of common mobile embedded systems include mobile phones, laptops, and calculators.
Based on deterministic behavior
Based on
deterministic
behavior
• The embedded system under this classification is
based on the deterministic behavior of an embedded
system. Based on this execution behavior, the
embedded systems are classified into hard real-time
systems and soft real-time systems.
Hard real-time
• A hard real-time system strictly adheres to timing constraints.
• It must meet timing deadlines without any delay.
• Failure to meet deadlines could cause serious system or user failure.
• Examples include airbag control and antilock braking systems in
vehicles.
• Delay in deployment of airbags can lead to death of passengers.
• "A late answer is always a wrong answer" in hard real-time systems
Soft real-time
• Soft real-time systems do not strictly adhere to timing constraints.
• Missing deadlines for tasks is acceptable within a compliance limit.
• Examples include ATM systems.
• A delay in withdrawing money from an ATM may not cause serious
problems.
• "A late answer is an acceptable answer" in soft real-time systems.
Based on
triggering
• The embedded systems are classified into two types
based on the triggering of the systems:
• Time-triggered: If a system is activated or triggered
based on the pre-defined task or preset time, then
such a system is said to be the time-triggered
embedded system.
• Event-triggered : if the system is triggered based on
some activity like change in temperature or change in
pressure, such system is said to be an event triggered
embedded system.
Applications of Embedded Systems
• Embedded systems are used in
different applications like
automobiles, telecommunications,
smart cards, missiles, satellites,
computer networking and digital
consumer electronics.
IC
technology
IC technology
• Three types of IC technologies
– Full-custom/VLSI
– Semi-custom ASIC (gate array and
standard cell)
– PLD (Programmable Logic Device)
Full-custom/VLSI
All layers are optimized for an embedded system’s
particular digital implementation
– Placing transistors – Sizing transistors – Routing wires
• Benefits
– Excellent performance, small size, low power
• Drawbacks
– High NRE cost (e.g., $300k), long time-tomarket
Semi-custom
• Lower layers are fully or partially built
– Designers are left with routing of wires and maybe
placing some blocks
• Benefits
– Good performance, good size, less NRE cost than a full-
custom implementation (perhaps $1 0k to $1 00k)
• Drawbacks
– Still require weeks to months to develop
PLD (Programmable Logic
Device)
All layers already exist
– Designers can purchase an IC
– Connections on the IC are either created or destroyed to
implement desired functionality
– Field-Programmable Gate Array (FPGA) very popular
• Benefits
– Low NRE costs, almost instant IC availability
• Drawbacks
– Bigger, expensive (perhaps $30 per unit), power hungry,
slower
MICROCONTROLLER
• A microcontroller is a functional computer
system-on-a-chip. It contains a processor,
memory, and programmable input/output
peripherals.
• Microcontrollers include an integrated CPU,
memory (a small amount of RAM, program
memory, or both) and peripherals capable of
input and output.
Types of Microcontroller
• PIC Microcontroller
• PIC Stands for Peripheral Interface Controller is a kind of microcontroller components was used in the development of
electronics, computer robotics, and similar devices. Even though the PIC was produced by Microchip technology and
based on hardware computing architecture, here the code and data are placed in separate registers to increase the
input and output. Pic has a built-in data memory, data bus and dedicated microprocessor for preparing all I/O purposes
and methods.
• ARM Microcontroller
• ARM stands for Advanced RISC Machine. It’s the most popular Microcontrollers Programming in the digital embedded
system world, and most of the industries prefer only ARM microcontrollers since it consists of significant features to
implement products with an excellent appearance. It is cost sensitive and high-performance device which has been
used in a wide range of application such as Industrial Instrument control systems, wireless networking and sensors, and
automotive body systems, etc.
• 8051 Microcontroller
• Intel created 8051 microcontrollers in 1981. It is an 8bit microcontroller. It’s made with 40 pins DIP (Dual inline
package), 4kb if ROM storage and 128 bytes of RAM storage, 2 16 bit timer. It consists of are four parallel 8 bit ports,
which are programmable as well as addressable as per the specification.
Types of Microcontroller
• AVR Microcontroller
• AVR stands for Alf and Vegard's RISC Processor. It was the modified Harvard architecture machine,
where program and data were stored in the separate physical memory system that appears in different
address spaces, but having the ability to browse information things from program memory victimization
particular directions. AVR isn't associate degree signifier and doesn't symbolize something specially.
• MSP Microcontroller
• MSP stands for Mixed Signal Processor. It’s the family from Texas Instruments. Built around a 16 -bit
CPU, the MSP is designed for low cost and respectively, low power dissipation embedded statements. It’s
the controller's appearance is directly related to the 16-bit data bus, and seven addressing modes and the
decreased instructions set, which allows a shorter, denser programming code for fast performance.
• The Range of Microcontroller is an IC chip that executes programs for controlling other device or
machines. It is a micro-device which is used for control of other device machines that’s why it’s called
Microcontrollers Programming.
Vendors and device
family
1. Atmel: Atmel's AVR 8-bit and 32-bit microcontrollers are widely used in a
variety of applications, including consumer electronics, automotive,
industrial automation, and medical devices.
2. Microchip Technology: Microchip offers a range of microcontrollers,
including their PIC16, PIC18, and PIC32 families, which are used in
applications such as motor control, lighting, and security systems.
3. Texas Instruments: Texas Instruments has a wide range of
microcontrollers, including its MSP430, C2000, and Stellaris families,
which are used in a variety of embedded systems, including smart grids,
industrial automation, and medical devices.
4. NXP Semiconductors: NXP offers a range of microcontrollers, including
its LPC, i.MX, and Kinetis families, which are used in a variety of
applications, including automotive, industrial, and consumer electronics.
5. STMicroelectronics: STMicroelectronics offers a range of
microcontrollers, including its STM8 and STM32 families, which are used
in applications such as motor control, lighting, and smart homes.
VARIOUS
MICROCONTROLLERS
INTEL (8031 ,8032,8051
,8052,8751 ,8752 )
PIC (8-bit PIC1 6, PIC1 8, 1 6-bit
DSPIC33 / PIC24, PIC1 6C7x )
Motorola (MC68HC1 1)
EMBEDDED
PROCESSOR
• Special microprocessors &
microcontrollers often called,
Embedded processors.
• An embedded processor is used when
fast processing fast context-switching &
atomic ALU operations are needed.
Examples : ARM 7, INTEL i960, AMD
29050
DIGITAL
SIGNAL
PROCESSOR
• DSP as a GPP is a single chip VLSI unit.
• It includes the computational capabilities of
microprocessor and multiply & accumulate units (MAC).
• DSP has large number of applications such as image
processing, audio, video & telecommunication processing
systems.
• It is used when signal processing functions are to be
processed fast.
Examples : TMS320Cxx, SHARC, Motorola 5600xx
APPLICATION SPECIFIC
SYSTEM PROCESSOR (ASSP)
• ASSP is dedicated to specific tasks and provides a faster
solution.
• An ASSP is used as an additional processing unit for
running the application in place of using embedded
software.
Examples : IIM71 00, W31 00A
MULTI PROCESSOR SYSTEM
USING GPPs
• Multiple processors are used when a single processor
does not meet the needs of different task.
• The operations of all the processors are synchronized to
obtain an optimum performance
Moore’s Law
• Moore's law describes a long-term trend in the history of
computing hardware.
• Since the invention of the integrated circuit in 1 958, the
number of transistors that can be placed inexpensively on
an integrated circuit has increased exponentially, doubling
approximately every two years.
• The trend was first observed by Intel co-founder Gordon
E. Moore in 1965.
• Almost every measure of the capabilities of digital
electronic devices is linked to Moore's law: processing
speed, memory capacity, etc.
Moore’s law
introduction to embedded system presentation
OTHER
HARDWARE
• Power Source
• Clock Oscillator
• Real Time Clock (RTC)
• Reset Circuit, Power-up Reset and watchdog timer Reset
• Memory
• I/O Ports, I/O Buses
• Interrupt Handler
• DAC and ADC
• LCD and LED Display
• Keypad/Keyboard
APPLICATIONS
introduction to embedded system presentation
introduction to embedded system presentation
introduction to embedded system presentation
Embedded Systems - Tools & Peripherals
• Compiler
• A compiler is a computer program (or a set of programs) that transforms the source code written in a
programming language (the source language) into another computer language (normally binary format).
The most common reason for conversion is to create an executable program. The name "compiler" is
primarily used for programs that translate the source code from a high-level programming language to a
low-level language (e.g., assembly language or machine code).
• Cross-Compiler
• If the compiled program can run on a computer having different CPU or operating system than the
computer on which the compiler compiled the program, then that compiler is known as a cross-compiler.
• Decompiler
• A program that can translate a program from a low-level language to a high-level language is called a
decompiler.
Embedded Systems - Tools & Peripherals
• Language Converter
• A program that translates programs written in different high-level languages is normally called a language translator,
source to source translator, or language converter.
• A compiler is likely to perform the following operations −
• Preprocessing
• Parsing (‫)تحليل‬
• Semantic (
‫داللي‬
) Analysis (Syntax-directed translation)
• Code generation
• Code optimization
• Assemblers
• An assembler is a program that takes basic computer instructions (called as assembly language) and converts them into
a pattern of bits that the computer's processor can use to perform its basic operations. An assembler creates object
code by translating assembly instruction mnemonics into opcodes, resolving symbolic names to memory locations.
Assembly language uses a mnemonic to represent each low-level machine operation (opcode).
Debugging Tools in an Embedded System
• Debugging is a methodical process to find and reduce the number of bugs in a
computer program or a piece of electronic hardware, so that it works as expected.
Debugging is difficult when subsystems are tightly coupled, because a small
change in one subsystem can create bugs in another. The debugging tools used
in embedded systems differ greatly in terms of their development time and
debugging features. We will discuss here the following debugging tools
• Simulators
• Microcontroller starter kits
• Emulator
Simulators
• Code is tested for the MCU / system by simulating it on the host computer used for code development. Simulators try to model the behavior of the complete
microcontroller in software.
• Functions of Simulators: A simulator performs the following functions
1. Defines the processor or processing device family as well as its various versions for the target system.
2. Monitors the detailed information of a source code part with labels and symbolic arguments as the execution goes on for each single step.
3. Provides the status of RAM and simulated ports of the target system for each single step execution.
4. Monitors system response and determines throughput.
5. Provides trace of the output of contents of program counter versus the processor registers.
6. Provides the detailed meaning of the present command.
7. Monitors the detailed information of the simulator commands as these are entered from the keyboard or selected from the menu.
8. Supports the conditions (up to 8 or 16 or 32 conditions) and unconditional breakpoints.
9. Provides breakpoints and the trace which are together the important testing and debugging tool.
10. Facilitates synchronizing the internal peripherals and delays.
Microcontroller Starter Kit
• A microcontroller starter kit consists of :
• Hardware board (Evaluation board)
• In-system programmer
• Some software tools like compiler, assembler, linker, etc.
• Sometimes, an IDE and code size limited evaluation version of a compiler.
• A big advantage of these kits over simulators is that they work in real-time and
thus allow for easy input/output functionality verification. Starter kits, however,
are completely sufficient and the cheapest option to develop simple
microcontroller projects.
Emulators
• An emulator is a hardware kit or a software program or can be both which
emulates the functions of one computer system (the guest) in another computer
system (the host), different from the first one, so that the emulated behavior
closely resembles the behavior of the real system (the guest).
• Emulation refers to the ability of a computer program in an electronic device to
emulate (imitate) another program or device. Emulation focuses on recreating an
original computer environment. Emulators have the ability to maintain a closer
connection to the authenticity of the digital object. An emulator helps the user to
work on any kind of application or operating system on a platform in a similar
way as the software runs as in its original environment.
Peripheral Devices in Embedded Systems
• Embedded systems communicate with the outside world via their peripherals, such as following &mins;
• Serial Communication Interfaces (SCI) like RS-232, RS-422, RS-485, etc.
• Synchronous Serial Communication Interface like I2C, SPI, SSC, and ESSI
• Universal Serial Bus (USB)
• Multi Media Cards (SD Cards, Compact Flash, etc.)
• Networks like Ethernet, LonWorks, etc.
• Fieldbuses like CAN-Bus, LIN-Bus, PROFIBUS, etc.
• imers like PLL(s), Capture/Compare and Time Processing Units.
• Discrete IO aka General-Purpose Input/Output (GPIO)
• Analog to Digital/Digital to Analog (ADC/DAC)
• Debugging like JTAG, ISP, ICSP, BDM Port, BITP, and DP9 ports
Criteria for Choosing Microcontroller
• While choosing a microcontroller, make sure it meets the task at hand and that it is cost effective. We
must see whether an 8-bit, 16-bit or 32-bit microcontroller can best handle the computing needs of a
task. In addition, the following points should be kept in mind while choosing a microcontroller −
• Speed − What is the highest speed the microcontroller can support?
• Packaging − Is it 40-pin DIP (Dual-inline-package) or QFP (Quad flat package)? This is important in terms
of space, assembling, and prototyping the end-product.
• Power Consumption − This is an important criteria for battery-powered products.
• Amount of RAM and ROM on the chip.
• Count of I/O pins and Timers on the chip.
• Cost per Unit − This is important in terms of final cost of the product in which the microcontroller is to be
used.
• Further, make sure you have tools such as compilers, debuggers, and assemblers, available with the
microcontroller. The most important of all, you should purchase a microcontroller from a reliable source.
PIC microcontroller
Microchip PIC vs prototyping platforms
Required software tools
Bus width
Memory types
Instruction set
Fundamental
Terminologies
Fundamental
Terminologie
s
Memory types
1. ROM (Read-Only Memory): As mentioned earlier, ROM is non-volatile memory that stores the program code and data that is
permanently written to the chip during manufacturing. This means that the content of ROM cannot be changed after it has been
programmed. ROM is very reliable and can be used for storing critical system-level software such as bootloaders and low-level
drivers.
2. Flash Memory: Flash memory is also non-volatile memory that can be programmed and reprogrammed. It is commonly used for
storing program code and data that may need to be updated or changed over time. Flash memory has a limited number of write
cycles, typically ranging from 10,000 to 100,000 cycles. This means that care must be taken when writing to flash memory to
avoid wearing it out prematurely.
3. SRAM (Static Random Access Memory): SRAM is volatile memory that is used for storing data and variables during program
execution. The contents of SRAM are lost when power is turned off. Because SRAM is fast and easy to access, it is often used
for buffering and other temporary storage needs. However, its volatility makes it unsuitable for long-term data storage.
4. EEPROM (Electrically Erasable Programmable Read-Only Memory): EEPROM is non-volatile memory that can be erased and
reprogrammed electrically. It is commonly used for storing small amounts of data that need to be preserved even when power is
turned off. EEPROM has a much lower write endurance than flash memory, typically ranging from 100,000 to 1 million cycles.
5. FRAM (Ferroelectric Random Access Memory): FRAM is a non-volatile type of RAM that combines the best features of
EEPROM and SRAM. It has fast write speeds, low power consumption, and can be written to an unlimited number of times
without wearing out. Unlike EEPROM, FRAM has a much higher write endurance, typically ranging from 10^13 to 10^15 cycles.
However, FRAM is currently more expensive than other memory types and has a lower storage density.
Memory types
• several types of memories commonly found in microcontrollers:
1.ROM (Read-Only Memory): This is non-volatile memory that stores the program code and
data that is permanently written to the chip during manufacturing.
2.Flash Memory: This is also non-volatile memory that can be programmed and reprogrammed.
It is commonly used for storing program code and data that may need to be updated or
changed over time.
3.SRAM (Static Random Access Memory): This is volatile memory that is used for storing data
and variables during program execution. The contents of SRAM are lost when power is turned
off.
4.EEPROM (Electrically Erasable Programmable Read-Only Memory): This is non-volatile
memory that can be erased and reprogrammed electrically. It is commonly used for storing
small amounts of data that need to be preserved even when power is turned off.
5.FRAM (Ferroelectric Random Access Memory): This is a non-volatile type of RAM that
combines the best features of EEPROM and SRAM. It has fast write speeds, low power
consumption, and can be written to an unlimited number of times without wearing out.
References
• Barrett, Embedded Systems: Design and Applications, Pearson Education.
• Raj Kamal, Embedded Systems: Architecture, Programming and Design, Tata McGraw Hill.Mazidi,
• Mazidi and McKinlay, The 8051 Microcontroller and Embedded Systems using assembly and C,
Pearson
• https://embeddedschool.in/different-types-of-microcontroller-programming-used-in-embedded-
systems/
• https://www.tutorialspoint.com/embedded_systems/es_microcontroller.htm
• https://www.geeksforgeeks.org/classification-of-embedded-systems/
• https://www.educba.com/types-of-embedded-systems/
• https://www.watelectronics.com/classification-of-embedded-systems/
• https://www.microcontrollertips.com/risc-vs-cisc-architectures-one-better/
• https://www.javatpoint.com/risc-vs-cisc
• https://www.javatpoint.com/microprocessor-architecture
• https://www.youtube.com/watch?v=KspcdMLtE0E
• https://www.youtube.com/watch?v=uBfiX2nIR3c
• https://www.electrically4u.com/classification-of-embedded-system/

More Related Content

introduction to embedded system presentation

  • 1. EMBEDDED SYSTEM BASICS AND APPLICATION Prepared by: Dr. Amr Rashed
  • 2. Perquisites • Basics of electric and electronic circuits • Computer architecture and organization • Control system • Digital logic design • Basics of C programming language
  • 4. What is a system • A system is an arrangement where all components work together according to a set of rules. • It can be defined as a way of working, organizing, or doing tasks according to a fixed plan. • Examples of systems include watches that display time, with components following set rules for functioning. • All subcomponents within a system depend on each other for proper functioning. • A system follows a plan, program, or set of rules. • Its units assemble and work together according to the plan or program.
  • 5. SYSTEM EXAMPLES WATCH It is a time display SYSTEM Parts: Hardware, Needles, Battery, Dial, Chassis and Strap Rules 1.All needles move clockwise only 2.A thin needle rotates every second 3.A long needle rotates every minute 4.A short needle rotates every hour 5.All needles return to the original position after 12 hours
  • 6. SYSTEM EXAMPLES • WASHING MACHINE • It is an automatic clothes washing SYSTEM • Parts: Status display panel, Switches & Dials, Motor, Power supply & control unit, Inner water level sensor and solenoid valve. • Rules • 1.Wash by spinning 2.Rinse 3.Drying 4.Wash over by blinking 5.Each step display the process stage 6.In case interruption, execute only the remaining
  • 7. EMBEDDED SYSTEM • An embedded system is a type of electronic system programmed and embedded in computer hardware to perform single or multiple tasks according to a set of rules. • It can be programmable or non-programmable and includes both hardware and software components that work together to perform a specific function. • Examples of embedded systems include microwave ovens, washing machines, automobiles, and cameras using microprocessors, microcontrollers, and DSPs. • Embedded means something attached to another thing and can be an independent system or part of a larger system. • It is designed to perform a specific task and is usually microcontroller or microprocessor based. • A fire alarm is an example of an embedded system as it senses only smoke.
  • 12. COMPONENTS OF EMBEDDED SYSTEM It has Hardware Processor, Timers, Interrupt controller, I/O Devices, Memories, Ports, etc. • It has main Application Software Which may perform concurrently the series of tasks or multiple tasks. • It has Real Time Operating System (RTOS) RTOS defines the way the system work. Which supervise the application software. It sets the rules during the execution of the application program. A small-scale embedded system may not need an RTOS So, we can define an embedded system as a Microcontroller based, software driven, reliable, real-time control system
  • 14. HISTORY OF EMBEDDED SYSTEMS  Embedded Systems were in existence even before the IT evolution.  In the olden days embedded systems were built around the old vacuum tube and transistor technologies and the embedded algorithm was developed in low level languages.  Advances in semiconductor and Nano-Technology and IT revolution gave way to the development of miniature embedded systems.
  • 17. HISTORY OF EMBEDDED SYSTEMS • The first recognized modern embedded system is the Apollo Guidance Computer(AGC) • developed by the MIT instrumentation laboratory for the LUNAR EXPEDITION( ‫الي‬ ‫البعثة‬ ‫)القمر‬. • They ran the inertial guidance systems of both the Command Module(CM) and Lunar Excursion Module(LEM). • The command module was designed to encircle the moon while the Lunar Module • and its crew were designed to go down to the moon surface and land there safely.
  • 18. HISTORY OF EMBEDDED SYSTEMS • The Lunar Module featured in total 18 engines. There were 16 reaction control thrusters, a descent engine and an ascent engine. • The descent engine was designed to provide thrust ( ‫توجه‬ ) to the lunar module out of the lunar orbit and land it safely on the moon. • The MIT’s original design was based on 4K words of ROM and 256 words of RAM. • By june 1963, it reached 10K ROM and 1K RAM. • The final configuration was 36K ROM and 2K of RAM. • The clock frequency of the first microchip photo model used in AGC was 1.024MHz and it was derived from a 2.048MHz crystal clock. • Around 5000 ICs supplied by Fairchild Semiconductor were used in this design. • The user interface unit of AGC is known as DSKY(Display/Keyboard). • DSKY looked like a calculator type keypad with an array of numerals. • The first mass-produced embedded system was the guidance computer for the Minuteman-I missile in 1961. • It was the “AUTONETICS D-17” guidance computer but using discrete transistor logic and a hard-disk for main memory.
  • 19. Characteristics of an Embedded System • Single-functioned − An embedded system usually repeats a specialized operation. For example: A pager always functions as a pager. • Tightly constrained − All computing systems have constraints on design metrics like cost, size, power, and performance but those on an embedded system can be especially tight. Design metrics is a measure of an implementation's features. It must be of a size to fit on a single chip, must perform fast enough to process data in real time and consume minimum power to extend battery life. • Reactive ( ‫تفاعلي‬ ) and Real time − Many embedded systems must continually react to changes in the system's environment and must compute certain results in real time without any delay. For example, a car cruise(‫)االنسيابية‬ controller that continually monitors and reacts to speed and brake sensors. It must compute acceleration or decelerations repeatedly within a limited time; a delayed computation can result in failure to control of the car. • Microprocessors based − It must be microprocessor or microcontroller based. • Memory − It must have a memory, as its software usually embeds in ROM. • Connected − It must have connected peripherals to connect input and output devices. • HW-SW systems − Software is used for more features and flexibility. Hardware is used for performance and security
  • 20. Advantages and disadvantages • Advantages • Small size • Low power consumption • Low cost • Enhanced performance • Easily customizable • Disadvantages • High development effort • Larger time to market
  • 21. Basic Structure of an Embedded System • a processor, sensor, memory, D-A converters, input/output (I/O) interfaces, graphical user interfaces, and software. • The processor is the heart of the embedded system. It is a central processing unit (CPU) that allows all the integrations of the embedded system. The design of the type of processor used in an embedded system depends on the application. For example, a simple embedded system for a toy may use a microcontroller, while a more complex embedded system, such as the one in an airplane, may use a microprocessor. • A sensor is a device that converts physical quantity into electrical signals. It senses the conditions of the external world and provides input to the embedded system. • Memory stores data and programs. There are two types of memory: volatile and non-volatile. Volatile memory, such as RAM, loses its contents when the power is off. Non-volatile memory, such as ROM, retains its contents even when the power is off. • D-A converters convert digital signals into analog signals. • I/O interfaces connect the embedded system to the outside world. They provide a means for the system to receive input from and send output to the external world. • Graphical user interfaces (GUI) provide a visual interface between the embedded system and the user. The GUI enables the user to interact with the embedded system without needing to understand the underlying hardware and software"
  • 22. Cont . • The Embedded system hardware includes elements like user interface, input/output interfaces, display and memory, etc. • Generally, an embedded system comprises power supply, processor, memory, timers, serial communication ports and system application specific circuits.
  • 23. Needs skills for embedded software engineering
  • 24. Firmware vs Software (Nature of the code)
  • 25. Firmware vs Software (Nature of the code)
  • 26. Firmware vs Software (failure)
  • 27. Firmware vs Software (failure)
  • 30. Processors in a System • Processor is the heart of an embedded system. It is the basic unit that takes inputs and produces an output after processing the data. For an embedded system designer, it is necessary to have the knowledge of both microprocessors and microcontrollers. • A processor has two essential units 1. Program Flow Control Unit (CU) 2. Execution Unit (EU) The CU includes a fetch unit for fetching instructions from the memory. The EU has circuits that implement the instructions pertaining to data transfer operation and data conversion from one form to another. The EU includes the Arithmetic and Logical Unit (ALU) and also the circuits that execute instructions for a program control task such as interrupt, or jump to another set of instructions. A processor runs the cycles of fetch and executes the instructions in the same sequence as they are fetched from memory.
  • 31. Types of Processors • Processors can be of the following categories −  General Purpose Processor (GPP) o Microprocessor o Microcontroller o Embedded Processor o Digital Signal Processor o Media Processor  Application Specific System Processor (ASSP)  Application Specific Instruction Processors (ASIPs)  GPP core(s) or ASIP core(s) on either an Application Specific Integrated Circuit (ASIC) or a Very Large-Scale Integration (VLSI) circuit.
  • 32. MICROPROCESSOR • A microprocessor is a single chip semi conductor device also which is a computer on chip, but not a complete computer. • Its CPU contains an ALU, a program counter, a stack pointer, some working register, a clock timing circuit and interrupt circuit on a single chip. • To make complete micro computer, one must add memory usually ROM and RAM, memory decoder, an oscillator and a number of serial and parallel ports
  • 33. Microprocessor • A microprocessor is a single VLSI chip having a CPU. In addition, it may also have other units such as coaches, floating point processing arithmetic unit, and pipelining units that help in faster processing of instructions. • Earlier generation microprocessors’ fetch-and-execute cycle was guided by a clock frequency of order of ~1 MHz. Processors now operate at a clock frequency of 2GHz
  • 34. Microcontroller • A microcontroller is a single-chip VLSI unit (also called microcomputer) which, although having limited computational capabilities, possesses enhanced input/output capability and a number of on-chip functional units. • Microcontrollers are particularly used in embedded systems for real-time control applications with on-chip program memory and devices. CPU RAM ROM I/O Port Timer Serial COM Port
  • 35. Difference between General purpose computer and Embedded systems
  • 36. Difference between General purpose computer and Microcontroller
  • 38. Difference between General purpose computer and Microcontroller
  • 39. Embedded Systems - Architecture Types • The 8051 microcontrollers work with 8-bit data bus. So they can support external data memory up to 64K and external program memory of 64k. They can address 128k of external memory • When data and code lie in different memory blocks, then the architecture is referred as Harvard architecture. • In case data and code lie in the same memory block, then the architecture is referred as Von Neumann architecture.
  • 40. Architecture of Embedded Systems • Von Neumann architecture • Von Neumann Architecture: The Von Neumann architecture was first proposed by a computer scientist John von Neumann. In this architecture, one data path or bus exists for both instruction and data. As a result, the CPU does one operation at a time. It either fetches an instruction from memory or performs read/write operation on data. So, an instruction fetch, and a data operation cannot occur simultaneously, sharing a common bus. Von-Neumann architecture supports simple hardware. It allows the use of a single, sequential memory. Today's processing speeds vastly outpace memory access times, and we employ a very fast but small amount of memory (cache) local to the processor. • Harvard Architecture • The Harvard architecture offers separate storage and signal buses for instructions and data. This architecture has data storage entirely contained within the CPU, and there is no access to the instruction storage as data. Computers have separate memory areas for program instructions and data using internal data buses, allowing simultaneous access to both instructions and data. Programs needed to be loaded by an operator; the processor could not boot itself. In a Harvard architecture, there is no need to make the two memories share properties.
  • 43. Harvard Vs Von-Neuman architecture
  • 44. Von-Neumann Architecture vs Harvard Architecture
  • 45. CISC and RISC architecture CISC is a Complex Instruction Set Computer. It is a computer that can address a large number of instructions. In the early 1980s, computer designers recommended that computers should use fewer instructions with simple constructs so that they can be executed much faster within the CPU without having to use memory. Such computers are classified as Reduced Instruction Set Computer or RISC.
  • 46. RISC Processor  RISC stands for Reduced Instruction Set Computer Processor  It uses a simple collection and highly customized set of instructions  Its architecture is built to minimize instruction execution time by optimizing and limiting the number of instructions  Each instruction cycle requires only one clock cycle with three parameters: fetch, decode, and execute  RISC processors are used to perform various complex instructions by combining them into simpler ones  RISC chips require several transistors, which makes it cheaper to design and reduces execution time for instructions  Examples of RISC processors are SUN's SPARC, PowerPC, Microchip PIC processors, RISC-V.
  • 47. Advantages of RISC Processor 1.The RISC processor's performance is better due to the simple and limited number of the instruction set. 2.It requires several transistors that make it cheaper to design. 3.RISC allows the instruction to use free space on a microprocessor because of its simplicity. 4.RISC processor is simpler than a CISC processor because of its simple and quick design, and it can complete its work in one clock cycle.
  • 48. Disadvantages of RISC Processor 1.The RISC processor's performance may vary according to the code executed because subsequent instructions may depend on the previous instruction for their execution in a cycle. 2.Programmers and compilers often use complex instructions. 3.RISC processors require very fast memory to save various instructions that require a large collection of cache memory to respond to the instruction in a short time.
  • 49. RISC Architectur e • It is a highly customized set of instructions used in portable devices due to system reliability such as Apple iPod, mobiles/smartphones, Nintendo DS
  • 50. Features of RISC Processor • Some important features of RISC processors are: 1. One cycle execution time: For executing each instruction in a computer, the RISC processors require one CPI (Clock per cycle). And each CPI includes the fetch, decode and execute method applied in computer instruction. 2. Pipelining technique: The pipelining technique is used in the RISC processors to execute multiple parts or stages of instructions to perform more efficiently. 3. A large number of registers: RISC processors are optimized with multiple registers that can be used to store instruction and quickly respond to the computer and minimize interaction with computer memory. 4. It supports a simple addressing mode and fixed length of instruction for executing the pipeline. 5. It uses LOAD and STORE instruction to access the memory location. 6. Simple and limited instruction reduces the execution time of a process in a RISC.
  • 51. CISC Processor • CISC stands for Complex Instruction Set Computer and was developed by Intel. • It has a large collection of complex instructions that range from simple to very complex and specialized in the assembly language level. • CISC approaches reducing the number of instructions on each program and ignores the number of cycles per instruction. • It emphasizes building complex instructions directly in the hardware because the hardware is always faster than software. • CISC chips are relatively slower compared to RISC chips but use fewer instructions than RISC. • Examples of CISC processors include VAX, AMD, Intel x86, and the System/360.
  • 52. Characteristics of CISC Processor • Following are the main characteristics of the RISC processor: 1. The length of the code is shorts, so it requires very little RAM. 2. CISC or complex instructions may take longer than a single clock cycle to execute the code. 3. Less instruction is needed to write an application. 4. It provides easier programming in assembly language. 5. Support for complex data structure and easy compilation of high-level languages. 6. It is composed of fewer registers and more addressing nodes, typically 5 to 20. 7. Instructions can be larger than a single word. 8. It emphasizes the building of instruction on hardware because it is faster to create than the software.
  • 53. CISC Processors Architecture • The CISC architecture helps reduce program code by embedding multiple operations on each program instruction, which makes the CISC processor more complex. The CISC architecture-based computer is designed to decrease memory costs because large programs or instruction required large memory space to store the data, thus increasing the memory requirement, and a large collection of memory increases the memory cost, which makes them more expensive
  • 54. Advantages of CISC Processors 1.The compiler requires little effort to translate high-level programs or statement languages into assembly or machine language in CISC processors. 2.The code length is quite short, which minimizes the memory requirement. 3.To store the instruction on each CISC, it requires very less RAM. 4.Execution of a single instruction requires several low- level tasks. 5.CISC creates a process to manage power usage that adjusts clock speed and voltage. 6.It uses fewer instructions set to perform the same instruction as the RISC.
  • 55. Disadvantag es of CISC Processors 1.CISC chips are slower than RSIC chips to execute per instruction cycle on each program. 2.The performance of the machine decreases due to the slowness of the clock speed. 3.Executing the pipeline in the CISC processor makes it complicated to use. 4.The CISC chips require more transistors as compared to RISC design. 5.In CISC it uses only 20% of existing instructions in a programming event.
  • 57. An example of a RISC instruction • Example Instruction: ADD R1, R2, R3 • This instruction adds the contents of registers R2 and R3 and stores the result in register R1. • Step 1: Fetch Instruction The processor fetches the ADD instruction from memory and loads it into the instruction register. • Step 2: Decode Instruction The processor decodes the instruction by determining the operation to be performed (addition), and the source and destination registers (R1, R2, and R3). • Step 3: Execute Instruction The processor executes the ADD instruction by adding the contents of registers R2 and R3 and storing the result in register R1. • Step 4: Store Result The processor stores the result of the addition operation (sum of R2 and R3) in register R1. • This simple example demonstrates how RISC instructions are executed. By using a simplified instruction set, RISC processors can perform operations quickly and efficiently, making them ideal for applications that require high-speed processing, such as real-time control systems, signal processing, and multimedia applications.
  • 58. An example of a CISC instruction • Example Instruction: MOV AX, [BX+SI+10] • This instruction moves the contents of the memory location specified by the sum of registers BX, SI, and 10 into register AX. • Step 1: Fetch Instruction The processor fetches the MOV instruction from memory and loads it into the instruction register. • Step 2: Decode Instruction The processor decodes the instruction by determining the operation to be performed (move data), the source (memory location specified by [BX+SI+10]), and the destination (register AX). • Step 3: Calculate Memory Address The processor calculates the memory address by adding the values in registers BX, SI, and 10. This involves several sub-steps: • The processor reads the value of register BX, which contains a memory address. • The processor reads the value of register SI, which contains an offset. • The processor adds the values of BX, SI, and 10 to calculate the memory address. • Step 4: Retrieve Data from Memory The processor retrieves the data from memory using the calculated memory address. This involves several sub-steps: • The processor sends the memory address to the memory controller. • The memory controller accesses the memory location and retrieves the data. • The memory controller sends the data back to the processor. • Step 5: Move Data to Destination Register The processor moves the retrieved data into register AX. • This example demonstrates how CISC instructions are executed. By including a wide range of instructions, CISC processors can perform complex operations using multiple sub-steps. While this can result in slower execution times compared to RISC processors, CISC processors excel at handling complex data structures and performing a wide range of operations on them. This makes them ideal for applications such as database management, scientific computing, and high-level programming languages.
  • 59. CISC and RISC architecture • RISC: • Reduced Instruction Set Computing • Examples of processors that use this architecture include ARM Cortex-A series, MIPS, and PowerPC. • Smaller instruction set with simpler instructions • Each instruction performs a simple task • Executes instructions in a single clock cycle • Relies heavily on memory access • Uses pipelining to execute instructions faster • Produces small code sizes • CISC: • Complex Instruction Set Computing • Examples of processors that use this architecture include Intel x86, AMD64, and DEC VAX. • Larger instruction set with more complex instructions • Each instruction can perform a more complex task • Requires multiple clock cycles to execute complex instructions • Has more registers available to store data • Also uses pipelining, but may be less efficient due to longer instruction length • Produces larger code sizes Overall, the choice between RISC and CISC architectures depends on the specific needs of the application being developed.
  • 61. EMBEDDED SYSTEM CONSTRAINTS An embedded system is software designed to keep in view three constraints: – Available system memory – Available processor speed – The need to limit the power dissipation When running the system continuously in cycles of wait for events, run, stop and wakeup. What makes embedded systems different ? Real-time operation ,size, cost, time , reliability, safety, energy, security
  • 62. Types of Embedded systems • Embedded systems can be classified into different types based on • Based on Generation (first generation-second generation- third generation-fourth generation) • Based on Complexity (small-scale-medium-scale-large- scale or sophisticated) • Based on functional requirements and performance of the microcontroller (real-time-stand-alone-networked- mobile) • Based on deterministic behavior (Hard real time-soft real time) • Based on triggering (time triggered-event triggered)
  • 64. Alternative Ways to Categorize Embedded Systems • Power consumption: Embedded systems can be categorized based on their power consumption, which may range from low-power, battery-operated devices to high- power systems that require external power sources. • Size and form factor: The size and form factor of an embedded system can vary widely, ranging from small, single-board computers to large, rack-mounted systems. • Application domain: Embedded systems can be classified depending on their application domain such as automotive, medical, consumer electronics, industrial automation, and military applications. • Development methodology: Embedded systems can also be categorized based on the development methodology used. This includes traditional software engineering practices, model-based design, agile methodologies, or other specialized development approaches. • Each of these categorizations can provide insight into the unique features and characteristics of an embedded system, which can help guide the design process and selection of appropriate hardware and software components
  • 66. First Generation • Early embedded systems were based on discrete circuits and used simple logic gates. • They were designed to perform a single dedicated task or function, such as controlling industrial machinery or handling data from sensors. • Assembly language was typically used for programming, which required deep knowledge of the processor's architecture and instruction set. • Memory was limited and costly, so code had to be written with maximum efficiency in mind. • Input/output (I/O) devices were often custom-designed and connected directly to the system's hardware. • Real-time performance was important, but not always guaranteed due to the lack of sophisticated scheduling mechanisms. • Reliability was a key concern, and redundancy was often built into the hardware design to prevent system failures. • Debugging and testing were difficult and time-consuming, requiring specialized tools and expertise. • These early systems were typically stand-alone and not connected to external networks. • System updates and maintenance required physical access to the device.
  • 67. Second Generation • The use of microprocessors led to smaller and more cost-effective systems. • Assembly language was still commonly used for programming, although higher-level languages such as C began to emerge. • Memory capacity increased, allowing for larger programs and more complex processing. • I/O devices were standardized and could be connected via common interfaces such as serial or parallel ports. • Real-time operating systems (RTOS) were developed, providing better control over system scheduling and resource allocation. • Systems became more interconnected through the use of local networks and communication protocols such as Ethernet and CAN bus. • Hardware components became more specialized, with dedicated chips for tasks such as graphics rendering and signal processing. • Power management became more sophisticated, with sleep modes and other techniques used to conserve energy. • Debugging and testing tools improved, making it easier to detect and fix errors in software. • System updates and maintenance could often be performed remotely.
  • 68. Third Generation • The use of system-on-chip (SoC) technology integrated more functionality onto a single chip, reducing size and cost while increasing performance. • Complex systems could be designed using hardware description languages (HDLs) such as Verilog and VHDL, allowing for hardware and software design to be done concurrently. • High-level languages such as C++ became more commonly used for programming, aided by the development of software tools such as compilers and debuggers. • Operating systems became more advanced, with support for virtual memory, multitasking, and networking. • Connectivity continued to improve, with wireless communication protocols such as ZigBee and Bluetooth becoming more widely used. • Energy efficiency techniques such as dynamic voltage and frequency scaling (DVFS) were introduced, as well as low-power sleep modes for idle periods. • Field-programmable gate arrays (FPGAs) became more common, allowing for reconfigurable hardware and faster prototyping. • Security became an increasingly important concern, leading to the development of secure boot mechanisms and encryption technologies. • Cloud-based services began to be incorporated into embedded systems, enabling remote updates and data storage. • The Internet of Things (IoT) emerged as a major trend, with embedded systems being used to connect devices and enable smart home and industrial automation.
  • 69. Fourth Generation • Advanced microprocessors and microcontrollers with higher processing power • Integration of digital signal processing (DSP) and analog-to-digital converters (ADCs) • Use of real-time operating systems (RTOS) to enable multitasking and scheduling of tasks • Incorporation of hardware accelerators, such as graphics processing units (GPUs) and field-programmable gate arrays (FPGAs) • Increased connectivity through wired and wireless protocols, including Ethernet, Wi-Fi, Bluetooth, and cellular networks • Higher security through hardware-based security mechanisms, such as trusted platform modules (TPMs) and secure enclaves • Support for machine learning and artificial intelligence (AI) algorithms, enabling intelligent decision-making and automation • Lower power consumption through advanced power management techniques and low-power components • Improved software development tools and frameworks, such as integrated development environments (IDEs) and middleware • Enhanced reliability through redundancy, fault-tolerant design, and self-diagnostic capabilities.
  • 71. B. Classification based on Complexity • Embedded systems can be classified based on their complexity and performance into four categories: 1.Small-scale embedded systems: These are the simplest and least complex type of embedded systems. They have limited resources, low processing power, and typically perform a single function. Examples include simple household appliances like toasters or rice cookers. 2.Medium-scale embedded systems: These systems are more complex than small-scale embedded systems and have moderate processing power and memory. They can handle multiple functions and may have some capability for networking. Examples include home automation systems and smart thermostats. 3.Sophisticated embedded systems or complex or large-scale
  • 72. 1-Small Scale Embedded Systems • Use low-cost microprocessors/microcontrollers • Have little hardware and software complexity • Designed to consume very little power • May or may not contain an operating system • Use C programming language for software development • Programming tools include editor, assembler, cross- assembler and IDE • Limited processing power and memory • Perform specific functions with limited resources • Used in home appliances, toys, wearables, smart home devices, temperature sensors etc. • Simple, low-cost and energy-efficient.
  • 73. 2-Medium Scale Embedded Systems • Slightly more complex than small-scale embedded systems • Moderate processing power and memory • Capable of handling multiple functions and some networking capability • Use a single 16 or 32-bit microcontroller, DSP, or RISC • May have real-time operating systems (RTOS) or general-purpose operating systems (GPOS) • Programming tools include C++, Java, C, debuggers, simulators, emulators, IDEs, and source code engineering tools • Used in applications such as home automation, medical monitoring, and automotive control systems • Require more development time and effort compared to small-scale embedded systems • Cost varies depending on the desired level of complexity and performance
  • 74. 3-Sophisticated Embedded Systems(Complex Embedded Systems or large-scale) • Designed using multiple 32-bit or 64-bit micro-controllers • Developed for large-scale complex functions • Have enormous hardware and software complexities • High performance RTOS • May require ASIPs, IPs, scalable or configurable processors and programmable logic arrays (PLAs) • Development tools may not be readily available or may need to be developed • In some cases, a compiler or retargetable compiler is necessary • Used for cutting-edge applications that require hardware and software co-design • Use both hardware and software components to design final systems or hardware products • Components need to be assembled in the final system
  • 75. Classification based on functional requirements and performance
  • 76. Classification based on functional requirements and performance • Stand-alone embedded systems: operate independently without any network connections or communication with other devices. • Real-time embedded systems: require processing data in real-time with low latency, such as medical devices, automotive control systems, or avionics systems. • Networked embedded systems are connected to a network, allowing them to communicate with other devices or systems. Examples include smart home systems or industrial automation systems. • Mobile embedded systems: designed for mobile platforms, such as smartphones or tablets, which have restricted resources that must be optimized to conserve energy and processing power.
  • 77. 1-Stand Alone Embedded Systems • Operate independently without requiring a host system or processor to function. • Input data is taken from ports as analog or digital signals, and processing is done within the port itself. • Output data is displayed on the connected device or used to control, drive, or display the device depending on the type of data. • Examples include washing machines, mobile phones, mp3 players, digital cameras, video game consoles, microwave ovens, and temperature measurement systems. • Limited functionality and processing power but are low-cost, energy-efficient, and suitable for simple applications. • Common programming tools used for developing software for stand-alone embedded systems include assembler, cross-assembler, editor, and debuggers. • Typically use single 8-bit or 16-bit microprocessors or microcontrollers that have limited processing power. • Stand-alone embedded systems have limited hardware and software complexity, which makes them relatively easy to design and program. • Small in size and portable, given their intended use in consumer electronics. • Designed for specific functions with minimal resources.
  • 78. 2-Real Time Embedded Systems • Defined as systems that must produce a required output within a specific timeframe and follow time deadlines for task completion. • Typically used in applications where timing is crucial, such as control systems or signal processing systems. • Can be classified into two types: soft real-time systems and hard real-time systems. • Soft real-time systems focus on managing processes and do not prioritize meeting deadlines. • Hard real-time systems consider timelines as the deadline and must meet strict timing requirements. • Real-time embedded systems can be scheduled either statically or dynamically. • Missing deadlines in soft embedded systems may result in system degradation. • Hard embedded systems often have no permanent memory and must complete processes correctly the first time. • The best example of a hard embedded system is an aircraft control system. • Programming languages commonly used for real-time embedded systems include C and assembly language. • Require specialized software development tools and expertise. • Can be costly to develop and test depending on the level of performance and complexity required. • Suitable for applications such as avionics systems, automotive control systems, or industrial automation systems.
  • 79. 3-Networked Embedded Systems • Consist of interconnected embedded devices that communicate with each other over a network • Can be connected to LAN, WAN, or the internet using wired or wireless communication protocols such as Ethernet, Wi-Fi, Bluetooth, or Zigbee • Typically have limited processing capabilities and memory but may incorporate various sensors and actuators to interact with the physical environment • Used in industrial applications such as manufacturing and automation where real-time data exchange is critical • Require designing to handle challenges of distributed computing such as latency, reliability, and security • Programmed using software platforms and languages such as C, Python, or ROS • Embedded web servers are a type of networked embedded system where all embedded devices are connected to a web server and accessed and controlled by a web browser • Examples include home security systems, ATM machines, and card swipe machines • Have potential to improve efficiency, optimize processes, and reduce costs in various industries. • Formed when a program runs inside another device, controlling the running program using a microprocessor or controller • The network can be either LAN or WAN, and it is not necessary that the connection should be wired or wireless • Fastest-growing category of embedded systems due to their flexibility and connectivity • Security systems in any office or tech park are examples of network embedded systems where all connections are made through a common network and controlled under one umbrella.
  • 80. 4-Mobile Embedded Systems • Used in portable embedded devices such as cell phones, mobiles, digital cameras, mp3 players, and personal digital assistants. • Consist of embedded devices that are designed to be portable and used on-the-go. • Often powered by batteries or other portable power sources. • May incorporate various sensors such as GPS, accelerometers, and gyroscopes to provide location and motion data. • Use wireless communication protocols such as Bluetooth, Wi-Fi, cellular network, or Near Field Communication (NFC). • Typically have limited processing capabilities and memory due to battery life and size constraints. • Must be designed to handle the challenges of mobility, such as intermittent connectivity and changing network conditions. • Can be programmed using various software platforms and languages, such as Java, C++, or Swift. • Examples include smartphones, tablets, wearable devices such as smartwatches and fitness trackers, and unmanned aerial vehicles (UAVs). • Have the potential to provide personalized and contextualized services and improve convenience and efficiency in various aspects of daily life. • All the devices that are portable and working with an embedded system is a mobile embedded system. • Despite limitations in memory and functionality, mobile embedded systems remain useful due to their portability and ease of use. • Examples of common mobile embedded systems include mobile phones, laptops, and calculators.
  • 82. Based on deterministic behavior • The embedded system under this classification is based on the deterministic behavior of an embedded system. Based on this execution behavior, the embedded systems are classified into hard real-time systems and soft real-time systems.
  • 83. Hard real-time • A hard real-time system strictly adheres to timing constraints. • It must meet timing deadlines without any delay. • Failure to meet deadlines could cause serious system or user failure. • Examples include airbag control and antilock braking systems in vehicles. • Delay in deployment of airbags can lead to death of passengers. • "A late answer is always a wrong answer" in hard real-time systems
  • 84. Soft real-time • Soft real-time systems do not strictly adhere to timing constraints. • Missing deadlines for tasks is acceptable within a compliance limit. • Examples include ATM systems. • A delay in withdrawing money from an ATM may not cause serious problems. • "A late answer is an acceptable answer" in soft real-time systems.
  • 85. Based on triggering • The embedded systems are classified into two types based on the triggering of the systems: • Time-triggered: If a system is activated or triggered based on the pre-defined task or preset time, then such a system is said to be the time-triggered embedded system. • Event-triggered : if the system is triggered based on some activity like change in temperature or change in pressure, such system is said to be an event triggered embedded system.
  • 86. Applications of Embedded Systems • Embedded systems are used in different applications like automobiles, telecommunications, smart cards, missiles, satellites, computer networking and digital consumer electronics.
  • 88. IC technology • Three types of IC technologies – Full-custom/VLSI – Semi-custom ASIC (gate array and standard cell) – PLD (Programmable Logic Device)
  • 89. Full-custom/VLSI All layers are optimized for an embedded system’s particular digital implementation – Placing transistors – Sizing transistors – Routing wires • Benefits – Excellent performance, small size, low power • Drawbacks – High NRE cost (e.g., $300k), long time-tomarket
  • 90. Semi-custom • Lower layers are fully or partially built – Designers are left with routing of wires and maybe placing some blocks • Benefits – Good performance, good size, less NRE cost than a full- custom implementation (perhaps $1 0k to $1 00k) • Drawbacks – Still require weeks to months to develop
  • 91. PLD (Programmable Logic Device) All layers already exist – Designers can purchase an IC – Connections on the IC are either created or destroyed to implement desired functionality – Field-Programmable Gate Array (FPGA) very popular • Benefits – Low NRE costs, almost instant IC availability • Drawbacks – Bigger, expensive (perhaps $30 per unit), power hungry, slower
  • 92. MICROCONTROLLER • A microcontroller is a functional computer system-on-a-chip. It contains a processor, memory, and programmable input/output peripherals. • Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, or both) and peripherals capable of input and output.
  • 93. Types of Microcontroller • PIC Microcontroller • PIC Stands for Peripheral Interface Controller is a kind of microcontroller components was used in the development of electronics, computer robotics, and similar devices. Even though the PIC was produced by Microchip technology and based on hardware computing architecture, here the code and data are placed in separate registers to increase the input and output. Pic has a built-in data memory, data bus and dedicated microprocessor for preparing all I/O purposes and methods. • ARM Microcontroller • ARM stands for Advanced RISC Machine. It’s the most popular Microcontrollers Programming in the digital embedded system world, and most of the industries prefer only ARM microcontrollers since it consists of significant features to implement products with an excellent appearance. It is cost sensitive and high-performance device which has been used in a wide range of application such as Industrial Instrument control systems, wireless networking and sensors, and automotive body systems, etc. • 8051 Microcontroller • Intel created 8051 microcontrollers in 1981. It is an 8bit microcontroller. It’s made with 40 pins DIP (Dual inline package), 4kb if ROM storage and 128 bytes of RAM storage, 2 16 bit timer. It consists of are four parallel 8 bit ports, which are programmable as well as addressable as per the specification.
  • 94. Types of Microcontroller • AVR Microcontroller • AVR stands for Alf and Vegard's RISC Processor. It was the modified Harvard architecture machine, where program and data were stored in the separate physical memory system that appears in different address spaces, but having the ability to browse information things from program memory victimization particular directions. AVR isn't associate degree signifier and doesn't symbolize something specially. • MSP Microcontroller • MSP stands for Mixed Signal Processor. It’s the family from Texas Instruments. Built around a 16 -bit CPU, the MSP is designed for low cost and respectively, low power dissipation embedded statements. It’s the controller's appearance is directly related to the 16-bit data bus, and seven addressing modes and the decreased instructions set, which allows a shorter, denser programming code for fast performance. • The Range of Microcontroller is an IC chip that executes programs for controlling other device or machines. It is a micro-device which is used for control of other device machines that’s why it’s called Microcontrollers Programming.
  • 95. Vendors and device family 1. Atmel: Atmel's AVR 8-bit and 32-bit microcontrollers are widely used in a variety of applications, including consumer electronics, automotive, industrial automation, and medical devices. 2. Microchip Technology: Microchip offers a range of microcontrollers, including their PIC16, PIC18, and PIC32 families, which are used in applications such as motor control, lighting, and security systems. 3. Texas Instruments: Texas Instruments has a wide range of microcontrollers, including its MSP430, C2000, and Stellaris families, which are used in a variety of embedded systems, including smart grids, industrial automation, and medical devices. 4. NXP Semiconductors: NXP offers a range of microcontrollers, including its LPC, i.MX, and Kinetis families, which are used in a variety of applications, including automotive, industrial, and consumer electronics. 5. STMicroelectronics: STMicroelectronics offers a range of microcontrollers, including its STM8 and STM32 families, which are used in applications such as motor control, lighting, and smart homes.
  • 96. VARIOUS MICROCONTROLLERS INTEL (8031 ,8032,8051 ,8052,8751 ,8752 ) PIC (8-bit PIC1 6, PIC1 8, 1 6-bit DSPIC33 / PIC24, PIC1 6C7x ) Motorola (MC68HC1 1)
  • 97. EMBEDDED PROCESSOR • Special microprocessors & microcontrollers often called, Embedded processors. • An embedded processor is used when fast processing fast context-switching & atomic ALU operations are needed. Examples : ARM 7, INTEL i960, AMD 29050
  • 98. DIGITAL SIGNAL PROCESSOR • DSP as a GPP is a single chip VLSI unit. • It includes the computational capabilities of microprocessor and multiply & accumulate units (MAC). • DSP has large number of applications such as image processing, audio, video & telecommunication processing systems. • It is used when signal processing functions are to be processed fast. Examples : TMS320Cxx, SHARC, Motorola 5600xx
  • 99. APPLICATION SPECIFIC SYSTEM PROCESSOR (ASSP) • ASSP is dedicated to specific tasks and provides a faster solution. • An ASSP is used as an additional processing unit for running the application in place of using embedded software. Examples : IIM71 00, W31 00A
  • 100. MULTI PROCESSOR SYSTEM USING GPPs • Multiple processors are used when a single processor does not meet the needs of different task. • The operations of all the processors are synchronized to obtain an optimum performance
  • 101. Moore’s Law • Moore's law describes a long-term trend in the history of computing hardware. • Since the invention of the integrated circuit in 1 958, the number of transistors that can be placed inexpensively on an integrated circuit has increased exponentially, doubling approximately every two years. • The trend was first observed by Intel co-founder Gordon E. Moore in 1965. • Almost every measure of the capabilities of digital electronic devices is linked to Moore's law: processing speed, memory capacity, etc.
  • 104. OTHER HARDWARE • Power Source • Clock Oscillator • Real Time Clock (RTC) • Reset Circuit, Power-up Reset and watchdog timer Reset • Memory • I/O Ports, I/O Buses • Interrupt Handler • DAC and ADC • LCD and LED Display • Keypad/Keyboard
  • 109. Embedded Systems - Tools & Peripherals • Compiler • A compiler is a computer program (or a set of programs) that transforms the source code written in a programming language (the source language) into another computer language (normally binary format). The most common reason for conversion is to create an executable program. The name "compiler" is primarily used for programs that translate the source code from a high-level programming language to a low-level language (e.g., assembly language or machine code). • Cross-Compiler • If the compiled program can run on a computer having different CPU or operating system than the computer on which the compiler compiled the program, then that compiler is known as a cross-compiler. • Decompiler • A program that can translate a program from a low-level language to a high-level language is called a decompiler.
  • 110. Embedded Systems - Tools & Peripherals • Language Converter • A program that translates programs written in different high-level languages is normally called a language translator, source to source translator, or language converter. • A compiler is likely to perform the following operations − • Preprocessing • Parsing (‫)تحليل‬ • Semantic ( ‫داللي‬ ) Analysis (Syntax-directed translation) • Code generation • Code optimization • Assemblers • An assembler is a program that takes basic computer instructions (called as assembly language) and converts them into a pattern of bits that the computer's processor can use to perform its basic operations. An assembler creates object code by translating assembly instruction mnemonics into opcodes, resolving symbolic names to memory locations. Assembly language uses a mnemonic to represent each low-level machine operation (opcode).
  • 111. Debugging Tools in an Embedded System • Debugging is a methodical process to find and reduce the number of bugs in a computer program or a piece of electronic hardware, so that it works as expected. Debugging is difficult when subsystems are tightly coupled, because a small change in one subsystem can create bugs in another. The debugging tools used in embedded systems differ greatly in terms of their development time and debugging features. We will discuss here the following debugging tools • Simulators • Microcontroller starter kits • Emulator
  • 112. Simulators • Code is tested for the MCU / system by simulating it on the host computer used for code development. Simulators try to model the behavior of the complete microcontroller in software. • Functions of Simulators: A simulator performs the following functions 1. Defines the processor or processing device family as well as its various versions for the target system. 2. Monitors the detailed information of a source code part with labels and symbolic arguments as the execution goes on for each single step. 3. Provides the status of RAM and simulated ports of the target system for each single step execution. 4. Monitors system response and determines throughput. 5. Provides trace of the output of contents of program counter versus the processor registers. 6. Provides the detailed meaning of the present command. 7. Monitors the detailed information of the simulator commands as these are entered from the keyboard or selected from the menu. 8. Supports the conditions (up to 8 or 16 or 32 conditions) and unconditional breakpoints. 9. Provides breakpoints and the trace which are together the important testing and debugging tool. 10. Facilitates synchronizing the internal peripherals and delays.
  • 113. Microcontroller Starter Kit • A microcontroller starter kit consists of : • Hardware board (Evaluation board) • In-system programmer • Some software tools like compiler, assembler, linker, etc. • Sometimes, an IDE and code size limited evaluation version of a compiler. • A big advantage of these kits over simulators is that they work in real-time and thus allow for easy input/output functionality verification. Starter kits, however, are completely sufficient and the cheapest option to develop simple microcontroller projects.
  • 114. Emulators • An emulator is a hardware kit or a software program or can be both which emulates the functions of one computer system (the guest) in another computer system (the host), different from the first one, so that the emulated behavior closely resembles the behavior of the real system (the guest). • Emulation refers to the ability of a computer program in an electronic device to emulate (imitate) another program or device. Emulation focuses on recreating an original computer environment. Emulators have the ability to maintain a closer connection to the authenticity of the digital object. An emulator helps the user to work on any kind of application or operating system on a platform in a similar way as the software runs as in its original environment.
  • 115. Peripheral Devices in Embedded Systems • Embedded systems communicate with the outside world via their peripherals, such as following &mins; • Serial Communication Interfaces (SCI) like RS-232, RS-422, RS-485, etc. • Synchronous Serial Communication Interface like I2C, SPI, SSC, and ESSI • Universal Serial Bus (USB) • Multi Media Cards (SD Cards, Compact Flash, etc.) • Networks like Ethernet, LonWorks, etc. • Fieldbuses like CAN-Bus, LIN-Bus, PROFIBUS, etc. • imers like PLL(s), Capture/Compare and Time Processing Units. • Discrete IO aka General-Purpose Input/Output (GPIO) • Analog to Digital/Digital to Analog (ADC/DAC) • Debugging like JTAG, ISP, ICSP, BDM Port, BITP, and DP9 ports
  • 116. Criteria for Choosing Microcontroller • While choosing a microcontroller, make sure it meets the task at hand and that it is cost effective. We must see whether an 8-bit, 16-bit or 32-bit microcontroller can best handle the computing needs of a task. In addition, the following points should be kept in mind while choosing a microcontroller − • Speed − What is the highest speed the microcontroller can support? • Packaging − Is it 40-pin DIP (Dual-inline-package) or QFP (Quad flat package)? This is important in terms of space, assembling, and prototyping the end-product. • Power Consumption − This is an important criteria for battery-powered products. • Amount of RAM and ROM on the chip. • Count of I/O pins and Timers on the chip. • Cost per Unit − This is important in terms of final cost of the product in which the microcontroller is to be used. • Further, make sure you have tools such as compilers, debuggers, and assemblers, available with the microcontroller. The most important of all, you should purchase a microcontroller from a reliable source.
  • 118. Microchip PIC vs prototyping platforms
  • 125. Memory types 1. ROM (Read-Only Memory): As mentioned earlier, ROM is non-volatile memory that stores the program code and data that is permanently written to the chip during manufacturing. This means that the content of ROM cannot be changed after it has been programmed. ROM is very reliable and can be used for storing critical system-level software such as bootloaders and low-level drivers. 2. Flash Memory: Flash memory is also non-volatile memory that can be programmed and reprogrammed. It is commonly used for storing program code and data that may need to be updated or changed over time. Flash memory has a limited number of write cycles, typically ranging from 10,000 to 100,000 cycles. This means that care must be taken when writing to flash memory to avoid wearing it out prematurely. 3. SRAM (Static Random Access Memory): SRAM is volatile memory that is used for storing data and variables during program execution. The contents of SRAM are lost when power is turned off. Because SRAM is fast and easy to access, it is often used for buffering and other temporary storage needs. However, its volatility makes it unsuitable for long-term data storage. 4. EEPROM (Electrically Erasable Programmable Read-Only Memory): EEPROM is non-volatile memory that can be erased and reprogrammed electrically. It is commonly used for storing small amounts of data that need to be preserved even when power is turned off. EEPROM has a much lower write endurance than flash memory, typically ranging from 100,000 to 1 million cycles. 5. FRAM (Ferroelectric Random Access Memory): FRAM is a non-volatile type of RAM that combines the best features of EEPROM and SRAM. It has fast write speeds, low power consumption, and can be written to an unlimited number of times without wearing out. Unlike EEPROM, FRAM has a much higher write endurance, typically ranging from 10^13 to 10^15 cycles. However, FRAM is currently more expensive than other memory types and has a lower storage density.
  • 126. Memory types • several types of memories commonly found in microcontrollers: 1.ROM (Read-Only Memory): This is non-volatile memory that stores the program code and data that is permanently written to the chip during manufacturing. 2.Flash Memory: This is also non-volatile memory that can be programmed and reprogrammed. It is commonly used for storing program code and data that may need to be updated or changed over time. 3.SRAM (Static Random Access Memory): This is volatile memory that is used for storing data and variables during program execution. The contents of SRAM are lost when power is turned off. 4.EEPROM (Electrically Erasable Programmable Read-Only Memory): This is non-volatile memory that can be erased and reprogrammed electrically. It is commonly used for storing small amounts of data that need to be preserved even when power is turned off. 5.FRAM (Ferroelectric Random Access Memory): This is a non-volatile type of RAM that combines the best features of EEPROM and SRAM. It has fast write speeds, low power consumption, and can be written to an unlimited number of times without wearing out.
  • 127. References • Barrett, Embedded Systems: Design and Applications, Pearson Education. • Raj Kamal, Embedded Systems: Architecture, Programming and Design, Tata McGraw Hill.Mazidi, • Mazidi and McKinlay, The 8051 Microcontroller and Embedded Systems using assembly and C, Pearson • https://embeddedschool.in/different-types-of-microcontroller-programming-used-in-embedded- systems/ • https://www.tutorialspoint.com/embedded_systems/es_microcontroller.htm • https://www.geeksforgeeks.org/classification-of-embedded-systems/ • https://www.educba.com/types-of-embedded-systems/ • https://www.watelectronics.com/classification-of-embedded-systems/ • https://www.microcontrollertips.com/risc-vs-cisc-architectures-one-better/ • https://www.javatpoint.com/risc-vs-cisc • https://www.javatpoint.com/microprocessor-architecture • https://www.youtube.com/watch?v=KspcdMLtE0E • https://www.youtube.com/watch?v=uBfiX2nIR3c • https://www.electrically4u.com/classification-of-embedded-system/

Editor's Notes

  1. https://www.tutorialspoint.com/embedded_systems/es_overview.htm
  2. https://www.tutorialspoint.com/embedded_systems/es_processors.htm
  3. https://www.javatpoint.com/risc-vs-cisc
  4. https://www.javatpoint.com/risc-vs-cisc
  5. https://www.javatpoint.com/risc-vs-cisc
  6. https://www.javatpoint.com/risc-vs-cisc
  7.  Instruction Set Architecture (ISA)