3. 1.0 Embedded Systems
• All systems that contain one or more processor to do specific functionalities
and give responses upon receiving inputs.
• This processor is not for general purposes like general purpose Processor in
PC’s and notebooks.
4. 1.0 Embedded Systems(cont’d)
Another definition:
• Computing systems with tightly coupled hardware and software
integration, that are designed to perform a dedicated function(s).
• The word embedded reflects the fact that these systems are usually an
integral part of a larger system, known as the Embedding System. Multiple
embedded systems can coexist in an embedding system.
12. 1.2 How Could these systems act like that?
we have two paths
Feed back systems:
• Getting a feed back that gives for
me a reading of a state that the
robot is in it right NOW.
• Pros:
The most used, cause it’s reliability is
very high.
• Cons:
Need observation to solve the
uncertainty problem.
Mathematical model:
• Make a mathematical model for the
Robot/system and predict the
output from the input equation.
(Y=A*X whereY is the output, A is the
mathematical model of the system,
and X is the input.)
• Pros:
It is the most way used when we can’t
take a feedback from the system.
• Cons:
Mathematical model of the System
changes with time, temp, and
environment. In words hysterias
property occurs.
13. 1.3 Essential Considerations in Embedded
design
• ResponseTime ‐‐ RealTime Systems
• Area
• Cost
• Portability
• Low Power (Battery Life)
14. 2.1 General Purpose Processors
• 16/32‐bit data path.
• Contains ALU(arithmetic logic unit)
• Contains Registers that is used in
arithmetic and logic operations.
• It contains PC(program counter).
• Designed for a wide range of applications .
• Examples: ARM, PowerPC, MIPS, 68K, x86.
15. 2.2 Microcontrollers
• The workhorse of industrial electronics.
• Designed for standalone operation.
• Include a processing unit of 8‐bit, 16‐bit, 32‐bit.
• Included memories (RAM, ROM), I/O, buses and peripherals, depending on
the application designed for (LIN , CAN , Ethernet , I2C , SPI,…etc ).
17. 2.3 Embedded Software Characteristics
• Highly configurable.
• Shorter development cycle.
• Easier in versions updates.
• Cheaper.
• Constrained to processor speed which may or may not satisfy real time
applications.
18. 2.4 Difference between Microcontroller and
Microprocessor
Microprocessor: Microcontrollers:
Is a typical Personal Computer where devices are
attached to the CPU, using hard‐wired
connections, which makes the system more
flexible.That means you can add more memory,
change capacity of hard drives, add or remove
CD‐ROMs, sound cards, etc.
Is a single chip, self‐contained computer which
incorporates all the basic components of a personal
computer on a much smaller scale.
Most of these components are built exactly within
the same package.
Some of these components are: CPU, RAM, ROM,
Timers, I/O, etc.
19. 2.5 Microcontroller in a System
• Microcontrollers don’t work alone in the circuit it must interfaces with other on chip devices.
• Microcontroller can accept inputs from some components and provide outputs to other
components within any given system.
• Differences in requirements, make the manufacturers produce different microcontrollers with
different memory sizes, number of I/O lines and number of integrated peripheral devices.
Otherwise they are all similar to use.
20. 2.5 System On Board Generic Embedded
System Structure
21. 3.0 Microcontroller main components
• Central processing unit (CPU).
• Buses.
• Memory units.
• Input and Output (GPIO or DIO).
22. 3.1Central Processing Unit(CPU)
• The unit which monitors and controls all processes inside the
microcontroller. It consists of several smaller units.
The most important units are:
23. 3.1Central Processing Unit(cont’d)
• Arithmetical logical unit (ALU):
performs all mathematical and logical operations upon received data.
• Instruction Decoder
Is a part of electronics that recognizes program instructions and runs other
circuits as a result.The “instruction set” which differs from microcontroller
family to another expresses the abilities of this circuit.
24. 3.1Central Processing Unit(cont’d)
• BUS
– Physically, the bus consists of 8, 16 or more wire.
–There are two types of buses: address and data bus.The first one consists of
as many lines as necessary for memory addressing.The other one is as wide as
data width, it may be 8, 16, or 32 bits or wires wide.
25. 3.2CPU Main Registers
• The numbers and names of registers vary drastically
• among microcontrollers. However there are certain
• registers which are common to most of microcontrollers,
• although the names may vary.
26. CPU Main RegistersIndex register Program counter
Register
Special Function
Registers (SFR registers)
Stack pointer
–The index register is
used to specify an
address when a certain
addressing mode is used.
– It is also known as the
pointer register.
– Perhaps the most
important CPU register is
the program counter(PC).
–The PC holds the
address of the next
instruction in program
memory space, which the
CPU will process.
As each instruction is
fetched and processed by
the ALU, the CPU
increments the PC and
thereby steps through
the program stored in the
program memory space.
Their bits are connected
(literally) to internal
circuits such as timers,
A/D converter, oscillators
and others, which means
that they are directly
under command of the
operation of the
microcontroller.
– Contains the address of
the next location in the
stack.
– Decremented when
data is pushed into the
stack and incremented
when data is popped out
from the stack (and may
be vice versa for some
processors).
27. 3.3 CPU Architecture
• There are two basic types of architecture: Harvard andVon Neumann.
• Microcontrollers most often use a Harvard or a modified Harvard‐based
architecture.
28. 3.3 CPU Architecture(cont’d)
• Von‐Neumann architecture
–Von Neumann architecture has a single, common memory space where both
program instructions and data are stored.
–There is a single data bus which fetches both instructions and data.
29. 3.3CPU Architecture(cont’d)
• Von‐Neumann architecture
– Each time CPU fetches a program instruction it may have to perform one or
more read/write operation from/to data memory space. It must wait until
these subsequent operations are complete before it can fetch and decode the
next program instruction.
30. 3.3 CPU Architecture(cont’d)
• Harvard Architecture
– Harvard architecture computers have separate memory areas for program
instructions and data.
– One bus is a 8‐bit wide and connects CPU to RAM memory.The other bus
consists of several lines (12, 14 or 16) and connects CPU to ROM memory.
31. 3.3 CPU Architecture(cont’d)
• Harvard Architecture
–The CPU can read an instruction and perform a data memory access at the
same time.
–This speeds up execution time but increases the cost of more hardware
complexity
32. 3.4 Memory Unit
• Memory is a part of the microcontroller used for data storage.
• There are different types of memory
within the microcontroller:
– ROM memory (Read Only Memory)
– RAM memory (Random Access Memory).
33. 3.4 RAMVS ROM
Comparison chart RAM ROM
Definition Random Access Memory or RAM is
a form of data storage that can be
accessed randomly at any time, in
any order and from any physical
location., allowing quick access
and manipulation.
Read-only memory or ROM is also
a form of data storage that can not
be easily altered or reprogrammed.
Stores instructions that are not
necessary for re-booting up to
make the computer operate when
it is switched off.They are
hardwired.
Stands for Random Access Memory Read-only memory
Use RAM allows the
microprocessor/controller to read
data quickly to run applications. It
allows reading and writing.
ROM stores the program required
to initially boot the computer. It
only allows reading.
Volatility RAM is volatile i.e. its contents are
lost when the device is powered
off.
It is non-volatile i.e. its contents
are retained even when the device
is powered off.
Types The two main types of RAM are
static RAM and dynamic RAM.
The types of ROM include PROM,
EPROM and EEPROM.
34. 3.5 HOW all of this work together?
• The crustal is the heart of the
Microcontroller which is the brain
of the system.
• It gives the microcontroller the
operating frequency(speed of
microcontroller), and the clock
reference where it can shift from instruction to another.
36. 3.6 Input and Output (cont’d)
• The microcontroller has to be connected to additional electronics,
peripherals.
• For that reason, each microcontroller has one or more registers (called
“port” in this case) to which it’s connected.
• Suppose you want your device to turn on and off three signal LEDs and
simultaneously monitor logic state of five sensors or push buttons to the
microcontroller pins.
37. 3.6 Input and Output (cont’d)
• low‐current consumption (10‐20 mA).
• Each I/O port is under control of another SFR, which means that each bit of
that register determines state of the corresponding microcontroller pin.
38. 3.7 Other peripherals
• ADC(Analog to Digital Converting).
• Timers.
• Serial protocols(SPI,UART,I2C…etc).
• Comparators.
39. 4.0 Summary
• Microcontroller is the brain of the embedded system.
• The oscillator is the heart that the makes the microcontroller executes
instructions.
• The Code is written/burned in the ROM.
• Microcontroller writes and reads the Data through processing in the RAM.
• The Data is transferred between the CPU, memory, and other peripherals
through BUS.
• There are a lot of microcontroller peripherals that makes microcontrollers
different from each other.