Вы находитесь на странице: 1из 19

Module : Embedded & Real Time System.

Lesson1

Topics Covered :Introduction to Embedded System

Lecture by :P. Jenifer Darling Rosita,


Learning Outcomes:

On completion of this lesson, the learner should able to

• Define What is an Embedded System.


• Draw blocks involved in Embedded Systems.
• Know the Concepts of Task
• Understand the Process of Interrupt Service
Routine.
Introduction to Embedded Systems

What is an Embedded System(ES)?

• Integration of Software & Hardware.


• Design to perform a particular task(Real
Time).
• Used with one or more sensors with one or
more micro controller and a microprocessor.
Embedded
Expert
Software
Expert

Integrated
Embedded
Device
Applications of Embedded System
Many Applications are utilizing Embedded System.

Some of them are listed below


Components of Embedded Systems
• Embedded system consists of several components such as
Microprocessor, Microcontroller, Sensors, Communication
Bus Interfaces.
• These components together performs a particular task in
real time.
• Sensors are used in specific application to measure a
quantity.
• Bus Interfaces are used to communicate with the controller
in bit rates.
• Microcontroller is the brain of embedded system which
sends and receives the information to and from the
peripherals.
TIME TO THINK !!!

I am the brain
of Embedded
Application

MICROCONTROLLER-Sends &
Receives Information.
Difference Between Microprocessor and
Microcontroller
If a Microcontroller(µc) is the brain of embedded
application, then what about Microprocessor (µp)!!!

• A microprocessor is a part of microcontroller.


• The above diagram explains the structure of
microcontroller also with its one of the
component “Microprocessor”
Difference Between Microprocessor and
Microcontroller (Cond..)

Microcontroller Microprocessor

Special purpose processor. General purpose Processor.


Do’s Specific Task . Do’s Multi task.
Software protected. Not Software protected.
Occupies less space. Occupies more space.
Less power consumption. More power consumption.
Activity 1 :

Draw the blocks (Components)involved in Embedded Systems by your


own.

Discussions are continued in next lesson……

Hints:
Inputs : Sensors, A/D Convertors, µc’s, µp’s.
Outputs : Actuators, D/A Convertors, µc’s, µp’s
Task
• A piece of job to be done in a a period of time.(or)

• A work that should be done within the deadline.

Deadline
• Deadline is a timing milestone.
Soft Real Time

• Soft Real Time are one which can accept few deadline
misses .
• Even though the deadlines are meet, it wont results in
much failure.

Eg. Mobile Phone, digital Camera.


Hard Real Time

• When an event occurs, it should be processed within a


predictable time. If the task is completed in predicted
time, it may results in failure of that task.
Eg: Anti lock Brake system, Airbag

• Hard Real Time can be achieved by disabling all the other


interrupts of lower priority.
Interrupt(cond..)

• An event external to the currently executing process that


causes a change in normal flow of instruction execution.
• Usually generated by Hardware devices external to CPU.
• Interrupt can be executed by Interrupt Service
Routine(ISR).
Execution of an interrupt(Cond…)
Normal Program Processor State Saved
1 Execution 3

2 Interrupt Occurs
4 Interrupt
Routine
Runs

Processor 5
6 State c
Restores v Interrupt
Normal x Routine
7 b Terminates
Program
Execution
Resumes
TIME TO THINK !!!

Example of Interrupt

• Patient who reserves with the doctor & waits to see


the doctor in similar to ‘waiting in queue’. This shows
that the priority is given to the patient who reserves
the doctor first.
• The doctor starts looking their patient in priority
format
• Suddenly, a patient in emergency needs treatment
from doctor immediately is considered as an
“interrupt”.
• Now, the doctor should end up with the previous
patient and he allows the emergency patient and
after that he resumes the queue back
When an interrupt occurs, the following sequence is
followed.
1. Execution of main program is suspended by hardware
 The current instruction is finished
 Registers are moved to the stack.
 Vector address is retrieved and placed in PC.
2. Interrupt Service Routine(ISR) is executed and ISR
 Clears the flag.
 Performs the necessary operations.
 Communicates with each other.
3. Main program is resumed(EXC_RETURN)
 Hardware pulls the registers from stack including PC.
 Program continues where it was interrupted.
Activity 3

• Illustrate how will you relate “interrupts” in your daily


life.

Hints:
• Think about your gadgets and gadgets applications such as Facebook,
Whatsapp…
• Utilize the concepts of sensors..

Вам также может понравиться