Embedded Systems 2023
Embedded Systems 2023
Embedded Systems 2023
(EENG1755)
Al-Baha University
Engineering Faculty
Electric Engineering Dept.
BSc degree
Thamer Aladnan
([email protected])
August 2023
Course Assessment
Assessment Tasks Weight
Quiz 1 5%
Midterm 20%
Assignment 15%
Lab. 20%
Final Exam 40%
Total 100%
References
• Embedded Systems Design Using the MSP430FR2355 LaunchPadTM By Brock J. LaMeres · 2020.
• PIC Microcontroller and Embedded Systems Using Assembly and C for Pic18, By Muhammad Ali
Mazidi, Danny Causey, Rolin McKinlay · 2016.
Embedded Systems
• An embedded system is a combination of computer
hardware (microprocessor , memory, input output and
peripheral devices ) and software (Program code)
designed for a specific function. Embedded systems
may also function within a larger system. The systems
can be programmable or have a fixed functionality.
• Embedded systems are multi-disciplines topic.
• General-purpose computers are used for a wide range of
apps.
• Embedded systems are used in apps such as: TV, phones,
washing machines, power plants renewable systems (e.g.
solar PV systems), conventional and electric automobiles,
HVAC (heating ventilation and air-conditioning systems),
…, etc.
Embedded Systems
• components can be integrated on a single chip (ICs).
• Include a variety of peripherals (timers, analog-to-
digital converters, digital-to-analog converters, serial
interfaces).
• Small size makes them very versatile.
• May come with firmware (only the needed software
which is not intended to be changed frequently).
• May contain Real Time Operating Systems (RTOS)
which are used as a task scheduler.
• Low cost (around 100 Saudi Riyals).
Embedded Systems Engineering
CPU Memory
(ALU, control unit, clock)
(RAM, ROM, SD) I/O ports OS
µ-processor
µ-controller
µ-computer
Real Examples
• CPUs are available in different characteristics (X-bit, speed,
single/dual core) based on the apps and tasks to perform. CPUs
• Arduino UNO is more likely a Micro-controller.
• Raspberry-Pi is more likely a Micro-computer.
• Both Arduino UNO and Raspberry-Pi devices are based on
CPUs.
• Different versions (Ard. UNO, Ard. nano, Rasp. Pi pico) have
different configurations and thus different applications.
• What it the best technology for your application?
Arduino UNO
C2000 TI
Raspberry-Pi
Relevant Definitions
Embedded Systems Design Considerations
Operational Considerations—have to do with the scenarios within which the product will operate.
Operational requirements usually cover the following concerns (here are suggested areas, but they do
not include of all possibilities):
1. Mission profiles
2. How an operator uses the system—the human interface
3. Environment
1. Mechanical shock
2. Vibration
3. Corrosion (possibly salt spray or toxic environments)
4. Humidity
5. Temperature range
6. Vacuum
7. Dust
8. Radiation (only for space environments or nuclear power)
4. Infrastructure needed
5. Logistics and maintenance
6. Responsible party for generating the requirements
Embedded Systems Design Considerations
Functional Considerations—have to do with the physical plant and situations within which the product
will reside. Functional requirements usually cover the following concerns (here are suggested areas):
1. Interfaces (perhaps from ICDs)—human, mechanical, electrical, software, special
2. (e.g., optics)
3. Mechanical—size, shape, weight, volume, density
4. Electrical—power sources, distribution
5. Responsible party for generating the requirements
Embedded Systems Design Considerations
Performance Considerations—have to do with the metrics and parameters that describe the product’s
capability. Performance requirements can cover, but are not limited to, the following concerns:
• Responsible party for generating the requirements
• Sensor parameters (here are just some possible considerations, these may or may not apply to your
project):
• Measurand
• Speed of transduction—samples per second
• Span
• Full scale output
• Linearity—%, SNR
• Threshold
• Resolution—ENOB
• Accuracy—SNR
• Precision
• Sensitivity—%
• Hysteresis
• Specificity
• Noise—SNR, % budget
• Stability
Embedded Systems Design Considerations
Performance Considerations—have to do with the metrics and parameters that describe the product’s
capability. Performance requirements can cover, but are not limited to, the following concerns:
• Data throughput
• Bytes or samples per second
• Data transmission protocol
• Data storage
• Control
• Operation
• Electrical—power consumption, efficiency, signal integrity
• Mechanical—strength, motion required
• Structural—capability to withstand environments in mission profiles
• Optical (probably not needed in many projects)
• Calibration
• Dependability
• Reliability
• Maintainability
• Testability
• Fault tolerance
• Longevity
Embedded Systems Design Considerations
Performance Considerations—have to do with the metrics and parameters that describe the product’s
capability. Performance requirements can cover, but are not limited to, the following concerns:
• Power consumption
• Dissipation and cooling
• Electromagnetic compatibility (EMC)
• Conducted susceptibility
• Radiated susceptibility
• Conducted interference
• Radiated interference
Embedded Systems Requirements
• Flexibility measures how easy it is to add new capabilities to the product. You might refer to it as
augmentation, extensibility, extendability, or expandability.
• Integrity relates to security. This quality requirement category describes what is required to block
unauthorized access to certain system functions, how to prevent information loss, how to ensure that
the system is protected from virus infection, and how to protect the privacy and safety of data entered
into the system.
• Upgradability—systems that have a high probability of later revisions should be designed to support
easy upgrades.
• Interoperability defines the ease in which the system can exchange data or services with other
systems.
• Reliability defines the probability of the system operating without failure for a specific period of time.
Ways to measure system reliability include the percentage of operations that are completed correctly
and the average length of time the system runs before failing.
• Robustness, or “ fault tolerance,” is the degree to which a system continues to function properly
when presented with invalid inputs, or defects in connected software or hardware or mechanical
components, or unexpected operating conditions. System robustness can be viewed as an aspect of
reliability.
Embedded Systems Requirements
• Usability, or “ ease of use,” refers to the many factors that constitute what users often describe as
user-friendliness.
• Maintainability measures how easy is it to correct a defect or modify the system. It depends on how
easily the system can be understood, changed, and tested.
• Portability addresses the effort required to migrate a system component from one operating
environment to another. Portability may include the ability to internationalize and localize a product
and has aspects similar to reusability.
• Reusability defines the effort involved to convert a system component for use in other applications.
Lack of reusability leads to systems that are more costly to develop. Reusable systems are modular,
well documented, independent of a specific application and operating environment, and somewhat
generic in capability.
• Testability or verifiability is an important class of requirement. This class of requirement addresses the
ease with which system components or the integrated product can be tested for defects. This is very
important for complex algorithms and logic, as well as subtle functionality interrelationships.
• Security against cyber-attack for internet-based apps.
General Embedded Systems’ Hardware
1- Central Processing Unit (CPU)
2- Memory Unit
3- Input/Output (I/O) Units
4- Power Supply
µ-controller
Central Processing Unit (CPU)
Central Processing Unit (CPU)
• Control Unit:
Central Processing Unit (CPU)
• Registers:
Central Processing Unit (CPU)
• ALU:
Central Processing Unit (CPU)
• Central Processing Unit is often called the brain of computer.
• A CPU controls all the internal and external devices and performs arithmetic and logic operations.
• The primary functions of the CPU are as follows:
1. The CPU transfers instructions and input data from main memory to registers, i.e. internal memory.
2. The CPU executes the instructions in the stored sequence.
3. When necessary, CPU transfers output data from registers to main memory.
• The primary difference between register and memory is that register holds the data that the CPU is
currently processing whereas, the memory holds the data the that will be required for processing. The
Register ranges from 32-bits register to 64-bits register whereas, the memory capacity ranges from
some GB to some TB.
• Most ALUs can perform the following operations:
1. Logical operations (AND, NOT, OR, XOR).
2. Arithmetic operations (addition, subtraction, multiplication and division).
3. Bit-shifting operations (shifting or rotating a word by a specified number of bit to the left or right
with or without sign extension).
4. Comparison operations (=, <, < =, >, > =)
Processors Hardware Architectures
Von-Neumann vs Harvard
Control Bus
Control Bus Read/Write
Read/Write
Von-Neumann vs Harvard Processor Architecture
Instructions Processing
• Processing methods:
1- RISC.
2- CISC.
• Pipelining feature
Instructions Processing
CISC vs RISC
Instructions Processing
• Pipelining is a technique for breaking down a
sequential process into various sub-operations
and executing each sub-operation in its own
dedicated segment that runs in parallel with all
other segments. Clk.1 Clk.2 Clk.3
• Pipelining is the process of storing and
prioritizing computer instructions that the
processor executes. It lets the processor
perform an instruction in multiple steps. The
processing happens in a continuous, orderly,
somewhat overlapped manner.
• Pipelining is applicable to both RISC and CISC
approaches.
• Cache can be employed in pipelining to improve
memory access speed.
Classes of Instructions
• Data Movement Instructions
Classes of Instructions
• Data Manipulation Instructions
Classes of Instructions
• Program Flow Instructions
Instructions writing
• Op-coding
• Operand
Instructions writing
Bus System
Bus System