SlideShare a Scribd company logo
1 of 211
Download to read offline
EMBEDDED SYSTEMS
III YEAR EEE
06TH Semester
R M K COLLEGE OF ENGINEERING AND
TECHNOLOGY
EE6602 – EMBEDDED SYSTEM
OBJECTIVES:
 To introduce the Building Blocks of Embedded System
 To Educate in Various Embedded Development Strategies
 To Introduce Bus Communication in processors, Input/output interfacing.
 To impart knowledge in Various processor scheduling algorithms.
 To introduce Basics of Real time operating system and example tutorials to discuss
on one real-time operating system tool
1
EE6602 – EMBEDDED SYSTEM
Syllabus:
UNIT I
INTRODUCTION TO EMBEDDED SYSTEMS
Introduction to Embedded Systems – The build process for embedded systems-
Structural units in Embedded processor , selection of processor & memory devices- DMA
– Memory management methods- Timer and Counting devices, Watchdog Timer, Real
Time Clock, In circuit emulator, Target Hardware Debugging.
UNIT II
EMBEDDED NETWORKING
Embedded Networking: Introduction, I/O Device Ports & Buses– Serial Bus
communication protocols -RS232 standard – RS422 – RS485 - CAN Bus -Serial
Peripheral Interface (SPI) – Inter Integrated Circuits (I2C) –need for device drivers.
2
EE6602 – EMBEDDED SYSTEM
Syllabus:
UNIT III
EMBEDDED FIRMWARE DEVELOPMENT ENVIRONMENT
Embedded Product Development Life Cycle- objectives, different phases of EDLC, Modelling
of EDLC; issues in Hardware-software Co-design, Data Flow Graph, state machine model,
Sequential Program Model, concurrent Model, object oriented Model.
UNIT IV
RTOS BASED EMBEDDED SYSTEM DESIGN
Introduction to basic concepts of RTOS- Task, process & threads, interrupt routines in RTOS,
Multiprocessing and Multitasking, Preemptive and non-reemptive scheduling, Task
communication-shared memory, message passing-, Inter process Communication –
synchronization between processes-semaphores, Mailbox, pipes, priority inversion, priority
inheritance, comparison of Real time Operating systems: Vx Works, чC/OS-II, RT Linux.
UNIT V
EMBEDDED SYSTEM APPLICATION DEVELOPMENT
Case Study of Washing Machine- Automotive Application- Smart card System Application.
3
TOPICS TO BE DISCUSSED
• System
• Embedded System
• Components
• Classifications
• Processors
• Other Hardware
• Software
• Applications
5
What is a system?
A system is a way of working,
organizing or doing one or many tasks
according to a fixed plan, program or
set of rules.
A system is also an arrangement
in which all its units assemble and
work together according to the plan or
program.
6
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
7
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
8
Definition: An Embedded System is one that has
computer hardware with software embedded in it as
one of its important components.
SOFTWARE PROGRAM
#include <16f876a.h>
#use delay (clock=20000000)
#byte PORTB=6
main()
{
set_tris_b(0);
portb=255; //decimal
delay_ms(1000);
portb=0x55; //hexadecimal
delay_ms(1000);
portb=0b10101010; //binary
delay_ms(500);
}
Its software embeds in
ROM (Read Only
Memory). It does not need
secondary memories as in
a computer
HARDWARE
9
A Microprocessor
A Large Memory
(Primary and Secondary)
(RAM, ROM and caches)
Input Units
(Keyboard, Mouse, Scanner, etc.)
Output Units
(Monitor, printer, etc.)
Networking Units
(Ethernet Card, Drivers, etc.)
I/O Units
(Modem, Fax cum Modem, etc.)
10
• 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.
11
12
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.
13
1.Pragram is Preloaded or embedded in the ROM
2.The system functions in real time. The task
execute according to priorities.
3.Dedicated set of function
4.Complex algorithm
14
• Real-time operation
• size
• cost
• time
• reliability
• safety
• energy
• security
15
1. Small Scale Embedded System
2. Medium Scale Embedded System
3. Sophisticated Embedded System
16
• Single 8 bit or 16bit Microcontroller.
• Little hardware and software complexity.
• They May even be battery operated.
• Usually “C” is used for developing these system.
• The need to limit power dissipation when system is running
continuously.
Programming tools:
Editor, Assembler and Cross Assembler
17
• Single or few 16 or 32 bit microcontrollers or Digital
Signal Processors (DSP) or Reduced Instructions
Set Computers (RISC).
• Both hardware and software complexity.
Programming tools:
RTOS, Source code Engineering Tool,
Simulator, Debugger and Integrated Development
Environment (IDE).
18
• Enormous hardware and software complexity
• Which may need scalable processor or configurable processor
and programming logic arrays.
• Constrained by the processing speed available in their
hardware units.
Programming Tools:
For these systems may not be readily available at a
reasonable cost or may not be available at all. A compiler or
retargetable compiler might have to br developed for this.
19
• A Processor is the heart of the Embedded
System.
• For an embedded system designer
knowledge of microprocessor and
microcontroller is a must.
Two Essential Units: Operations
Control Unit (CU), Fetch
Execution Unit (EU) Execute
20
1. General Purpose processor (GPP)
Microprocessor
Microcontroller
Embedded Processor
Digital signal Processor
2. Application Specific System Processor
(ASSP)
3. Multi Processor System using GPPs
21
• 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.
22
1st Generation (4 bit processors)
4004 and 4040 4 bit in early 1970 by Intel (Integrated Electronics)
2nd Generation (8 bit processors)
8008 and 8080 8 bit in 1974 Intel with +5 V Input supply 8080  8085 8 bit
3rd Generation (16 bit processors)
8086 16 bit. Same as 8086, the 8088 introduced 8088 has only 8 bit data bus
(This made it easier to interface to the common 8 bit peripheral devices
available at the time)
Followed by:
The 80186 & 80286 (16 bit processor), the 80386 & 80486 (a 32 bit processor),
leading to the Pentium range of microprocessors (64 bit processors)
available today. The 80x86 and Pentium processors have all been designed
for use in personal computer type applications and have large memory maps.
23
Intel
4004, 4040
8080, 8085
8086, 8088,
80186, 80188
80286, 80386
x86-64
Motorola
6800
6809
68000
G3, G4, G5
Zilog
Z80, Z180, eZ80
Z8, eZ8
and others
24
• 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.
25
INTEL
8031,8032,8051,8052,8751,8752
PIC
8-bit PIC16, PIC18,
16-bit DSPIC33 / PIC24,
PIC16C7x
Motorola
MC68HC11
26
MICROPROCESSOR MICROCONTROLLER
The functional blocks are ALU,
registers, timing & control units
It includes functional blocks of
microprocessors & in addition has
timer, parallel i/o, RAM, EPROM,
ADC & DAC
Bit handling instruction is less, One
or two type only
Many type of bit handling
instruction
Rapid movements of code and
data between external memory & MP
Rapid movements of code and
data within MC
It is used for designing general
purpose digital computers system
They are used for designing
application specific dedicated
systems
27
• 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.
28
29
• 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 : IIM7100, W3100A
30
• 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.
31
• 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
32
SIMULATOR
Masm
SOFTWARE
C
C++
Dot Net
COMPILER
RIDE
KEIL
33
SIMULATOR
Masm
SOFTWARE
C
C++
Dot Net
COMPILER
RIDE
KEIL
34
APPLICATIONS
35
UNIT-II
EMBEDDED NETWORKING
I/O Types and Examples
Port: A port at a device can transmit (send) or
receive through wire or wireless.
Input port: Input port means a circuit to where
bit or bits can be input (received) from an
external device, peripheral or system.
Output port: Output port means a circuit from
where bit or bits can be output (sent) to an
external device, peripheral or system.
Types of I/Os
• Serial
• Parallel
• Serial means in series of successive instants.
• Parallel means at the same instance.
• Serial
• Parallel
Serial
input
Serial
output
Parallel
input
Parallel
output
SYNCHRONOUS SERIAL-
Input Serial Port And Output Serial Port
Bi-directional Half Duplex And Full
Duplex Serial Port
EXAMPLES
• Examples of synchronous serial-
communication devices are
- SPI and high-level data link control
• Examples of asynchronous serial-
communication devices are
- RS232C and UART
Examples of Serial and parallel port IOs
Examples of Serial and parallel port IOs
Serial Communication Devices
• Serial Communication devices use one of
three modes of communication for
transmitting data frames
1) Serial synchronous 2) Isosynchronous 3)
Asynchronous
TEN WAYS OF SYNCHRONIZATION
Ten ways by which the synchronous signals with the clocking information transmit
from a master device to slave device
SERIAL RS232C Communication in
IBM PC COM Ports
UART Mode (Protocol) Asynchronous
Serial Communication
HDLC Protocol
• HDLC (High-level Data Link Control) is an
international Standard Synchronous serial
communication protocol for a data-link
network. The data, link from point to pint and
between multiple points using HDLC. HDLC is
for physical devices on a telecommunication
and computer network.
• The two formats of HDLC specifications are
standard and extended formats.
Serial Peripheral Interface (SPI) port
signal
Parallel port interfacing with LCD
Controller
Parallel port interfacing with
Touchscreen
I/O Buses
System buses are shared between the controllers and
an I/O processor and multiple controllers that have to
access the bus, but only one of them can be granted
the bus mater status at any one instance
Bus arbitration-Daisy Chain method
Bus arbitration-Independent Bus
request method
Bus arbitration-Polling Bus request
method
BUS
 The name stands for “Inter - Integrated Circuit Bus”
 A Small Area Network connecting ICs and other
electronic systems
 Originally intended for operation on one
single board / PCB
 Synchronous Serial Signal
 Two wires carry information between
a number of devices
 One wire use for the data
 One wire used for the clock
 Today, a variety of devices are available with I2C
Interfaces
 Microcontroller, EEPROM, Real-Timer, interface chips, LCD
driver, A/D converter
Interconnecting number of device circuits
• Assume flash memory, touch screen, ICs for
measuring temperatures and ICs for
measuring pressures at a number of processes
in a plant.
• ICs mutually network through a common
synchronous serial bus I 2C
• An 'Inter Integrated Circuit' (I2C) bus, a
popular bus for these circuits.
Synchronous Serial Bus Communication for
networking
• Each specific I/O synchronous serial device
may be connected to other using specific
interfaces, for example, with I/O device using
I 2C controller
• I 2C Bus communication − use of only
simplifies the number of connections and
provides a common way (protocol) of
connecting different or same type of I/O
devices using synchronous serial
communication
• Originally developed at Philips Originally
developed at Philips Semiconductors
• Synchronous Serial Communication 400 kbps
up to 2 m and 100 kbps for longer distances
• Three I 2C standards
- Industrial 100 kbps I 2C
- 100 kbps SM I2C
- 400 kbps I 2 C
I2C Bus using C Bus using serial data
line and clock
I 2C Bus
• The Bus has two lines that carry its signals—
one line is for the clock and one is for bi-
directional data.
• There is a standard protocol for the I 2C bus.
Device Addresses and Master in the
I2C bus
• Each device has a 7-bit address using which
the data transfers take place.
• Master can address 127 other slaves at an
instance.
• Master has at a processing element
functioning as bus controller or a
microcontroller with I 2C (Inter Integrated
Circuit) bus interface circuit.
Slaves and Masters in the I2C bus
• Each slave can also optionally has I 2C (Inter
Integrated Circuit) bus controller and
processing element.
• Number of masters can be connected on the
bus.
• However, at an instance, master is one, which
initiates a data transfer on SDA (serial data)
line and which transmits the SCL (serial clock)
pulses. From master, a data frame has fields
beginning from start bit
Bits as per I2C Bus Protocol
Synchronous Serial Bus Fields and its
length
• First field of 1 bit─ Start bit similar to one in an UART
• Second field of 7 bits ─ address field. It defines the
slave address, which is being sent the data frame (of
many bytes) by the master
• Third field of 1 control bit─ defines whether a read or
write cycle is in progress
• Fourth field of 1 control bit─ defines whether is the
present data is an acknowledgment (from slave)
Synchronous Serial Bus Fields and its
length
• Fifth field of 8 bits ─ I 2C device data byte
• Sixth field of 1-bit─ bit NACK (negative
acknowledgement) from the receiver. If active
then acknowledgment after a transfer is not
needed from the slave, else acknowledgement
is expected from the slave
• Seventh field of 1 bit ─ stop bit like in an UART
Disadvantage of I 2C bus
• Time taken by algorithm in the hardware that
analyzes the bits through I 2C in case the slave
hardware does not provide for the hardware
that supports it.
• Certain ICs support the protocol and certain
do not.
• Open collector drivers at the master need a
pull-up resistance of 2.2 K on each line
I2C Hardware Details
 Devices connected to the bus must have an open
drain or open collector output for serial clock and
data signal
 The device must also be able to sense the logic level
on these pins
 All devices have a common ground reference
 The serial clock and data lines are connected to
Vdd(typically +5V) through pull up resistors
 At any given moment the I2C bus is:
 Quiescent (Idle), or
 in Master transmit mode or
 in Master receive mode.
I2C Electrical Aspects
• If any single node writes a zero, the entire line is zero
•I2C devices are wire ANDed together.
Bit Transfer on the I2C Bus
 In normal data transfer, the data line only changes state
when the clock is low
SDA
SCL
Data line stable;
Data valid
Change
of data
allowed
Start and Stop Conditions
A transition of the data line while the clock line is high is
defined as either a start or a stop condition.
Both start and stop conditions are generated by the bus
master
The bus is considered busy after a start condition, until a
stop condition occurs
Start
Condition
Stop
Condition
SCL SCL
SDASDA
Introduction to
CANBUS
39
1. CANBUS Introduction
 What is CANBUS?
 Who uses CANBUS?
 CANBUS history
 CANBUS timeline
2. CANBUS Characteristics
 OSI Model
 Physical Layer
 Transmission Characteristics
3. Message Oriented Communication
4. Message Format
5. Bus Arbitration
Presentation Goals
40
CANBUS or CAN bus – Controller Area Network bus
An automotive serial bus system developed to satisfy
the following requirements:
 Network multiple microcontrollers with 1 pair of wires.
 Allow microcontrollers communicate with each other.
 High speed, real-time communication.
 Provide noise immunity in an electrically noisy environment.
 Low cost
What is CANBUS?
41
• Designed specifically for automotive applications
• Today - industrial automation / medical equipment
Who uses CANBUS?
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Automotive Medical / Industrial
Markets
CANBUS Market Distribution
42
CANBUS History
43
CANBUS Timeline
44
• CAN is a closed network
– – no need for security, sessions or logins.
– - no user interface requirements.
• Physical and Data Link layers in silicon.
CANBUS and the OSI Model
45
CANBUS Physical Layer
CAN bus network
 Physical medium – two wires terminated at both ends by resistors.
 Differential signal - better noise immunity.
 Benefits:
 Reduced weight, Reduced cost
 Fewer wires = Increased reliability
vs.
http://canbuskit.com/what.php
46
Transmission Characteristics
© esd electronics, Inc. • 525 Bernardston Road • Greenfield, MA 01301 47
Message Oriented Transmission Protocol
CAN bus © 2005 Microchip Technology Incorporated. All Rights Reserved.
48
Message Format
49
Example of Message Transaction
50
Bus Arbitration
CAN bus
© 2005 Microchip Technology Incorporated. All Rights Reserved.
51
Bus Arbitration
52
• CAN bus – Controller Area Network bus
• Primarily used for building ECU networks in
automotive applications.
• Two wires
• OSI - Physical and Data link layers
• Differential signal - noise immunity
• 1Mbit/s, 120’
• Messages contain up to 8 bytes of data
Summary
53
A “0” (low voltage) on the bus by 1 node wins over a
“1” (high voltage) on the bus.
Bus arbitration
54
Bus Arbitration Flowchart
55
56
57
58
UNIT-III
EMBEDDED FIRMWARE
DEVELOPMENT ENVIRONMENT
What is EDLC?
• Embedded Product Development Life Cycle is an
‘Analysis-Design-Implementation’ based standard
problem solving approach for Embedded Product
Development.
• In any product development application, the first
and foremost step is to figure out what product
needs to be developed (analysis), next you need
to figure out a good approach fro building it
(design) and last but not least you need to
develop it (implementation).
Why EDLC?
• EDLC is essential for understanding the scope and
complexity of the work involved in any embedded product
development.
• EDLC defines the interaction and activities among various
groups of a product development sector including project
management, system design and development (hardware,
firmware and enclosure design and development), system
testing, release management and quality assurance.
• The standards imposed by EDLC on a product development
makes the product, developer independent in terms of
standard documents and it also provides uniformity in
development approaches.
OBJECTIVES OF EDLC
• EDLC has three primary objectives, namely
- Ensure that high quality products are
delivered to end user.
- Risk minimisation and defect prevention in
product development through project
management.
- Maximise the productivity.
DIFFERENT PHASES OF EDLC
• A typical simple product contains five minimal
phases namely,
- Requirement Analysis
- Development
- Testing
- Deployment
- Maintenance
DIFFERENT PHASES OF EDLC
Where as classic embedded life cycle model contains the
following phases:
1. Need
2. Conceptualization
3. Analysis
4. Design
5. Development and Testing
6. Deployment
7. Support
8. Upgrades
9. Retirement/Disposal
Classis Embedded Product
Development Life Cycle Model
NEED
• Any Embedded product evolves as an output
of a need. The need may come from an
individual or from the public or from a
company or from an end user/client.
• Need should be articulated to initiate the
Product Development Life Cycle and based on
the need for the product, a statement of need
or concept proposal is prepared.
CONCEPT PROPOSAL
• The concept proposal must be reviewed by the
senior management and funding agency and
should get necessary approval.
• Once the proposal gets approval, it goes to a
product development team.
• The product development need can be visualized
in any one of the following three needs:
1. New or Custom Product Development
2. Product Re-engineering
3. Product Maintenance
CONCEPTUALISATION
• Conceptualization is the product concept
development phase and it begins immediately
after a concept proposal is formally approved.
• Conceptualization phase defines the scope of
the concept, performs cost benefit analysis
and feasibility study and prepares project
management and risk management plans.
Various activities involved in
Conceptualisation Phase
CONCEPTUALISATION
• The conceptualization phase involves two types of
activities:
1. Planning activity
2. Analysis and study activity
- Feasibility Study
- Cost Benefit Analysis (CBA)
- Common unit of Measurement
- Market Choice based benefit measurement
- Targeted end users
- Product Scope
- Planning Activities
- Resource Planning
- Risk Management Plans
ANALYSIS
Analysis and Documentation
• The various requirements that need to be addressed during
the requirement analysis phase for a product under
consideration are listed below:
1. Functional capabilities like performance, operational
characteristics
2. Operational and non-operational quality attributes
3. Product external interface requirement
4. Data requirements
5. User manuals
6. Operational requirements
7. Maintenance requirements
8. General assumptions
DESIGN – Various activities involved
in design phase
Preliminary Design Illustration
Detailed Design illustration
DEVELOPMENT AND TESTING
• The development activities can be partitioned
into:
1. Embedded Hardware Development
2. Embedded Firmware Development
3. Product Enclosure Development
Embedded Firmware Development
• The testing phase can be divided into
1. Unit Testing
2. Integration Testing
3. System Testing
4. User Acceptance Testing
DEPLOYMENT
• The important tasks performed during the
deployment phase are:
1. Notification of product deployment
2. Execution of training plan
3. Product installation
4. Product post implementation review
SUPPORT
• The various activities involved in the support
phase are:
1. Setup dedicated support wing
2. Identify bugs and areas of improvement
UPGRADES
RETIREMENT/DISPOSAL
• The disposition of a product is essential due to
the following reasons:
1. Rapid technology advancement
2. Increased user needs
EDLC APPROACHES
(MODELING THE EDLC)
• The term ‘Modelling’ in Embedded Product
Development Life Cycle refers to the
interconnection of various phases involved in the
development of an embedded product.
• The various approaches adopted or models used
in Modelling EDLC are described below:
1. Linear or Waterfall Model
2. Iterative/Incremental or Fountain Model
3. Prototyping/Evolutionary Model
4. Spiral Model
LINEAR OR WATERFALL MODEL
ITERATIVE/INCREMENTAL OR FOUNTAIN
MODEL
Prototyping/Evolutionary Model
Spiral Model
Hardware-Software Co-design
• Issues in Hardware Software Co-Design
- Selecting the model
- Selecting the Architecture
- Controller Architecture
- Datapath Architecture
- Finite state machine Datapath (FSMD)
- Complex Instruction Set Computing (CISC)
- Reduced Instruction Set Computing (RISC)
- Very Long Instruction Word (VLIW)
- Parallel Processing Architecture-Example 1) Single Instruction
Multiple Data (SIMD) 2) Multiple Instruction Multiple Data (MIMD)
- Selecting the Language
- Partitioning System Requirements into Hardware and Software
Computational Models in Embedded
Design
The following computational models are used in
embedded system design.
- Data flow graph model
- State machine model
- Sequential program model
- Concurrent process model
- Object oriented model
DATA FLOW GRAPH/DIAGRAM (DFG)
MODEL
CONTROL DATA FLOW GRAPH (CDFG)
STATE MACHINE MODEL
FINITE STATE MACHINE (FSM) MODEL
FSM Model for Automatic seat belt warning system
FSM Model for Timer
FSM Model for Automatic Tea/Coffee
Vending Machine
FSM Model for Coin Operated
Telephone System
Sequential Program Model For Seat
Machine Warning System
The execution of functions in a sequential
program model for the ‘Seat Belt Warning’ system
Sequential Program Model For Seat
Machine Warning System
Flowchart approach for
modelling the ‘Seat Belt
Warning’ system
explained in the FSM
modelling section
Concurrent/Communicating Process
Model
Tasks for ‘Seat Belt Warning System’
Concurrent/Communicating Process Model
Concurrent processing Program model for ‘Seat Belt Warning System’
UNIT -IV
RTOS
CONTENTS:
1. µCOS-II Introduction
2. Task Management
3. Time management
4. Memory Management
5. μC/OS-II Services
6. Scheduling
1.µCOS-II Introduction
Features
Certifiable for use in safety critical systems
99% compliant with the Motor Industry Software Reliability
Association (MISRA) C coding standards
Small footprint
Large user base
Complete with all source code.
No royalties
Description
µC/OS-II, The Real-Time Kernel, is a
 Highly portable,
 ROMable,
 Very Scalable,
 Preemptive real-time Multitasking kernel RTOS for microprocessors and microcontrollers.
µC/OS-II is provided with all source code, which is 100 percent
portable ANSI C.
Easily scaled because of the modular nature of the source code,
µC/OS-II can present a very small footprint for space-constrained
embedded designs.
µC/OS-II has been widely embraced and can be delivered as a pre-
certifiable software component for safety-critical systems. Including
following Fields:
 Avionics RTCA DO-178B
 EUROCAE ED-12B
 Medical FDA 510(k)
 Transportation
 Nuclear Systems Standard IEC 61058
 DO-178B Level A Class III Medical Devices
 SIL3/SIL4 ICE-Certified Systems.
Micrium's uC/OS-II can manage up to 255 tasks and provides the
following services:
Semaphores
Event flags
Mutual exclusion semaphores (to reduce priority inversions)
Message mailboxes
Message queues
Task management (create, delete, change priority,
suspend/resume, etc.)
Fixed sized memory block management
Time management
Timer management
2.Task Management
Task Management
 Task Feature
 Task Creation
 Task Stack & Stack Checking
 Task Deletion
 Change a Task’s Priority
 Suspend and Resume a Task
 Get Information about a Task
Task Management
Create
S
T
A
C
k
MCU
Task Feature
μC / OS-II can manage up to 64 tasks.
The four highest priority tasks and the four lowest priority tasks are
reserved for its own use. This leaves us with 56 application tasks.
The lower value of the priority, the higher priority of the task.
The task priority number also serves as the task identifier
A task, also called a thread, is a simple program that thinks it has the
CPU all to itself.
Each task is assigned a priority, its own set of CPU registers, and its
own stack area.
Process Cycle
Waiting
Ready Running
New Terminated
Scheduler Dispatch I/O or Event WaitI/O or Event Completion
Admitted
Interrupt
Exit
Task Creation
Creating an RT task, it has to get the memory without delay: This is
difficult because memory has to be allocated and a lot of data
structures, code segment must be copied/initialized.
Two Functions for Creating a Task:
 OSTaskCreate()
 OSTaskCreateExt()
Task States
Ready
Running
Waiting/blocked/suspended ...
Idling
Terminated
Ready
Blocked
Running
Preemption
Terminate
Dispatch
WaitSignal
Activate
Task Stack & Stack Checking
To create a task we have to allocate some stack in the memory.
The stack will be allocated into the memory of the processor.
After the task is created, the task has to get a stack in which it will
store its data
A stack must consist of contiguous memory locations
It is necessary to determine how much stack space a task actually
uses.
Task Deletion
Deleting a task means the task will be returned to its dormant
state and does not mean that the code for the task will be deleted.
The calling task can delete itself.
If another task tries to delete the current task, the resources are
not freed and thus are lost. So the task has to delete itself after it
uses its resources.
Task Management
Priority of the calling task or another task can be changed at run
time.
A task can suspend itself or another task, a suspended task can
resume itself.
A task can obtain information about itself or other tasks.
This information can be used to know what the task is doing at a
particular time.
Kernel:
The kernel is the part of a multitasking system responsible for the
Management of tasks (that is, for managing the CPU's time) and
Communication between tasks.
When the kernel decides to run a different task, it simply saves the
current task's context (CPU registers) onto the current task's stack,
each task is assigned its own stack area in memory.
Once this operation is performed, the new task's context is restored
from its stack area and then, execution of the new task's code is
resumed.
This process is called a context switch or a task switch.
The use of a real-time kernel will generally simplify the design of
systems by allowing the application to be divided into multiple tasks
managed by the kernel.
A kernel will add overhead to your system because it requires extra ROM
(code space), additional RAM for the kernel data structures but most
importantly, each task requires its own stack space which has a tendency to
eat up RAM quite quickly.
A kernel will also consume CPU time (typically between 2 and 5%).
Single chip microcontrollers are generally not able to run a real-time kernel
because they have very little RAM.
A kernel can allow you to make better use of your CPU by providing you
with indispensable services such as semaphore management, mailboxes,
queues, time delays, etc.
Once you design a system using a real-time kernel, you will not want to go
back to a foreground/background system.
Context Switching or Task Switching:
When a multitasking kernel decides to run a different task, it
simply saves the current task's context (CPU registers) in the
current task's context storage area – it’s stack.
Once this operation is performed, the new task's context is
restored from its storage area and then resumes execution of the
new task's code.
This process is called a context switch or a task switch.
Context switching adds overhead to the application.
The more registers a CPU has, the higher the overhead.
The time required to perform a context switch is determined by
how many registers have to be saved and restored by the CPU.
Performance of a real-time kernel should not be judged on how
many context switches the kernel is capable of doing per second.
TASK #1
Stack StackStack
TASK #nTASK #2
CPU Registers
Memory
CPU
Task Control Block Task Control Block Task Control BlockStatus
SP
Priority
Status
SP
Priority
Status
SP
Priority
SP
Context
3.Time Management
Time Management
Clock Tick: A clock tick is a periodic time source to keep track
of time delays and time outs.
Tick intervals: 10 ~ 100 ms.
The faster tick rate, the higher overhead imposed on the
system.
When ever a clock tick occurs μC/OS-II increments a 32-bit
counter
The counter starts at zero, and rolls over to 4,294,967,295
(2^32-1) ticks.
A task can be delayed and a delayed task can also be resumed
OSTimeDlyHMSM(): hours(H), minutes(M), seconds(S),
milliseconds(m)
Maximum Delay 256 hours (11days)
Example: OSTimeDlyHMSM( 0, 0, 1, 500);
OSTimeDlyResume(): Resuming a Delayed Task
System Time, OSTimeGet() and OSTimeSet(): 32-bit counter
4.Memory Management
Memory Management
Fixed-sized memory blocks from a partition made of a contiguous
memory area.
All memory blocks are the same size and the partition contains an
integral number of blocks.
Allocation and deallocation of these memory blocks is done in
constant time and is deterministic.
Each memory partition consists of several fixed-sized memory blocks.
A task obtains memory blocks from the memory partition.
A task must create a memory partition before it can be used.
Multiple memory partitions can exist, so a task can obtain memory
blocks of different sizes
A specific memory block should be returned to its memory partition
from which it came
3KB
A
(1KB)
B
(1KB)
C
(1KB)
1KB
B
(1KB)
1KB
Memory Blocks:
Memory Management
OSMemGet():
Get a memory block from one of the created memory partitions
OSMemPut():
Returning a Memory Block to the appropriate partition
OSMemQuery():
Obtaining status of a Memory partition
5.µC/OS-II Services
Inter Task Communication
It is sometimes necessary for a task or an ISR to communicate
information to another task. This information transfer is called intertask
communication.
Information may be communicated between tasks in two ways:
Through global data
By sending messages.
When using global variables, each task or ISR must ensure that it has
exclusive access to the variables.
If an ISR is involved, the only way to ensure exclusive access to the
common variables is to disable interrupts.
Note that a task can only communicate information to an ISR by using
global variables.
A task is not aware when a global variable is changed by an ISR unless
the ISR signals the task by using a semaphore or by having the task
regularly poll the contents of the variable.
If two tasks are sharing data each can gain exclusive access to the
variables by using either disabling/enabling interrupts or through a
semaphore.
To correct this situation, we should consider using either a Message
Mailbox or a Message Queue.
Inter-Task or Inter Process Communication in μC/OS takes place
using
Semaphores
Message Mailbox
Message Queues
Tasks and Interrupt service routines (ISR) can interact with each
other through an ECB (Event Control Block)
Single Task Waiting:
ISR TaskECB
Signal
(1)
Timeout
(3)
Wait
(2)
TaskECB
Signal
(1)
Timeout
(3)
WaitTask
(2)
A
Multiple Tasks Waiting and Signaling:
ISR TaskSignal Wait
Task
ECB
Wait
Task
B
Signal
Tasks can wait and signal along with an optional time out:
C
Task Wait/
Signal
Task
ECB
Timeout
Timeout
Wait/
Signal
Semaphore:
A semaphore is a protocol mechanism used to control access to a
shared resource (Mutual Exclusion), signal the occurrence of an
event or allow two tasks to synchronize their activities.
A semaphore is basically a key that your code acquires in order to
continue execution.
If the semaphore is already in use, the requesting task is suspended
until the semaphore is released by its current owner.
A suspended task consumes little or no CPU time.
16-bit unsigned integer used to hold the semaphore count (0 to
65535) a list of tasks waiting for the semaphore count to be greater
than 0.
 µC/OS-II provides five services to semaphores
OSSemCreate()
OSSemPend()
OSSemPost()
OSSemAccept()
OSSemQuery()
Task
ISR
TaskOR
N
OSSemPost()
OSSemAccept()
OSSemPost()
OSSemCreate()
OSSemPend()
OSSemAccept()
OSSemQuery()
N
Message Mailboxes:
Messages can be sent to a task through kernel services. A
Message Mailbox also called a message exchange is typically a
pointer size variable.
Through a service provided by the kernel, a task or an ISR can
deposit a message (the pointer) into this mailbox.
Similarly, one or more tasks can receive messages through a
service provided by the kernel.
Both the sending task and receiving task will agree as to what the
pointer is actually pointing to.
A Message Mailbox is a uC/OS-II object that allows a task or an
ISR to send a pointer sized variable to another task.
 µC/OS-II provides five services to mailboxes:
OSMboxCreate()
OSMboxPend()
OSMboxPost()
OSMboxAccept()
OSMboxQuery()
Task
Task
ISR
OSMboxPost()
OSMboxAccept()
Mail Box
Message
OSMboxPost()
OSMboxPend()
OSMboxAccept()
OSMboxQuery()
OSMboxCreate()
Message Queues:
A Message Queue is used to send one or more messages to a task. A
message queue is basically an Array of Mailboxes.
Through a service provided by the kernel, a task or an ISR can
deposit a message (the pointer) into a message queue.
Both the sending task and receiving task will agree as to what the
pointer is actually pointing to.
Generally the first message inserted in the queue will be the first
message extracted from the queue (FIFO).
In addition to extract messages in a FIFO fashion, μC/OS-II allows a
task to get messages Last-In-First-Out (LIFO).
A message queue is a µC/OS-II object that allows a task or an ISR to
send pointer sized variables to another task.
µC/OS-II provides seven services to Queues:
OSQCreate()
OSQPend()
OSQPost()
OSQPostFront()
OSQAccept()
OSQFlush()
OSQQuery()
Task
Task
ISR
N
OSQPost()
OSQPostFront()
OSQFlush()
OSQAccept()
Queue
Message
OSQPend()
OSQAccept()
OSQQuery()
OSQPost()
OSQPostFront()
OSQFlush()
OSQCreate()
μC/OS-II Message-Queues Organized as Circular Buffers:
.OSQSize
(3)
Pointer to Message
OSQIn
(1)
.OSQOut
(2)
.OSQOut
(2)
.OSQEntries
(3)
.OSQEnd
(5)
.OSQStart
(5)
6.Scheduling
SCHEDULING
The scheduler also called the dispatcher. It's is the part of the kernel
responsible for determining which task will run next.
Most of the real-time kernels are priority based. Each task is assigned a
priority based on its importance.
The priority for each task is application specific.
In a priority-based kernel, control of the CPU will always be given to
the highest priority task ready-to-run.
When the highest-priority task gets the CPU, however, is determined
by the type of kernel used.
There are two types of priority-based kernels: Non-Preemptive and
Preemptive.
Scheduler is responsible for time-sharing of CPU among tasks.
A variety of scheduling algorithms have been explored and
implemented.
The general trade-off the simplicity and the optimality.
Challenges for an RTOS Different performance criteria.
GPOS: Maximum average throughput.
RTOS: Deterministic behavior (also small memory usage, low power consumption).
A Theoretically optimal schedule does not exist.
Hard to get complete knowledge – task requirements and hard properties.
The requirements can be dynamic (i.e., Time varying) – adaptive scheduling.
Non Real - Time Systems usually use Non-Preemptive Scheduling
Once a task starts executing, it completes its full execution
Most RTOS perform priority-based preemptive task scheduling.
Basic rules for priority based preemptive task scheduling
The Highest Priority Task that is Ready to Run, will be the Task
that Must be Running.
Priority based Preemptive Task Scheduling:
Every Task in a software application is assigned a priority.
Higher Priority = Higher Need for Quick Response.
Follows nested preemption.
Static Priority:
A task is given a priority at the time it is created, and it keeps this priority during
the whole lifetime.
The scheduler is very simple, because it looks at all wait queues at each priority
level, and starts the task with the highest priority to run.
Dynamic Priority:
The scheduler becomes more complex because it has to calculate task’s priority
on-line, based on dynamically changing parameters.
Earliest-deadline-first (EDF) --- A task with a closer deadline gets a higher
scheduling priority.
Rate-monotonic scheduling
A task gets a higher priority if it has to run more frequently.
This is a common approach in case that all tasks are periodic. So, a task that has to run every n
milliseconds gets a higher priority than a task that runs every m milliseconds when n<m.
Nested Preemption
Timeline for Priority-based Preemptive Scheduling
RT
OS
RT
OS
RT
OS
RT
OS
High-Priority Task
Mid-Priority Task Mid-Priority Task
Low-Priority Task
Trigger_1
Trigger_2
Time
Low-Priority Task
Task Switch
Each time the priority-based preemptive scheduler is alerted by an
External world trigger / Software trigger it shall go through the
following steps that constitute a Task Switch:
Determine whether the currently running task should continue to run.
Determine which task should run next.
Save the environment of the task that was stopped (so it can
continue later).
Set up the running environment of the task that will run next.
Allow the selected task to run.
A Non Real time operating system might do task switching only at
timer tick times.
Even with preemptive schedulers a large array of tasks is searched
before a task switch.
A Real time OS shall use Incrementally arranged tables to save on
time
Number of Tasks that can be Scheduled
Using Real Time
Operating System
Task
Switching
Time
General-Computing
Non-Real-Time
Operating System
Task Switch Timing :
Schedulability:
A schedule is an ordered list of tasks (to be executed) and a
schedule is feasible if it meets all the deadlines
A queue (or set) of tasks is schedulable if there exists a schedule
such that no task may fail to meet its deadline
Running
New Tasks
Scheduling
Dispatching
Termination
Preemption
UNIT V
EMBEDDED SYSTEM APPLICATION
DEVELOPMENT
CASE STUDY-WASHING MACHINE
CASE STUDY-AUTOMOTIVE EMBEDDED
SYSTEMS
Model for an adaptive control
algorithm adapts and functions
ACC SYSTEM Cycle of Actions and
Synchronizing cycle of different units
BLOCK DIAGRAM OF UNITS OF ACC
SYSTEM
ACC HARDWARE ARCHITECTURE
CASE STUDY – SMART CARD
TASK-CARD COMMUNICATION – CLASS
DIAGRAM
SMART-CARD TASKS AND THEIR
SYNCHRONIZATION MODEL
CASE STUDY – ACVM-CHOCOLATE
VENDING MACHINE-BLOCK DIAGRAM
BASIC SYSTEMS - ACVM
PORTS OF ACVM
ACVM HARDWARE ARCHITECTURE
BLOCK DIAGRAM OF ACVM
HARDWARE INCLUDING
MICROCONTROLLER
ACVM-SOFTWARE ARCHITECTURE
EE6602-EMBEDDED SYSTEMS – TWO MARKS WITH
ANSWERS
UNIT-I
1. List out the changes in building an embedded
system.
a) Amount and type of Hardware needed
b) Clock Rate Reduction
c) Voltage Reduction
d) Process deadlines
e) Flexibility and upgrade ability
f) Wait, stop and cache disable instructions
g) Minimizing the power consumption
2. What is the need of Watch dog timer?
Watch dog timer is a timer device that can be set
for a preset time interval and an event must occur
during that interval else the device will generate
the timeout signal. It resets the processor in case
the program gets stuck for an unexpected length
of time.
3. What are the steps involved in build process?
Building Embedded systems can be focused into
technical perspective such as
a) Software perspective
b) Hardware perspective
4. Mention the classifications of Embedded
Systems.
Embedded systems can be classified into three
types such as
a) Small scale Embedded systems
b) Medium scale Embedded systems
c) Sophisticated Embedded systems
5. Define Embedded system.
A system that has embedded software in a
computer Hardware that makes it a system
dedicated for an application or a specific part of
an application or product or a part of a larger
system.
6. Define Real Time Clock.
Real time clock is a clock that causes occurrences
of regular interval interrupts on its each tick
(timeout). An interrupt service routine executes
on each timeout (overflow) of this clock. The
RTC is used in system to save the current time
and date. The RTC is also used in a system to
initiate return of control of the system after the
preset system clock periods.
7. Define Counting Device.
A counting device is a device that counts the
input for events that may occur at irregular or
regular intervals. The count gives the number of
input events or pulses since it was last read.
8. Define In Circuit Emulator.
In circuit emulators are Hardware tools that both
provide that visibility and behave the same as the
component being emulated. In circuit emulator
which is emulating the microprocessor. It used to
debug the software of an embedded system. It
operates by using a processor with the additional
ability to support debugging operations as well as
to carry out the main function of the system.
9. What are the three modes are usually supported
in DMA operations?
a) Single transfer at a time and then release of
the hold on the system bus.
b) Burst transfer at a time and then release of
the hold on the system bus.
c) Bulk transfer and then release of the hold on
the system bus after the transfer is
completed.
10. Define Cross Compiler.
A cross compiler is a kind of a compiler that runs
on one type of machine but generates code for
another machine. After compilation the
executable code is downloaded to the embedded
system by a serial link or perhaps burned in a
PROM and plugged in.
Extra Questions: 1) Draw the Components of an
Embedded System Hardware.
2) Mention the applications of different
classifications of embedded system.
UNIT-II
1. How SPI is differed from other serial interfaces?
a) It is faster than asynchronous serial.
b) The receive hardware can be a simple shift
register.
c) It supports multiple slaves.
2. What is the need for device driver?
A device driver is a particular form of software
application that is designed to enable interaction
with hardware devices. Without the required
device driver, the corresponding hardware device
fails to work. The main purpose of a device
driver is to instruct a computer on how to
communicate with the input/output device by
translating the operating systems I/O instructions
into a language that a device can understand.
3. Mention the features of CAN and SPI serial
interfaces.
Features of CAN: a) It has a BIU b) It has three
standards – 33 kbps CAN, 110kbps Fault
tolerance CAN, 1 Mbps High Speed CAN c) It
has a serial line, which is bidirectional.
Features of SPI: a) 16 bit shift registers b) Slave
in, master out I/O pin c) Slave out, master in I/O
pin c) DMA support d) Upto 66 MHZ operation
4. Write the generic functions of device drivers.
The generic functions used for the commands to
the device are device create (), open(), connect(),
bind(), read(), write(), ioctl().
5. What are handshaking signals?
Handshaking signals are used to exchange before
storing the bits at the port buffer or before
accepting the bits from the port buffer or the
signals to setup or terminate the communication
between two source and destination.
6. Define UART.
UART is a standard Asynchronous serial input
and output port for serial bits. UART usually
sends a byte in 10-bits format or 11 bits format.
The 10 bits format is used when a start bit
preceded the 8 bit message and stop bit succeeds
the message. An 11 bit format is used when a
special bit also precedes the stop bit.
7. Define bus arbitration.
Bus arbitration is a process when multiple
controller or processors attempt to transmit and
access the bus at the same instant, but only one
transmitter is allowed to transmit and access at
that instant.
8. What is half duplex and full duplex?
Half duplex: It is a serial port having one
common I/O line or channel. For example, in a
telephone line, message flows one way at an
instance.
Full duplex: It is a serial port having two distinct
I/O lines or communication channels. For
example, a modem connection to the computer
COM port. There are two lines TxD and RxD at 9
pins or 25 pins connector. Message flows both
ways at an instance.
9. What is meant by bus master?
Bus master is a processor, device or system
which synchronously or asynchronously controls
the input and outputs to the bus at selected
instants.
10. What is COM port?
It is a port at the computer where a mouse,
modem, serial printer or mobile serial printer or
mobile smart phone cradle connects for serial
I/Os in UART mode and there are handshaking
signals for exchange of signals before UART
mode communication.
Extra Questions: 1) Mention the disadvantages of I2
C
Bus.
2) Mention the disadvantages of SPI
interface.
3) Draw the Asynchronous Serial input
RxD at UART COM port.
4) Draw the bit formats of UART
protocol
UNIT-III
1. What is State Machine model?
The State Machine model is used for modeling
reactive or event driven embedded systems
whose processing behavior are dependent on state
transitions.
2. Write about the process involved in co design.
Hardware software co-design is the modem
approach for interactive together design of
hardware and firmware for embedded systems.
The fundamental issues of co-design are selecting
the model, selecting the architecture, selecting the
language and partitioning system requirements
into hardware and software.
3. Mention different models used for the
development of an embedded system.
a) Linear or waterfall model
b) Iterative or Incremental or fountain model
c) Prototyping model
d) Spiral model
4. What is EDLC and write the objectives of
EDLC?
Embedded Product Development Life Cycle
(EDLC) is an Analysis Design Implementation
based standard problem solving approach for
Embedded Product Development.
EDLC has three primary objectives, namely a)
Ensure that high quality products are delivered to
end user b) Risk minimization and defect
prevention in product development through
project management c) Maximize the
productivity.
5. What are the different phases of EDLC?
EDLC has following different phases, Need,
Conceptualization, Analysis, Design,
Development and Testing, Deployment, Support,
Upgrades and Retirement or disposal.
6. What is VLIW?
Very Long Instruction Word (VLIW) architecture
implements multiple functional units in the
datapath. The VLIW instruction packages one
standard instruction per functional unit of the
datapath.
7. What is SIMD architecture?
In Single Instruction Multiple Data (SIMD)
architecture a single instruction is executed in
parallel with the help of the processing elements.
The scheduling of the instruction execution and
controlling of each processing elements is
performed through a single controller. It forms
the basis of Re-configurable processor.
8. What is MIMD architecture?
The processing elements of the Multiple
Instruction Multiple Data (MIMD) architecture
execute different instructions at a given point of
time. It forms the basis of multiprocessor
systems. The processing elements in a
multiprocessor system communicate through
mechanisms like shared memory and message
passing.
9. What is controller architecture?
The controller architecture implements the finite
state machine model using a state register and
two combinational circuits. The state register
holds the present state and combinational circuits
implement the logic for next state and output.
10. What is parallel processing architecture?
Parallel processing architecture implements
multiple concurrent processing elements (PEs)
and each processing element may associate a
datapath containing register and local memory.
Example: Single Instruction Multiple Data
(SIMD), Multiple Instruction Multiple Data
(MIMD)
Extra Questions: 1) What is RISC?
2) What is SISC?
3) What is Datapath Architecture?
4) What is DFG model?
5) Define object oriented model.
UNIT IV
1. Define thread and process.
Thread: Thread is a single unit of execution and
is part of process. A thread does not have its own
data memory and heap memory. A thread cannot
live independently, it lives within the process.
Threads are very inexpensive to create.
Process: Process is a program in execution and
contains one or more threads. Process has its own
code memory, data memory and stack memory. A
process contains at least one thread. Processes are
very expensive to create, involved many OS
overhead.
2. What is multiprocessing and multitasking
system?
Multiprocessing systems contain multiple CPUs
and are capable of executing multiple processes
simultaneously.
Multitasking is the ability of an operating system
to hold multiple processes in memory and switch
the processor from executing one process to
another process.
3. What is semaphore? Where it is used?
Semaphore is a sleep and wakeup based mutual
exclusion implementation for shared resource
access. Semaphore is a system resource and the
process which wants to access the shared
resource can first acquire this system object to
indicate the other processes which wants the
shared resources that the shared resource is
currently acquired by it.
4. Compare preemptive and non-preemptive
scheduling.
Preemptive scheduling: It is a multitasking model
in which a currently running task/process is
preempted to execute another task / process.
Non-preemptive scheduling: It is a multitasking
model in which a task gets a chance to execute
when the currently executing task relinquished
the CPU or when it enters a wait state.
5. What are functions of RTOS?
RTOS can perform the following functions:
a) Determines which execution entities in the
application should control the CPU, in what
order and how much time is allowed for each
before giving up processor control.
b) Handles input and output to and from
attached hardware devices.
c) Manages the sharing of internal memory
among multiple tasks.
d) Sends messages about the status of operation
and any errors that may have occurred.
6. What is IPC?
The mechanism through which processes/tasks
communicate each other is known as Inter
Process/Task Communication (IPC). Inter
process communication is essential for process
co-ordination.
7. What is Mutex?
Mutex is the binary semaphore implementation
for exclusive resource access under certain OD
kernel.
8. What is deadlock? What are the different
conditions favouring deadlock?
Deadlock is a situation where none of the
processes are able to make any progress in their
execution. Deadlock is the condition in which a
process is waiting for a resource held by another
process which is waiting for a resource held by
the first process. The different conditions
favouring a deadlock situation are a) Mutual
exclusion b) Hold and wait c) No resource
preemption d) Circular wait.
9. What is context switching?
Whenever a CPU switching happens, the current
context of execution should be saved to retrieve it
at a later point of time when CPU executes the
process, which is interrupted currently due to
execution switching. The context saving and
retrieval is essential for resuming a process
exactly from the point where it was interrupted
due to CPU switching. The act of switching CPU
among the processes or changing the current
execution is known as context switching.
10. What are Hard real time systems?
Hard Real Time means strict adherence to each
task schedule. A hard real time system must meet
the deadlines for a task without any slippage.
Missing any deadline may produce catastrophic
results for head real time systems, including
permanent data lose and irrecoverable damages to
the system/users. Example: Air traffic control,
Nuclear power plant control, Anti-lock Brake
systems of vehicles etc.,
11. What are Soft real time systems?
Soft Real Time Systems does not guarantee
meeting deadlines, but offer the best effort to
meet the deadline. Missing deadlines for tasks are
acceptable for a soft real time system if the
frequency of deadline missing is within the
compliance limit of the quality of service.
Example: Telecom, Networks, Web services,
ATM etc.,
Extra Questions: 1) What is task scheduling in the
operating system context?
2) What are the characteristics of
RTOS?
3) What is priority inversion and
priority inheritance?
4) Define throughput.
5) What are the different states of Task
and process?
UNIT V
1. Define MUCOS.
MUCOS is a portable, ROMable, scalable,
preemptive, Real Time and Multitasking Kernel.
It is used in over thousands of applications,
including automotive, avionics, consumer
electronics, medical devices, military aerospace,
networking, system-on-chip development.
2. What is OEM?
OEM is a Original Equipment Manufacturer is a
company that makes a part or subsystem that is
used in another company’s end product. For
example, if ACME Manufacturing Company
makes power chords that are used on IBM
computers, ACME is an OEM.
3. List some applications Embedded systems.
a) Automotive chocolate vending machine b)
Washing or cooking system c) Computer
networking systems d) Banking systems like
Bank ATM, e) Entertainment systems like
video game f) Security products and high
speed Network security.
4. What are the events involved in smart card
systems?
a) On power up by radiation powered charge
pump supply of the card, a signal to start the
system boot program at reset task.
b) Card start request Header message to task-
Read port from reset task.
c) Host authentication request start message to
task-Read port from reset task to enable
requests for Port-IO
d) User PW verification message through Port-
IO from host.
e) Card application close request Appl Close
message to Port_IO
5. What is meant by LIN?
Local Interconnect Network (LIN) bus is a single
master multiple slave communication interface.
LIN is a low speed, single wire communication
interface with support for data rates upto 20 kbps
and is used for sensor/actuator interfacing.
6. What is MOST?
The media oriented system transport (MOST) bus
is targeted for automotive audio / video
equipment interfacing. MOST bus is a
multimedia fibre-optic point to point network
implemented in a star, ring or daisy chained
topology over optical fibres cables.
7. What are the key players of the Automotive
Embedded Market?
The key players of the automotive embedded
market can be classified into a) Silicon providers
b) Tools and platform providers c) Solution
providers.
8. What is meant by ECU? And write the
classifications of ECUs.
Automotive Embedded Systems are normally
built around Microcontrollers or DSPs or a hybrid
of the two and are generally known as Electronic
Control Units (ECUs). The various types of
ECUs can be classified into: a) High speed
Electronic Control Units (HECUs) b) Low speed
Electronic Control Units (LECUs)
9. What are the applications of MUCOS?
MUCOS is widely used in many fields such as a)
cameras b) Automotive c) Medical devices d)
Aerospace e) Networking.
10. Name some serial buses used in Automotive
communication.
The most widely used serial buses for automotive
communication are a) Controller Area Network
(CAN) b) Local Interconnect Network (LIN) c)
Media Oriented System Transport (MOST) Bus.
Extra Questions: 1) What is ACVM?
2) Define CAN.
PART B
UNIT-I
1. Draw and explain the components of Embedded
systems.
2. Explain the Build process of a embedded
systems.
3. Draw and explain the structural units of an
embedded systems.
4. Explain DMA with neat sketch.
5. Explain in detail memory management methods.
6. Explain about timer and counting devices.
7. Explain in detail about Incircuit emulator and
target hardware debugging.
UNIT-II
1. Explain in detail different Bus arbitration
methods.
2. Draw and explain Serial peripheral Interface
(SPI)
3. Draw and explain CAN protocol.
4. Explain in detail I2
C Bus.
5. Explain in detail RS 232 standard.
6. Explain the need for device drivers.
7. Explain parallel port interfacing with
UNIT-III
1. Explain the objectives of EDLC.
2. Explain in detail about different phases of EDLC.
3. Explain the different models of EDLC.
4. Explain in detail DFG and CDFG model.
5. Explain the FSM with an example. (Seat belt
warning system, automatic tea, coffee vending
machine, Coin inserted public telephone
machine)
6. Explain sequential and concurrent model.
7. Explain object oriented model.
8. Explain in detail the issues in Hardware and
software Co design.
UNIT IV
1. Explain in detail the basics of operating systems.
2. Explain in detail tasks, process and thread.
3. Explain how the interrupt routines are handled by
RTOS.
4. Explain in detail about the Inter process
communication and context switching.
5. Explain the task synchronous issues in detail.
6. Explain ‘the Dining philosopher’s problem.
7. Explain priority inversion and priority
inheritance.
UNIT V
1. With suitable diagram explain in detail about the
concept of washing machine application.
2. With suitable diagram explain in detail about the
concept of smart card application.
3. With suitable diagram explain in detail about the
concept of automotive application.
4. With suitable diagram explain in detail about the
concept of automatic chocolate vending machine
application.
EE6602 – Embedded system Possible Questions
Unit 1
1. List and explain the hardware units that must be present in the embedded systems.
2. Explain the functional building blocks of an Embedded System.
3. Sketch and explain the structural units in processor. Also what are the structural units
available in advanced processors?
4. (i) Summarize In-circuit emulator (7)
(ii) Write a short notes on Watch dog timer (6)
5. (i) Briefly explain the classifications of embedded systems with an example.(6)
(ii) Explain the various form of memories present in an embedded system (7)
6. With a neat diagram explain the working of Direct memory Access
7. Discuss in detail about the timer and counter.
8. With a neat diagram, explain the working of Direct Memory Access (DMA) and
mention the Memory Management methods
Unit 2
1. Explain in detail about SPI communication protocol and its interfacing techniques
2. Explain with all necessary sketches to enable intra communications among
peripherals using I2C bus
3. Demonstrate the signals using a transfer of bytes when using the I2C bus and also the
format of bits at the I2C bus with diagram
4. Explain the physical layer of the I2C and explain its operation with data frame
5. Draw the physical layer of CAN and explain its operation with data frame
6. (i) Compare the RS232C and RS485 serial interface (8)
(ii) Compare the advantages and disadvantages of data transfer using serial and
parallel port devices (8)
7. Explain the working principle of RS 232 serial communication standard in detail.
8. Why we need device driver? How do you write a device driver? List the steps
involved in writing a device driver.
Unit 3
1. Explain the different phases of embedded product development life cycle
2. Explain the following models adopted in embedded product development
a) Iterative/Incremental or Fountain model (7)
b) Prototyping/Evolutionary model (6)
3. Draw the neat sketch of Incremental model and spiral model. Also mention its
advantages and drawbacks.
4. Design a FSM model of an automotive seatbelt warning system
5. Design an automatic tea/coffee vending machine based on FSM model
6. What is meant for hardware software co-design? Explain in detail about the
fundamental issues involved in it.
7. Explain how the embedded system is designed by using sequential program model
and concurrent process model with suitable example
Unit 4
1. What is the structure of a real time operating system? Explain in detail about the
Kernel, Process, and Thread and Task
2. Explain in detail about Task, Process and threads.
3. Explain the different types of preemptive and non-preemptive scheduling algorithms
with suitable examples.
4. Explain the terminologies Semaphores, Mailbox, Pipes and Shared memory in RTOS
5. What is meant by semaphore? Explain the two types of semaphore with suitable
examples
6. Define massage passing. Explain different massage passing technique in embedded
system
7. Explain priority inversion and priority inheritance in detail
8. Explain how the interrupt routines are handled by RTOS and illustrate the features of
VX Works
Unit 5
1. With suitable diagram explain in detail about the concept of washing machine
application
2. Elucidate the selection of processor and memory for any one embedded applications
with suitable diagram in detail
3. With suitable diagram Explain in detail about the concept of Smart card
4. Explain the following in designing Smart Card
(i) Requirements
(ii) Class diagram
(iii) Smart card hardware
(iv) Synchronization Model
Part – C
1. List the tasks involved in the adaptive cruise control in an automobile system. And
explain the inter process communication functions required and their uses in ACC.
2. Explain the various steps involved in design automotive application
3. Explain with a block diagram the ECUs in Present day automobiles
4. Three process with a process IDs P1,P2,P3 with estimated completion time 10,5,7
millisecond respectively enters the ready queue together .A new process P4 with
estimated completion time 2ms enters the ready queue after 2ms.Assume all the
process contain only CPU operation and no I/O operation are involved .Calculate and
compare the waiting time and Turn Around Time (TAT) for each process and the
average waiting time and Turn Around Time in SJF algorithm using Non-Preemptive
and Preemptive Scheduling
5. (i) Three process with a process IDs P1,P2,P3 with estimated completion time 6,4,2
millisecond respectively enters the ready queue together in the order P1,P2,P3.
Calculate the waiting time and Turn Around Time (TAT) for each process and the
average waiting time and Turn Around Time (Assume there is no I/O waiting for the
process ) in RR algorithm with time slice = 2ms.
(ii) The processes with process IDs P1, P2, P3 with estimated completion times 10,2 ,6
milliseconds respectively enters the ready queue together. Calculate the waiting time
and turnaround time (TAT) for each process and average waiting time and average TAT
in FIFO algorithm.
6. Explain the finite state machine model for Public operated telephone System
Part A
Unit 1
1. What are the types of embedded systems?
2. Illustrate the steps involved in build process
3. What is real time system?
4. Differentiate hard and soft real time systems.
5. Define embedded system.
6. List out the challenges in building an embedded system
7. What is need of DMA?
8. What is real time clock?
9. What is the need of watch dog timer?
10. What is timing device?
Unit 2
1. What is MOSI & MISO?
2. Mention the features of CAN and SPI interfaces
3. List the features of CAN
4. Define UART
5. What is half and full duplex?
6. What is a handshaking signal?
7. What is the use of NACK Signal?
8. Draw the data framework of I2C
9. List out the standards for I2C bus with its different speed levels.
10. What are the advantages of RS 485 than RS 422?
Unit 3
1. What are the different phases of EDLC?
2. What is meant by cost benefit analysis?
3. Define deployment phase.
4. What are the objectives of EDLC?
5. What are the process involved in Co-design?
6. What is the difference between prototyping model and fountain model?
7. What is meant by modeling in EDLC?
8. What is the difference between Linear and fountain model?
9. Model the Control data flow graph with an example.
10. What is the difference between Linear and spiral model?
Unit 4
1. Define semaphore signaling
2. What do you understand by real time scheduling
3. Compare preemptive and non-preemptive scheduling
4. Define thread and process
5. What are the functions of RTOS
6. Name any two mailbox related functions.
7. Name any two important RTOS.
8. What is Round robin algorithm?
9. Define Turn Around Time (TAT).
10. What is deadlock? What are the different conditions favouring deadlock?
Unit 5
1. List some applications of embedded systems.
2. What are the events involved in the smart card application.
3. List the design metrics of Smart Card
4. Draw the system components in the Smart Card.
5. What are the sensors and actuators of Washing machine?
6. What is ACHVWLT in Automobiles
7. List the design metrics of ACC
8. What is meant by ACC?
9. Define ECU in CAR.

More Related Content

What's hot

Automatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos pptAutomatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos pptJOLLUSUDARSHANREDDY
 
Design of embedded systems
Design of embedded systemsDesign of embedded systems
Design of embedded systemsPradeep Kumar TS
 
Chapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificChapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificMoe Moe Myint
 
Embedded system and development
Embedded system and developmentEmbedded system and development
Embedded system and developmentRajani Bhandari
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded SystemZakaria Gomaa
 
Embedded systems notes
Embedded systems notesEmbedded systems notes
Embedded systems notesShikha Sharma
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller pptRahul Kumar
 
Quality attributes of Embedded Systems
Quality attributes of Embedded Systems Quality attributes of Embedded Systems
Quality attributes of Embedded Systems VijayKumar5738
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded SystemsSandeep Reddy
 
Unit 2 processor&amp;memory-organisation
Unit 2 processor&amp;memory-organisationUnit 2 processor&amp;memory-organisation
Unit 2 processor&amp;memory-organisationPavithra S
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architectureprasadpawaskar
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design processRAMESHBABU311293
 

What's hot (20)

Automatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos pptAutomatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos ppt
 
Design of embedded systems
Design of embedded systemsDesign of embedded systems
Design of embedded systems
 
Chapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificChapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain Specific
 
Vx works RTOS
Vx works RTOSVx works RTOS
Vx works RTOS
 
Embedded system and development
Embedded system and developmentEmbedded system and development
Embedded system and development
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
 
8253ppt
8253ppt8253ppt
8253ppt
 
Embedded systems notes
Embedded systems notesEmbedded systems notes
Embedded systems notes
 
Introduction to Microcontroller
Introduction to MicrocontrollerIntroduction to Microcontroller
Introduction to Microcontroller
 
Ec8791 arm 9 processor
Ec8791 arm 9 processorEc8791 arm 9 processor
Ec8791 arm 9 processor
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
Quality attributes of Embedded Systems
Quality attributes of Embedded Systems Quality attributes of Embedded Systems
Quality attributes of Embedded Systems
 
RTOS Basic Concepts
RTOS Basic ConceptsRTOS Basic Concepts
RTOS Basic Concepts
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
Unit 2 processor&amp;memory-organisation
Unit 2 processor&amp;memory-organisationUnit 2 processor&amp;memory-organisation
Unit 2 processor&amp;memory-organisation
 
Embedded System Presentation
Embedded System PresentationEmbedded System Presentation
Embedded System Presentation
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
 

Similar to EE6602 Embedded System

Embedded basics For beginners
Embedded basics For beginnersEmbedded basics For beginners
Embedded basics For beginnersMyEducationHub
 
Embedded System Basics - Introduction.ppt
Embedded System Basics - Introduction.pptEmbedded System Basics - Introduction.ppt
Embedded System Basics - Introduction.pptalaakaraja1
 
embedded systems ppt 2
embedded systems ppt 2embedded systems ppt 2
embedded systems ppt 2pavan kumar
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scopeArshit Rai
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scopeArshit Rai
 
micro controllers 1.ppt
micro controllers 1.pptmicro controllers 1.ppt
micro controllers 1.pptsiminkhan
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training pptNishant Kayal
 
Embedded system by owais
Embedded system by owaisEmbedded system by owais
Embedded system by owaisOwais Mushtaq
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 finalKhalid Elmeadawy
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptxPratik Gohel
 
Unit 1 intro-embedded
Unit 1 intro-embeddedUnit 1 intro-embedded
Unit 1 intro-embeddedPavithra S
 
MODULE4_MES.pdf
MODULE4_MES.pdfMODULE4_MES.pdf
MODULE4_MES.pdfPoojaPK8
 
Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtechsangeetha rakhi
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
 

Similar to EE6602 Embedded System (20)

Embedded basics For beginners
Embedded basics For beginnersEmbedded basics For beginners
Embedded basics For beginners
 
Embedded System Basics - Introduction.ppt
Embedded System Basics - Introduction.pptEmbedded System Basics - Introduction.ppt
Embedded System Basics - Introduction.ppt
 
embedded systems ppt 2
embedded systems ppt 2embedded systems ppt 2
embedded systems ppt 2
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scope
 
PILOT Session for Embedded Systems
PILOT Session for Embedded Systems PILOT Session for Embedded Systems
PILOT Session for Embedded Systems
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scope
 
micro controllers 1.ppt
micro controllers 1.pptmicro controllers 1.ppt
micro controllers 1.ppt
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
 
Embedded system by owais
Embedded system by owaisEmbedded system by owais
Embedded system by owais
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 final
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Embedded system apsd
Embedded system apsdEmbedded system apsd
Embedded system apsd
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Embedded systems_upded1.ppt
Embedded systems_upded1.pptEmbedded systems_upded1.ppt
Embedded systems_upded1.ppt
 
Unit 1 intro-embedded
Unit 1 intro-embeddedUnit 1 intro-embedded
Unit 1 intro-embedded
 
MODULE4_MES.pdf
MODULE4_MES.pdfMODULE4_MES.pdf
MODULE4_MES.pdf
 
19EICN
19EICN19EICN
19EICN
 
Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtech
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 

More from rmkceteee

EE6004 FACTS
EE6004 FACTSEE6004 FACTS
EE6004 FACTSrmkceteee
 
EE6702 Protection and Switchgear
EE6702 Protection and SwitchgearEE6702 Protection and Switchgear
EE6702 Protection and Switchgearrmkceteee
 
EE8552 Power Electronics
EE8552 Power ElectronicsEE8552 Power Electronics
EE8552 Power Electronicsrmkceteee
 
EE8403 Measurements and Instrumentation
EE8403 Measurements and Instrumentation EE8403 Measurements and Instrumentation
EE8403 Measurements and Instrumentation rmkceteee
 
EE8401 Electrical machines II
EE8401 Electrical machines IIEE8401 Electrical machines II
EE8401 Electrical machines IIrmkceteee
 
IC8451 Control Systems
IC8451 Control SystemsIC8451 Control Systems
IC8451 Control Systemsrmkceteee
 
EE6601 Solid State Drives
EE6601 Solid State DrivesEE6601 Solid State Drives
EE6601 Solid State Drivesrmkceteee
 
EE6801 - Electric Energy Generation Utilisation and Conservation
EE6801 - Electric Energy Generation Utilisation and ConservationEE6801 - Electric Energy Generation Utilisation and Conservation
EE6801 - Electric Energy Generation Utilisation and Conservationrmkceteee
 
EE8451 Linear Integrated Circuits and Applications
EE8451 Linear Integrated Circuits and ApplicationsEE8451 Linear Integrated Circuits and Applications
EE8451 Linear Integrated Circuits and Applicationsrmkceteee
 

More from rmkceteee (20)

EE8501 PSA
EE8501 PSAEE8501 PSA
EE8501 PSA
 
EE 8301 EMI
EE 8301 EMIEE 8301 EMI
EE 8301 EMI
 
EE6004 FACTS
EE6004 FACTSEE6004 FACTS
EE6004 FACTS
 
MA8353 TPDE
MA8353 TPDEMA8353 TPDE
MA8353 TPDE
 
EE8591 DSP
EE8591 DSPEE8591 DSP
EE8591 DSP
 
EE6703 SEM
EE6703 SEMEE6703 SEM
EE6703 SEM
 
EE6702 Protection and Switchgear
EE6702 Protection and SwitchgearEE6702 Protection and Switchgear
EE6702 Protection and Switchgear
 
EC 8353 EDC
EC 8353 EDCEC 8353 EDC
EC 8353 EDC
 
EE8552 Power Electronics
EE8552 Power ElectronicsEE8552 Power Electronics
EE8552 Power Electronics
 
MG6851 POM
MG6851 POMMG6851 POM
MG6851 POM
 
EE8351 DLC
EE8351 DLCEE8351 DLC
EE8351 DLC
 
EE8551 MPMC
EE8551  MPMCEE8551  MPMC
EE8551 MPMC
 
EE6008 MBSD
EE6008  MBSDEE6008  MBSD
EE6008 MBSD
 
EE8391 EMT
EE8391  EMTEE8391  EMT
EE8391 EMT
 
EE8403 Measurements and Instrumentation
EE8403 Measurements and Instrumentation EE8403 Measurements and Instrumentation
EE8403 Measurements and Instrumentation
 
EE8401 Electrical machines II
EE8401 Electrical machines IIEE8401 Electrical machines II
EE8401 Electrical machines II
 
IC8451 Control Systems
IC8451 Control SystemsIC8451 Control Systems
IC8451 Control Systems
 
EE6601 Solid State Drives
EE6601 Solid State DrivesEE6601 Solid State Drives
EE6601 Solid State Drives
 
EE6801 - Electric Energy Generation Utilisation and Conservation
EE6801 - Electric Energy Generation Utilisation and ConservationEE6801 - Electric Energy Generation Utilisation and Conservation
EE6801 - Electric Energy Generation Utilisation and Conservation
 
EE8451 Linear Integrated Circuits and Applications
EE8451 Linear Integrated Circuits and ApplicationsEE8451 Linear Integrated Circuits and Applications
EE8451 Linear Integrated Circuits and Applications
 

Recently uploaded

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

EE6602 Embedded System

  • 1. EMBEDDED SYSTEMS III YEAR EEE 06TH Semester R M K COLLEGE OF ENGINEERING AND TECHNOLOGY
  • 2. EE6602 – EMBEDDED SYSTEM OBJECTIVES:  To introduce the Building Blocks of Embedded System  To Educate in Various Embedded Development Strategies  To Introduce Bus Communication in processors, Input/output interfacing.  To impart knowledge in Various processor scheduling algorithms.  To introduce Basics of Real time operating system and example tutorials to discuss on one real-time operating system tool 1
  • 3. EE6602 – EMBEDDED SYSTEM Syllabus: UNIT I INTRODUCTION TO EMBEDDED SYSTEMS Introduction to Embedded Systems – The build process for embedded systems- Structural units in Embedded processor , selection of processor & memory devices- DMA – Memory management methods- Timer and Counting devices, Watchdog Timer, Real Time Clock, In circuit emulator, Target Hardware Debugging. UNIT II EMBEDDED NETWORKING Embedded Networking: Introduction, I/O Device Ports & Buses– Serial Bus communication protocols -RS232 standard – RS422 – RS485 - CAN Bus -Serial Peripheral Interface (SPI) – Inter Integrated Circuits (I2C) –need for device drivers. 2
  • 4. EE6602 – EMBEDDED SYSTEM Syllabus: UNIT III EMBEDDED FIRMWARE DEVELOPMENT ENVIRONMENT Embedded Product Development Life Cycle- objectives, different phases of EDLC, Modelling of EDLC; issues in Hardware-software Co-design, Data Flow Graph, state machine model, Sequential Program Model, concurrent Model, object oriented Model. UNIT IV RTOS BASED EMBEDDED SYSTEM DESIGN Introduction to basic concepts of RTOS- Task, process & threads, interrupt routines in RTOS, Multiprocessing and Multitasking, Preemptive and non-reemptive scheduling, Task communication-shared memory, message passing-, Inter process Communication – synchronization between processes-semaphores, Mailbox, pipes, priority inversion, priority inheritance, comparison of Real time Operating systems: Vx Works, чC/OS-II, RT Linux. UNIT V EMBEDDED SYSTEM APPLICATION DEVELOPMENT Case Study of Washing Machine- Automotive Application- Smart card System Application. 3
  • 5. TOPICS TO BE DISCUSSED • System • Embedded System • Components • Classifications • Processors • Other Hardware • Software • Applications
  • 6. 5 What is a system? A system is a way of working, organizing or doing one or many tasks according to a fixed plan, program or set of rules. A system is also an arrangement in which all its units assemble and work together according to the plan or program.
  • 7. 6 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
  • 8. 7 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
  • 9. 8 Definition: An Embedded System is one that has computer hardware with software embedded in it as one of its important components. SOFTWARE PROGRAM #include <16f876a.h> #use delay (clock=20000000) #byte PORTB=6 main() { set_tris_b(0); portb=255; //decimal delay_ms(1000); portb=0x55; //hexadecimal delay_ms(1000); portb=0b10101010; //binary delay_ms(500); } Its software embeds in ROM (Read Only Memory). It does not need secondary memories as in a computer HARDWARE
  • 10. 9 A Microprocessor A Large Memory (Primary and Secondary) (RAM, ROM and caches) Input Units (Keyboard, Mouse, Scanner, etc.) Output Units (Monitor, printer, etc.) Networking Units (Ethernet Card, Drivers, etc.) I/O Units (Modem, Fax cum Modem, etc.)
  • 11. 10 • 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.
  • 12. 11
  • 13. 12 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.
  • 14. 13 1.Pragram is Preloaded or embedded in the ROM 2.The system functions in real time. The task execute according to priorities. 3.Dedicated set of function 4.Complex algorithm
  • 15. 14 • Real-time operation • size • cost • time • reliability • safety • energy • security
  • 16. 15 1. Small Scale Embedded System 2. Medium Scale Embedded System 3. Sophisticated Embedded System
  • 17. 16 • Single 8 bit or 16bit Microcontroller. • Little hardware and software complexity. • They May even be battery operated. • Usually “C” is used for developing these system. • The need to limit power dissipation when system is running continuously. Programming tools: Editor, Assembler and Cross Assembler
  • 18. 17 • Single or few 16 or 32 bit microcontrollers or Digital Signal Processors (DSP) or Reduced Instructions Set Computers (RISC). • Both hardware and software complexity. Programming tools: RTOS, Source code Engineering Tool, Simulator, Debugger and Integrated Development Environment (IDE).
  • 19. 18 • Enormous hardware and software complexity • Which may need scalable processor or configurable processor and programming logic arrays. • Constrained by the processing speed available in their hardware units. Programming Tools: For these systems may not be readily available at a reasonable cost or may not be available at all. A compiler or retargetable compiler might have to br developed for this.
  • 20. 19 • A Processor is the heart of the Embedded System. • For an embedded system designer knowledge of microprocessor and microcontroller is a must. Two Essential Units: Operations Control Unit (CU), Fetch Execution Unit (EU) Execute
  • 21. 20 1. General Purpose processor (GPP) Microprocessor Microcontroller Embedded Processor Digital signal Processor 2. Application Specific System Processor (ASSP) 3. Multi Processor System using GPPs
  • 22. 21 • 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.
  • 23. 22 1st Generation (4 bit processors) 4004 and 4040 4 bit in early 1970 by Intel (Integrated Electronics) 2nd Generation (8 bit processors) 8008 and 8080 8 bit in 1974 Intel with +5 V Input supply 8080  8085 8 bit 3rd Generation (16 bit processors) 8086 16 bit. Same as 8086, the 8088 introduced 8088 has only 8 bit data bus (This made it easier to interface to the common 8 bit peripheral devices available at the time) Followed by: The 80186 & 80286 (16 bit processor), the 80386 & 80486 (a 32 bit processor), leading to the Pentium range of microprocessors (64 bit processors) available today. The 80x86 and Pentium processors have all been designed for use in personal computer type applications and have large memory maps.
  • 24. 23 Intel 4004, 4040 8080, 8085 8086, 8088, 80186, 80188 80286, 80386 x86-64 Motorola 6800 6809 68000 G3, G4, G5 Zilog Z80, Z180, eZ80 Z8, eZ8 and others
  • 25. 24 • 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.
  • 26. 25 INTEL 8031,8032,8051,8052,8751,8752 PIC 8-bit PIC16, PIC18, 16-bit DSPIC33 / PIC24, PIC16C7x Motorola MC68HC11
  • 27. 26 MICROPROCESSOR MICROCONTROLLER The functional blocks are ALU, registers, timing & control units It includes functional blocks of microprocessors & in addition has timer, parallel i/o, RAM, EPROM, ADC & DAC Bit handling instruction is less, One or two type only Many type of bit handling instruction Rapid movements of code and data between external memory & MP Rapid movements of code and data within MC It is used for designing general purpose digital computers system They are used for designing application specific dedicated systems
  • 28. 27 • 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.
  • 29. 28
  • 30. 29 • 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 : IIM7100, W3100A
  • 31. 30 • 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.
  • 32. 31 • 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
  • 36. 35
  • 38. I/O Types and Examples Port: A port at a device can transmit (send) or receive through wire or wireless. Input port: Input port means a circuit to where bit or bits can be input (received) from an external device, peripheral or system. Output port: Output port means a circuit from where bit or bits can be output (sent) to an external device, peripheral or system.
  • 39. Types of I/Os • Serial • Parallel
  • 40. • Serial means in series of successive instants. • Parallel means at the same instance. • Serial • Parallel Serial input Serial output Parallel input Parallel output
  • 41. SYNCHRONOUS SERIAL- Input Serial Port And Output Serial Port
  • 42. Bi-directional Half Duplex And Full Duplex Serial Port
  • 43. EXAMPLES • Examples of synchronous serial- communication devices are - SPI and high-level data link control • Examples of asynchronous serial- communication devices are - RS232C and UART
  • 44. Examples of Serial and parallel port IOs
  • 45. Examples of Serial and parallel port IOs
  • 46. Serial Communication Devices • Serial Communication devices use one of three modes of communication for transmitting data frames 1) Serial synchronous 2) Isosynchronous 3) Asynchronous
  • 47. TEN WAYS OF SYNCHRONIZATION Ten ways by which the synchronous signals with the clocking information transmit from a master device to slave device
  • 48. SERIAL RS232C Communication in IBM PC COM Ports
  • 49. UART Mode (Protocol) Asynchronous Serial Communication
  • 50. HDLC Protocol • HDLC (High-level Data Link Control) is an international Standard Synchronous serial communication protocol for a data-link network. The data, link from point to pint and between multiple points using HDLC. HDLC is for physical devices on a telecommunication and computer network. • The two formats of HDLC specifications are standard and extended formats.
  • 51. Serial Peripheral Interface (SPI) port signal
  • 52. Parallel port interfacing with LCD Controller
  • 53. Parallel port interfacing with Touchscreen
  • 55. System buses are shared between the controllers and an I/O processor and multiple controllers that have to access the bus, but only one of them can be granted the bus mater status at any one instance
  • 58. Bus arbitration-Polling Bus request method
  • 59. BUS  The name stands for “Inter - Integrated Circuit Bus”  A Small Area Network connecting ICs and other electronic systems  Originally intended for operation on one single board / PCB  Synchronous Serial Signal  Two wires carry information between a number of devices  One wire use for the data  One wire used for the clock  Today, a variety of devices are available with I2C Interfaces  Microcontroller, EEPROM, Real-Timer, interface chips, LCD driver, A/D converter
  • 60. Interconnecting number of device circuits • Assume flash memory, touch screen, ICs for measuring temperatures and ICs for measuring pressures at a number of processes in a plant. • ICs mutually network through a common synchronous serial bus I 2C • An 'Inter Integrated Circuit' (I2C) bus, a popular bus for these circuits.
  • 61. Synchronous Serial Bus Communication for networking • Each specific I/O synchronous serial device may be connected to other using specific interfaces, for example, with I/O device using I 2C controller • I 2C Bus communication − use of only simplifies the number of connections and provides a common way (protocol) of connecting different or same type of I/O devices using synchronous serial communication
  • 62. • Originally developed at Philips Originally developed at Philips Semiconductors • Synchronous Serial Communication 400 kbps up to 2 m and 100 kbps for longer distances • Three I 2C standards - Industrial 100 kbps I 2C - 100 kbps SM I2C - 400 kbps I 2 C
  • 63. I2C Bus using C Bus using serial data line and clock
  • 64. I 2C Bus • The Bus has two lines that carry its signals— one line is for the clock and one is for bi- directional data. • There is a standard protocol for the I 2C bus.
  • 65. Device Addresses and Master in the I2C bus • Each device has a 7-bit address using which the data transfers take place. • Master can address 127 other slaves at an instance. • Master has at a processing element functioning as bus controller or a microcontroller with I 2C (Inter Integrated Circuit) bus interface circuit.
  • 66. Slaves and Masters in the I2C bus • Each slave can also optionally has I 2C (Inter Integrated Circuit) bus controller and processing element. • Number of masters can be connected on the bus. • However, at an instance, master is one, which initiates a data transfer on SDA (serial data) line and which transmits the SCL (serial clock) pulses. From master, a data frame has fields beginning from start bit
  • 67. Bits as per I2C Bus Protocol
  • 68. Synchronous Serial Bus Fields and its length • First field of 1 bit─ Start bit similar to one in an UART • Second field of 7 bits ─ address field. It defines the slave address, which is being sent the data frame (of many bytes) by the master • Third field of 1 control bit─ defines whether a read or write cycle is in progress • Fourth field of 1 control bit─ defines whether is the present data is an acknowledgment (from slave)
  • 69. Synchronous Serial Bus Fields and its length • Fifth field of 8 bits ─ I 2C device data byte • Sixth field of 1-bit─ bit NACK (negative acknowledgement) from the receiver. If active then acknowledgment after a transfer is not needed from the slave, else acknowledgement is expected from the slave • Seventh field of 1 bit ─ stop bit like in an UART
  • 70. Disadvantage of I 2C bus • Time taken by algorithm in the hardware that analyzes the bits through I 2C in case the slave hardware does not provide for the hardware that supports it. • Certain ICs support the protocol and certain do not. • Open collector drivers at the master need a pull-up resistance of 2.2 K on each line
  • 71. I2C Hardware Details  Devices connected to the bus must have an open drain or open collector output for serial clock and data signal  The device must also be able to sense the logic level on these pins  All devices have a common ground reference  The serial clock and data lines are connected to Vdd(typically +5V) through pull up resistors  At any given moment the I2C bus is:  Quiescent (Idle), or  in Master transmit mode or  in Master receive mode.
  • 72. I2C Electrical Aspects • If any single node writes a zero, the entire line is zero •I2C devices are wire ANDed together.
  • 73. Bit Transfer on the I2C Bus  In normal data transfer, the data line only changes state when the clock is low SDA SCL Data line stable; Data valid Change of data allowed
  • 74. Start and Stop Conditions A transition of the data line while the clock line is high is defined as either a start or a stop condition. Both start and stop conditions are generated by the bus master The bus is considered busy after a start condition, until a stop condition occurs Start Condition Stop Condition SCL SCL SDASDA
  • 76. 1. CANBUS Introduction  What is CANBUS?  Who uses CANBUS?  CANBUS history  CANBUS timeline 2. CANBUS Characteristics  OSI Model  Physical Layer  Transmission Characteristics 3. Message Oriented Communication 4. Message Format 5. Bus Arbitration Presentation Goals 40
  • 77. CANBUS or CAN bus – Controller Area Network bus An automotive serial bus system developed to satisfy the following requirements:  Network multiple microcontrollers with 1 pair of wires.  Allow microcontrollers communicate with each other.  High speed, real-time communication.  Provide noise immunity in an electrically noisy environment.  Low cost What is CANBUS? 41
  • 78. • Designed specifically for automotive applications • Today - industrial automation / medical equipment Who uses CANBUS? 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Automotive Medical / Industrial Markets CANBUS Market Distribution 42
  • 81. • CAN is a closed network – – no need for security, sessions or logins. – - no user interface requirements. • Physical and Data Link layers in silicon. CANBUS and the OSI Model 45
  • 82. CANBUS Physical Layer CAN bus network  Physical medium – two wires terminated at both ends by resistors.  Differential signal - better noise immunity.  Benefits:  Reduced weight, Reduced cost  Fewer wires = Increased reliability vs. http://canbuskit.com/what.php 46
  • 83. Transmission Characteristics © esd electronics, Inc. • 525 Bernardston Road • Greenfield, MA 01301 47
  • 84. Message Oriented Transmission Protocol CAN bus © 2005 Microchip Technology Incorporated. All Rights Reserved. 48
  • 86. Example of Message Transaction 50
  • 87. Bus Arbitration CAN bus © 2005 Microchip Technology Incorporated. All Rights Reserved. 51
  • 89. • CAN bus – Controller Area Network bus • Primarily used for building ECU networks in automotive applications. • Two wires • OSI - Physical and Data link layers • Differential signal - noise immunity • 1Mbit/s, 120’ • Messages contain up to 8 bytes of data Summary 53
  • 90. A “0” (low voltage) on the bus by 1 node wins over a “1” (high voltage) on the bus. Bus arbitration 54
  • 92. 56
  • 93. 57
  • 94. 58
  • 96. What is EDLC? • Embedded Product Development Life Cycle is an ‘Analysis-Design-Implementation’ based standard problem solving approach for Embedded Product Development. • In any product development application, the first and foremost step is to figure out what product needs to be developed (analysis), next you need to figure out a good approach fro building it (design) and last but not least you need to develop it (implementation).
  • 97. Why EDLC? • EDLC is essential for understanding the scope and complexity of the work involved in any embedded product development. • EDLC defines the interaction and activities among various groups of a product development sector including project management, system design and development (hardware, firmware and enclosure design and development), system testing, release management and quality assurance. • The standards imposed by EDLC on a product development makes the product, developer independent in terms of standard documents and it also provides uniformity in development approaches.
  • 98. OBJECTIVES OF EDLC • EDLC has three primary objectives, namely - Ensure that high quality products are delivered to end user. - Risk minimisation and defect prevention in product development through project management. - Maximise the productivity.
  • 99. DIFFERENT PHASES OF EDLC • A typical simple product contains five minimal phases namely, - Requirement Analysis - Development - Testing - Deployment - Maintenance
  • 100. DIFFERENT PHASES OF EDLC Where as classic embedded life cycle model contains the following phases: 1. Need 2. Conceptualization 3. Analysis 4. Design 5. Development and Testing 6. Deployment 7. Support 8. Upgrades 9. Retirement/Disposal
  • 102. NEED • Any Embedded product evolves as an output of a need. The need may come from an individual or from the public or from a company or from an end user/client. • Need should be articulated to initiate the Product Development Life Cycle and based on the need for the product, a statement of need or concept proposal is prepared.
  • 103. CONCEPT PROPOSAL • The concept proposal must be reviewed by the senior management and funding agency and should get necessary approval. • Once the proposal gets approval, it goes to a product development team. • The product development need can be visualized in any one of the following three needs: 1. New or Custom Product Development 2. Product Re-engineering 3. Product Maintenance
  • 104. CONCEPTUALISATION • Conceptualization is the product concept development phase and it begins immediately after a concept proposal is formally approved. • Conceptualization phase defines the scope of the concept, performs cost benefit analysis and feasibility study and prepares project management and risk management plans.
  • 105. Various activities involved in Conceptualisation Phase
  • 106. CONCEPTUALISATION • The conceptualization phase involves two types of activities: 1. Planning activity 2. Analysis and study activity - Feasibility Study - Cost Benefit Analysis (CBA) - Common unit of Measurement - Market Choice based benefit measurement - Targeted end users - Product Scope - Planning Activities - Resource Planning - Risk Management Plans
  • 108. Analysis and Documentation • The various requirements that need to be addressed during the requirement analysis phase for a product under consideration are listed below: 1. Functional capabilities like performance, operational characteristics 2. Operational and non-operational quality attributes 3. Product external interface requirement 4. Data requirements 5. User manuals 6. Operational requirements 7. Maintenance requirements 8. General assumptions
  • 109. DESIGN – Various activities involved in design phase
  • 112. DEVELOPMENT AND TESTING • The development activities can be partitioned into: 1. Embedded Hardware Development 2. Embedded Firmware Development 3. Product Enclosure Development
  • 113. Embedded Firmware Development • The testing phase can be divided into 1. Unit Testing 2. Integration Testing 3. System Testing 4. User Acceptance Testing
  • 114. DEPLOYMENT • The important tasks performed during the deployment phase are: 1. Notification of product deployment 2. Execution of training plan 3. Product installation 4. Product post implementation review
  • 115. SUPPORT • The various activities involved in the support phase are: 1. Setup dedicated support wing 2. Identify bugs and areas of improvement
  • 117. RETIREMENT/DISPOSAL • The disposition of a product is essential due to the following reasons: 1. Rapid technology advancement 2. Increased user needs
  • 118. EDLC APPROACHES (MODELING THE EDLC) • The term ‘Modelling’ in Embedded Product Development Life Cycle refers to the interconnection of various phases involved in the development of an embedded product. • The various approaches adopted or models used in Modelling EDLC are described below: 1. Linear or Waterfall Model 2. Iterative/Incremental or Fountain Model 3. Prototyping/Evolutionary Model 4. Spiral Model
  • 123. Hardware-Software Co-design • Issues in Hardware Software Co-Design - Selecting the model - Selecting the Architecture - Controller Architecture - Datapath Architecture - Finite state machine Datapath (FSMD) - Complex Instruction Set Computing (CISC) - Reduced Instruction Set Computing (RISC) - Very Long Instruction Word (VLIW) - Parallel Processing Architecture-Example 1) Single Instruction Multiple Data (SIMD) 2) Multiple Instruction Multiple Data (MIMD) - Selecting the Language - Partitioning System Requirements into Hardware and Software
  • 124. Computational Models in Embedded Design The following computational models are used in embedded system design. - Data flow graph model - State machine model - Sequential program model - Concurrent process model - Object oriented model
  • 125. DATA FLOW GRAPH/DIAGRAM (DFG) MODEL
  • 126. CONTROL DATA FLOW GRAPH (CDFG)
  • 127. STATE MACHINE MODEL FINITE STATE MACHINE (FSM) MODEL FSM Model for Automatic seat belt warning system
  • 128. FSM Model for Timer
  • 129. FSM Model for Automatic Tea/Coffee Vending Machine
  • 130. FSM Model for Coin Operated Telephone System
  • 131. Sequential Program Model For Seat Machine Warning System The execution of functions in a sequential program model for the ‘Seat Belt Warning’ system
  • 132. Sequential Program Model For Seat Machine Warning System Flowchart approach for modelling the ‘Seat Belt Warning’ system explained in the FSM modelling section
  • 133. Concurrent/Communicating Process Model Tasks for ‘Seat Belt Warning System’
  • 134. Concurrent/Communicating Process Model Concurrent processing Program model for ‘Seat Belt Warning System’
  • 136. CONTENTS: 1. µCOS-II Introduction 2. Task Management 3. Time management 4. Memory Management 5. μC/OS-II Services 6. Scheduling
  • 138. Features Certifiable for use in safety critical systems 99% compliant with the Motor Industry Software Reliability Association (MISRA) C coding standards Small footprint Large user base Complete with all source code. No royalties
  • 139. Description µC/OS-II, The Real-Time Kernel, is a  Highly portable,  ROMable,  Very Scalable,  Preemptive real-time Multitasking kernel RTOS for microprocessors and microcontrollers. µC/OS-II is provided with all source code, which is 100 percent portable ANSI C. Easily scaled because of the modular nature of the source code, µC/OS-II can present a very small footprint for space-constrained embedded designs.
  • 140. µC/OS-II has been widely embraced and can be delivered as a pre- certifiable software component for safety-critical systems. Including following Fields:  Avionics RTCA DO-178B  EUROCAE ED-12B  Medical FDA 510(k)  Transportation  Nuclear Systems Standard IEC 61058  DO-178B Level A Class III Medical Devices  SIL3/SIL4 ICE-Certified Systems.
  • 141. Micrium's uC/OS-II can manage up to 255 tasks and provides the following services: Semaphores Event flags Mutual exclusion semaphores (to reduce priority inversions) Message mailboxes Message queues Task management (create, delete, change priority, suspend/resume, etc.) Fixed sized memory block management Time management Timer management
  • 143. Task Management  Task Feature  Task Creation  Task Stack & Stack Checking  Task Deletion  Change a Task’s Priority  Suspend and Resume a Task  Get Information about a Task
  • 145. Task Feature μC / OS-II can manage up to 64 tasks. The four highest priority tasks and the four lowest priority tasks are reserved for its own use. This leaves us with 56 application tasks. The lower value of the priority, the higher priority of the task. The task priority number also serves as the task identifier A task, also called a thread, is a simple program that thinks it has the CPU all to itself. Each task is assigned a priority, its own set of CPU registers, and its own stack area.
  • 146. Process Cycle Waiting Ready Running New Terminated Scheduler Dispatch I/O or Event WaitI/O or Event Completion Admitted Interrupt Exit
  • 147. Task Creation Creating an RT task, it has to get the memory without delay: This is difficult because memory has to be allocated and a lot of data structures, code segment must be copied/initialized. Two Functions for Creating a Task:  OSTaskCreate()  OSTaskCreateExt()
  • 149. Task Stack & Stack Checking To create a task we have to allocate some stack in the memory. The stack will be allocated into the memory of the processor. After the task is created, the task has to get a stack in which it will store its data A stack must consist of contiguous memory locations It is necessary to determine how much stack space a task actually uses.
  • 150. Task Deletion Deleting a task means the task will be returned to its dormant state and does not mean that the code for the task will be deleted. The calling task can delete itself. If another task tries to delete the current task, the resources are not freed and thus are lost. So the task has to delete itself after it uses its resources.
  • 151. Task Management Priority of the calling task or another task can be changed at run time. A task can suspend itself or another task, a suspended task can resume itself. A task can obtain information about itself or other tasks. This information can be used to know what the task is doing at a particular time.
  • 152. Kernel: The kernel is the part of a multitasking system responsible for the Management of tasks (that is, for managing the CPU's time) and Communication between tasks. When the kernel decides to run a different task, it simply saves the current task's context (CPU registers) onto the current task's stack, each task is assigned its own stack area in memory. Once this operation is performed, the new task's context is restored from its stack area and then, execution of the new task's code is resumed. This process is called a context switch or a task switch. The use of a real-time kernel will generally simplify the design of systems by allowing the application to be divided into multiple tasks managed by the kernel.
  • 153. A kernel will add overhead to your system because it requires extra ROM (code space), additional RAM for the kernel data structures but most importantly, each task requires its own stack space which has a tendency to eat up RAM quite quickly. A kernel will also consume CPU time (typically between 2 and 5%). Single chip microcontrollers are generally not able to run a real-time kernel because they have very little RAM. A kernel can allow you to make better use of your CPU by providing you with indispensable services such as semaphore management, mailboxes, queues, time delays, etc. Once you design a system using a real-time kernel, you will not want to go back to a foreground/background system.
  • 154. Context Switching or Task Switching: When a multitasking kernel decides to run a different task, it simply saves the current task's context (CPU registers) in the current task's context storage area – it’s stack. Once this operation is performed, the new task's context is restored from its storage area and then resumes execution of the new task's code. This process is called a context switch or a task switch. Context switching adds overhead to the application. The more registers a CPU has, the higher the overhead. The time required to perform a context switch is determined by how many registers have to be saved and restored by the CPU. Performance of a real-time kernel should not be judged on how many context switches the kernel is capable of doing per second.
  • 155. TASK #1 Stack StackStack TASK #nTASK #2 CPU Registers Memory CPU Task Control Block Task Control Block Task Control BlockStatus SP Priority Status SP Priority Status SP Priority SP Context
  • 157. Time Management Clock Tick: A clock tick is a periodic time source to keep track of time delays and time outs. Tick intervals: 10 ~ 100 ms. The faster tick rate, the higher overhead imposed on the system. When ever a clock tick occurs μC/OS-II increments a 32-bit counter The counter starts at zero, and rolls over to 4,294,967,295 (2^32-1) ticks. A task can be delayed and a delayed task can also be resumed
  • 158. OSTimeDlyHMSM(): hours(H), minutes(M), seconds(S), milliseconds(m) Maximum Delay 256 hours (11days) Example: OSTimeDlyHMSM( 0, 0, 1, 500); OSTimeDlyResume(): Resuming a Delayed Task System Time, OSTimeGet() and OSTimeSet(): 32-bit counter
  • 160. Memory Management Fixed-sized memory blocks from a partition made of a contiguous memory area. All memory blocks are the same size and the partition contains an integral number of blocks. Allocation and deallocation of these memory blocks is done in constant time and is deterministic. Each memory partition consists of several fixed-sized memory blocks. A task obtains memory blocks from the memory partition. A task must create a memory partition before it can be used. Multiple memory partitions can exist, so a task can obtain memory blocks of different sizes A specific memory block should be returned to its memory partition from which it came
  • 162. Memory Management OSMemGet(): Get a memory block from one of the created memory partitions OSMemPut(): Returning a Memory Block to the appropriate partition OSMemQuery(): Obtaining status of a Memory partition
  • 164. Inter Task Communication It is sometimes necessary for a task or an ISR to communicate information to another task. This information transfer is called intertask communication. Information may be communicated between tasks in two ways: Through global data By sending messages. When using global variables, each task or ISR must ensure that it has exclusive access to the variables. If an ISR is involved, the only way to ensure exclusive access to the common variables is to disable interrupts.
  • 165. Note that a task can only communicate information to an ISR by using global variables. A task is not aware when a global variable is changed by an ISR unless the ISR signals the task by using a semaphore or by having the task regularly poll the contents of the variable. If two tasks are sharing data each can gain exclusive access to the variables by using either disabling/enabling interrupts or through a semaphore. To correct this situation, we should consider using either a Message Mailbox or a Message Queue.
  • 166. Inter-Task or Inter Process Communication in μC/OS takes place using Semaphores Message Mailbox Message Queues Tasks and Interrupt service routines (ISR) can interact with each other through an ECB (Event Control Block)
  • 167. Single Task Waiting: ISR TaskECB Signal (1) Timeout (3) Wait (2) TaskECB Signal (1) Timeout (3) WaitTask (2) A
  • 168. Multiple Tasks Waiting and Signaling: ISR TaskSignal Wait Task ECB Wait Task B Signal
  • 169. Tasks can wait and signal along with an optional time out: C Task Wait/ Signal Task ECB Timeout Timeout Wait/ Signal
  • 170. Semaphore: A semaphore is a protocol mechanism used to control access to a shared resource (Mutual Exclusion), signal the occurrence of an event or allow two tasks to synchronize their activities. A semaphore is basically a key that your code acquires in order to continue execution. If the semaphore is already in use, the requesting task is suspended until the semaphore is released by its current owner. A suspended task consumes little or no CPU time. 16-bit unsigned integer used to hold the semaphore count (0 to 65535) a list of tasks waiting for the semaphore count to be greater than 0.
  • 171.  µC/OS-II provides five services to semaphores OSSemCreate() OSSemPend() OSSemPost() OSSemAccept() OSSemQuery() Task ISR TaskOR N OSSemPost() OSSemAccept() OSSemPost() OSSemCreate() OSSemPend() OSSemAccept() OSSemQuery() N
  • 172. Message Mailboxes: Messages can be sent to a task through kernel services. A Message Mailbox also called a message exchange is typically a pointer size variable. Through a service provided by the kernel, a task or an ISR can deposit a message (the pointer) into this mailbox. Similarly, one or more tasks can receive messages through a service provided by the kernel. Both the sending task and receiving task will agree as to what the pointer is actually pointing to. A Message Mailbox is a uC/OS-II object that allows a task or an ISR to send a pointer sized variable to another task.
  • 173.  µC/OS-II provides five services to mailboxes: OSMboxCreate() OSMboxPend() OSMboxPost() OSMboxAccept() OSMboxQuery() Task Task ISR OSMboxPost() OSMboxAccept() Mail Box Message OSMboxPost() OSMboxPend() OSMboxAccept() OSMboxQuery() OSMboxCreate()
  • 174. Message Queues: A Message Queue is used to send one or more messages to a task. A message queue is basically an Array of Mailboxes. Through a service provided by the kernel, a task or an ISR can deposit a message (the pointer) into a message queue. Both the sending task and receiving task will agree as to what the pointer is actually pointing to. Generally the first message inserted in the queue will be the first message extracted from the queue (FIFO). In addition to extract messages in a FIFO fashion, μC/OS-II allows a task to get messages Last-In-First-Out (LIFO).
  • 175. A message queue is a µC/OS-II object that allows a task or an ISR to send pointer sized variables to another task. µC/OS-II provides seven services to Queues: OSQCreate() OSQPend() OSQPost() OSQPostFront() OSQAccept() OSQFlush() OSQQuery() Task Task ISR N OSQPost() OSQPostFront() OSQFlush() OSQAccept() Queue Message OSQPend() OSQAccept() OSQQuery() OSQPost() OSQPostFront() OSQFlush() OSQCreate()
  • 176. μC/OS-II Message-Queues Organized as Circular Buffers: .OSQSize (3) Pointer to Message OSQIn (1) .OSQOut (2) .OSQOut (2) .OSQEntries (3) .OSQEnd (5) .OSQStart (5)
  • 178. SCHEDULING The scheduler also called the dispatcher. It's is the part of the kernel responsible for determining which task will run next. Most of the real-time kernels are priority based. Each task is assigned a priority based on its importance. The priority for each task is application specific. In a priority-based kernel, control of the CPU will always be given to the highest priority task ready-to-run. When the highest-priority task gets the CPU, however, is determined by the type of kernel used. There are two types of priority-based kernels: Non-Preemptive and Preemptive.
  • 179. Scheduler is responsible for time-sharing of CPU among tasks. A variety of scheduling algorithms have been explored and implemented. The general trade-off the simplicity and the optimality. Challenges for an RTOS Different performance criteria. GPOS: Maximum average throughput. RTOS: Deterministic behavior (also small memory usage, low power consumption). A Theoretically optimal schedule does not exist. Hard to get complete knowledge – task requirements and hard properties. The requirements can be dynamic (i.e., Time varying) – adaptive scheduling.
  • 180. Non Real - Time Systems usually use Non-Preemptive Scheduling Once a task starts executing, it completes its full execution Most RTOS perform priority-based preemptive task scheduling. Basic rules for priority based preemptive task scheduling The Highest Priority Task that is Ready to Run, will be the Task that Must be Running. Priority based Preemptive Task Scheduling: Every Task in a software application is assigned a priority. Higher Priority = Higher Need for Quick Response. Follows nested preemption.
  • 181. Static Priority: A task is given a priority at the time it is created, and it keeps this priority during the whole lifetime. The scheduler is very simple, because it looks at all wait queues at each priority level, and starts the task with the highest priority to run. Dynamic Priority: The scheduler becomes more complex because it has to calculate task’s priority on-line, based on dynamically changing parameters. Earliest-deadline-first (EDF) --- A task with a closer deadline gets a higher scheduling priority. Rate-monotonic scheduling A task gets a higher priority if it has to run more frequently. This is a common approach in case that all tasks are periodic. So, a task that has to run every n milliseconds gets a higher priority than a task that runs every m milliseconds when n<m.
  • 182. Nested Preemption Timeline for Priority-based Preemptive Scheduling RT OS RT OS RT OS RT OS High-Priority Task Mid-Priority Task Mid-Priority Task Low-Priority Task Trigger_1 Trigger_2 Time Low-Priority Task
  • 183. Task Switch Each time the priority-based preemptive scheduler is alerted by an External world trigger / Software trigger it shall go through the following steps that constitute a Task Switch: Determine whether the currently running task should continue to run. Determine which task should run next. Save the environment of the task that was stopped (so it can continue later). Set up the running environment of the task that will run next. Allow the selected task to run. A Non Real time operating system might do task switching only at timer tick times. Even with preemptive schedulers a large array of tasks is searched before a task switch. A Real time OS shall use Incrementally arranged tables to save on time
  • 184. Number of Tasks that can be Scheduled Using Real Time Operating System Task Switching Time General-Computing Non-Real-Time Operating System Task Switch Timing :
  • 185. Schedulability: A schedule is an ordered list of tasks (to be executed) and a schedule is feasible if it meets all the deadlines A queue (or set) of tasks is schedulable if there exists a schedule such that no task may fail to meet its deadline Running New Tasks Scheduling Dispatching Termination Preemption
  • 186. UNIT V EMBEDDED SYSTEM APPLICATION DEVELOPMENT
  • 189.
  • 190. Model for an adaptive control algorithm adapts and functions
  • 191. ACC SYSTEM Cycle of Actions and Synchronizing cycle of different units
  • 192. BLOCK DIAGRAM OF UNITS OF ACC SYSTEM
  • 194. CASE STUDY – SMART CARD
  • 195. TASK-CARD COMMUNICATION – CLASS DIAGRAM
  • 196. SMART-CARD TASKS AND THEIR SYNCHRONIZATION MODEL
  • 197. CASE STUDY – ACVM-CHOCOLATE VENDING MACHINE-BLOCK DIAGRAM
  • 201. BLOCK DIAGRAM OF ACVM HARDWARE INCLUDING MICROCONTROLLER
  • 203. EE6602-EMBEDDED SYSTEMS – TWO MARKS WITH ANSWERS UNIT-I 1. List out the changes in building an embedded system. a) Amount and type of Hardware needed b) Clock Rate Reduction c) Voltage Reduction d) Process deadlines e) Flexibility and upgrade ability f) Wait, stop and cache disable instructions g) Minimizing the power consumption 2. What is the need of Watch dog timer? Watch dog timer is a timer device that can be set for a preset time interval and an event must occur during that interval else the device will generate the timeout signal. It resets the processor in case the program gets stuck for an unexpected length of time. 3. What are the steps involved in build process? Building Embedded systems can be focused into technical perspective such as a) Software perspective b) Hardware perspective 4. Mention the classifications of Embedded Systems. Embedded systems can be classified into three types such as a) Small scale Embedded systems b) Medium scale Embedded systems c) Sophisticated Embedded systems 5. Define Embedded system. A system that has embedded software in a computer Hardware that makes it a system dedicated for an application or a specific part of an application or product or a part of a larger system. 6. Define Real Time Clock. Real time clock is a clock that causes occurrences of regular interval interrupts on its each tick (timeout). An interrupt service routine executes on each timeout (overflow) of this clock. The RTC is used in system to save the current time and date. The RTC is also used in a system to initiate return of control of the system after the preset system clock periods. 7. Define Counting Device. A counting device is a device that counts the input for events that may occur at irregular or regular intervals. The count gives the number of input events or pulses since it was last read. 8. Define In Circuit Emulator. In circuit emulators are Hardware tools that both provide that visibility and behave the same as the component being emulated. In circuit emulator which is emulating the microprocessor. It used to debug the software of an embedded system. It operates by using a processor with the additional ability to support debugging operations as well as to carry out the main function of the system. 9. What are the three modes are usually supported in DMA operations? a) Single transfer at a time and then release of the hold on the system bus. b) Burst transfer at a time and then release of the hold on the system bus. c) Bulk transfer and then release of the hold on the system bus after the transfer is completed. 10. Define Cross Compiler. A cross compiler is a kind of a compiler that runs on one type of machine but generates code for another machine. After compilation the executable code is downloaded to the embedded system by a serial link or perhaps burned in a PROM and plugged in. Extra Questions: 1) Draw the Components of an Embedded System Hardware. 2) Mention the applications of different classifications of embedded system. UNIT-II 1. How SPI is differed from other serial interfaces? a) It is faster than asynchronous serial. b) The receive hardware can be a simple shift register. c) It supports multiple slaves. 2. What is the need for device driver? A device driver is a particular form of software application that is designed to enable interaction with hardware devices. Without the required device driver, the corresponding hardware device fails to work. The main purpose of a device driver is to instruct a computer on how to communicate with the input/output device by translating the operating systems I/O instructions into a language that a device can understand. 3. Mention the features of CAN and SPI serial interfaces. Features of CAN: a) It has a BIU b) It has three standards – 33 kbps CAN, 110kbps Fault
  • 204. tolerance CAN, 1 Mbps High Speed CAN c) It has a serial line, which is bidirectional. Features of SPI: a) 16 bit shift registers b) Slave in, master out I/O pin c) Slave out, master in I/O pin c) DMA support d) Upto 66 MHZ operation 4. Write the generic functions of device drivers. The generic functions used for the commands to the device are device create (), open(), connect(), bind(), read(), write(), ioctl(). 5. What are handshaking signals? Handshaking signals are used to exchange before storing the bits at the port buffer or before accepting the bits from the port buffer or the signals to setup or terminate the communication between two source and destination. 6. Define UART. UART is a standard Asynchronous serial input and output port for serial bits. UART usually sends a byte in 10-bits format or 11 bits format. The 10 bits format is used when a start bit preceded the 8 bit message and stop bit succeeds the message. An 11 bit format is used when a special bit also precedes the stop bit. 7. Define bus arbitration. Bus arbitration is a process when multiple controller or processors attempt to transmit and access the bus at the same instant, but only one transmitter is allowed to transmit and access at that instant. 8. What is half duplex and full duplex? Half duplex: It is a serial port having one common I/O line or channel. For example, in a telephone line, message flows one way at an instance. Full duplex: It is a serial port having two distinct I/O lines or communication channels. For example, a modem connection to the computer COM port. There are two lines TxD and RxD at 9 pins or 25 pins connector. Message flows both ways at an instance. 9. What is meant by bus master? Bus master is a processor, device or system which synchronously or asynchronously controls the input and outputs to the bus at selected instants. 10. What is COM port? It is a port at the computer where a mouse, modem, serial printer or mobile serial printer or mobile smart phone cradle connects for serial I/Os in UART mode and there are handshaking signals for exchange of signals before UART mode communication. Extra Questions: 1) Mention the disadvantages of I2 C Bus. 2) Mention the disadvantages of SPI interface. 3) Draw the Asynchronous Serial input RxD at UART COM port. 4) Draw the bit formats of UART protocol UNIT-III 1. What is State Machine model? The State Machine model is used for modeling reactive or event driven embedded systems whose processing behavior are dependent on state transitions. 2. Write about the process involved in co design. Hardware software co-design is the modem approach for interactive together design of hardware and firmware for embedded systems. The fundamental issues of co-design are selecting the model, selecting the architecture, selecting the language and partitioning system requirements into hardware and software. 3. Mention different models used for the development of an embedded system. a) Linear or waterfall model b) Iterative or Incremental or fountain model c) Prototyping model d) Spiral model 4. What is EDLC and write the objectives of EDLC? Embedded Product Development Life Cycle (EDLC) is an Analysis Design Implementation based standard problem solving approach for Embedded Product Development. EDLC has three primary objectives, namely a) Ensure that high quality products are delivered to end user b) Risk minimization and defect prevention in product development through project management c) Maximize the productivity. 5. What are the different phases of EDLC? EDLC has following different phases, Need, Conceptualization, Analysis, Design, Development and Testing, Deployment, Support, Upgrades and Retirement or disposal. 6. What is VLIW? Very Long Instruction Word (VLIW) architecture implements multiple functional units in the datapath. The VLIW instruction packages one
  • 205. standard instruction per functional unit of the datapath. 7. What is SIMD architecture? In Single Instruction Multiple Data (SIMD) architecture a single instruction is executed in parallel with the help of the processing elements. The scheduling of the instruction execution and controlling of each processing elements is performed through a single controller. It forms the basis of Re-configurable processor. 8. What is MIMD architecture? The processing elements of the Multiple Instruction Multiple Data (MIMD) architecture execute different instructions at a given point of time. It forms the basis of multiprocessor systems. The processing elements in a multiprocessor system communicate through mechanisms like shared memory and message passing. 9. What is controller architecture? The controller architecture implements the finite state machine model using a state register and two combinational circuits. The state register holds the present state and combinational circuits implement the logic for next state and output. 10. What is parallel processing architecture? Parallel processing architecture implements multiple concurrent processing elements (PEs) and each processing element may associate a datapath containing register and local memory. Example: Single Instruction Multiple Data (SIMD), Multiple Instruction Multiple Data (MIMD) Extra Questions: 1) What is RISC? 2) What is SISC? 3) What is Datapath Architecture? 4) What is DFG model? 5) Define object oriented model. UNIT IV 1. Define thread and process. Thread: Thread is a single unit of execution and is part of process. A thread does not have its own data memory and heap memory. A thread cannot live independently, it lives within the process. Threads are very inexpensive to create. Process: Process is a program in execution and contains one or more threads. Process has its own code memory, data memory and stack memory. A process contains at least one thread. Processes are very expensive to create, involved many OS overhead. 2. What is multiprocessing and multitasking system? Multiprocessing systems contain multiple CPUs and are capable of executing multiple processes simultaneously. Multitasking is the ability of an operating system to hold multiple processes in memory and switch the processor from executing one process to another process. 3. What is semaphore? Where it is used? Semaphore is a sleep and wakeup based mutual exclusion implementation for shared resource access. Semaphore is a system resource and the process which wants to access the shared resource can first acquire this system object to indicate the other processes which wants the shared resources that the shared resource is currently acquired by it. 4. Compare preemptive and non-preemptive scheduling. Preemptive scheduling: It is a multitasking model in which a currently running task/process is preempted to execute another task / process. Non-preemptive scheduling: It is a multitasking model in which a task gets a chance to execute when the currently executing task relinquished the CPU or when it enters a wait state. 5. What are functions of RTOS? RTOS can perform the following functions: a) Determines which execution entities in the application should control the CPU, in what order and how much time is allowed for each before giving up processor control. b) Handles input and output to and from attached hardware devices. c) Manages the sharing of internal memory among multiple tasks. d) Sends messages about the status of operation and any errors that may have occurred. 6. What is IPC? The mechanism through which processes/tasks communicate each other is known as Inter Process/Task Communication (IPC). Inter process communication is essential for process co-ordination. 7. What is Mutex? Mutex is the binary semaphore implementation for exclusive resource access under certain OD kernel. 8. What is deadlock? What are the different conditions favouring deadlock?
  • 206. Deadlock is a situation where none of the processes are able to make any progress in their execution. Deadlock is the condition in which a process is waiting for a resource held by another process which is waiting for a resource held by the first process. The different conditions favouring a deadlock situation are a) Mutual exclusion b) Hold and wait c) No resource preemption d) Circular wait. 9. What is context switching? Whenever a CPU switching happens, the current context of execution should be saved to retrieve it at a later point of time when CPU executes the process, which is interrupted currently due to execution switching. The context saving and retrieval is essential for resuming a process exactly from the point where it was interrupted due to CPU switching. The act of switching CPU among the processes or changing the current execution is known as context switching. 10. What are Hard real time systems? Hard Real Time means strict adherence to each task schedule. A hard real time system must meet the deadlines for a task without any slippage. Missing any deadline may produce catastrophic results for head real time systems, including permanent data lose and irrecoverable damages to the system/users. Example: Air traffic control, Nuclear power plant control, Anti-lock Brake systems of vehicles etc., 11. What are Soft real time systems? Soft Real Time Systems does not guarantee meeting deadlines, but offer the best effort to meet the deadline. Missing deadlines for tasks are acceptable for a soft real time system if the frequency of deadline missing is within the compliance limit of the quality of service. Example: Telecom, Networks, Web services, ATM etc., Extra Questions: 1) What is task scheduling in the operating system context? 2) What are the characteristics of RTOS? 3) What is priority inversion and priority inheritance? 4) Define throughput. 5) What are the different states of Task and process? UNIT V 1. Define MUCOS. MUCOS is a portable, ROMable, scalable, preemptive, Real Time and Multitasking Kernel. It is used in over thousands of applications, including automotive, avionics, consumer electronics, medical devices, military aerospace, networking, system-on-chip development. 2. What is OEM? OEM is a Original Equipment Manufacturer is a company that makes a part or subsystem that is used in another company’s end product. For example, if ACME Manufacturing Company makes power chords that are used on IBM computers, ACME is an OEM. 3. List some applications Embedded systems. a) Automotive chocolate vending machine b) Washing or cooking system c) Computer networking systems d) Banking systems like Bank ATM, e) Entertainment systems like video game f) Security products and high speed Network security. 4. What are the events involved in smart card systems? a) On power up by radiation powered charge pump supply of the card, a signal to start the system boot program at reset task. b) Card start request Header message to task- Read port from reset task. c) Host authentication request start message to task-Read port from reset task to enable requests for Port-IO d) User PW verification message through Port- IO from host. e) Card application close request Appl Close message to Port_IO 5. What is meant by LIN? Local Interconnect Network (LIN) bus is a single master multiple slave communication interface. LIN is a low speed, single wire communication interface with support for data rates upto 20 kbps and is used for sensor/actuator interfacing. 6. What is MOST? The media oriented system transport (MOST) bus is targeted for automotive audio / video equipment interfacing. MOST bus is a multimedia fibre-optic point to point network implemented in a star, ring or daisy chained topology over optical fibres cables. 7. What are the key players of the Automotive Embedded Market?
  • 207. The key players of the automotive embedded market can be classified into a) Silicon providers b) Tools and platform providers c) Solution providers. 8. What is meant by ECU? And write the classifications of ECUs. Automotive Embedded Systems are normally built around Microcontrollers or DSPs or a hybrid of the two and are generally known as Electronic Control Units (ECUs). The various types of ECUs can be classified into: a) High speed Electronic Control Units (HECUs) b) Low speed Electronic Control Units (LECUs) 9. What are the applications of MUCOS? MUCOS is widely used in many fields such as a) cameras b) Automotive c) Medical devices d) Aerospace e) Networking. 10. Name some serial buses used in Automotive communication. The most widely used serial buses for automotive communication are a) Controller Area Network (CAN) b) Local Interconnect Network (LIN) c) Media Oriented System Transport (MOST) Bus. Extra Questions: 1) What is ACVM? 2) Define CAN. PART B UNIT-I 1. Draw and explain the components of Embedded systems. 2. Explain the Build process of a embedded systems. 3. Draw and explain the structural units of an embedded systems. 4. Explain DMA with neat sketch. 5. Explain in detail memory management methods. 6. Explain about timer and counting devices. 7. Explain in detail about Incircuit emulator and target hardware debugging. UNIT-II 1. Explain in detail different Bus arbitration methods. 2. Draw and explain Serial peripheral Interface (SPI) 3. Draw and explain CAN protocol. 4. Explain in detail I2 C Bus. 5. Explain in detail RS 232 standard. 6. Explain the need for device drivers. 7. Explain parallel port interfacing with UNIT-III 1. Explain the objectives of EDLC. 2. Explain in detail about different phases of EDLC. 3. Explain the different models of EDLC. 4. Explain in detail DFG and CDFG model. 5. Explain the FSM with an example. (Seat belt warning system, automatic tea, coffee vending machine, Coin inserted public telephone machine) 6. Explain sequential and concurrent model. 7. Explain object oriented model. 8. Explain in detail the issues in Hardware and software Co design. UNIT IV 1. Explain in detail the basics of operating systems. 2. Explain in detail tasks, process and thread. 3. Explain how the interrupt routines are handled by RTOS. 4. Explain in detail about the Inter process communication and context switching. 5. Explain the task synchronous issues in detail. 6. Explain ‘the Dining philosopher’s problem. 7. Explain priority inversion and priority inheritance. UNIT V 1. With suitable diagram explain in detail about the concept of washing machine application. 2. With suitable diagram explain in detail about the concept of smart card application. 3. With suitable diagram explain in detail about the concept of automotive application. 4. With suitable diagram explain in detail about the concept of automatic chocolate vending machine application.
  • 208. EE6602 – Embedded system Possible Questions Unit 1 1. List and explain the hardware units that must be present in the embedded systems. 2. Explain the functional building blocks of an Embedded System. 3. Sketch and explain the structural units in processor. Also what are the structural units available in advanced processors? 4. (i) Summarize In-circuit emulator (7) (ii) Write a short notes on Watch dog timer (6) 5. (i) Briefly explain the classifications of embedded systems with an example.(6) (ii) Explain the various form of memories present in an embedded system (7) 6. With a neat diagram explain the working of Direct memory Access 7. Discuss in detail about the timer and counter. 8. With a neat diagram, explain the working of Direct Memory Access (DMA) and mention the Memory Management methods Unit 2 1. Explain in detail about SPI communication protocol and its interfacing techniques 2. Explain with all necessary sketches to enable intra communications among peripherals using I2C bus 3. Demonstrate the signals using a transfer of bytes when using the I2C bus and also the format of bits at the I2C bus with diagram 4. Explain the physical layer of the I2C and explain its operation with data frame 5. Draw the physical layer of CAN and explain its operation with data frame 6. (i) Compare the RS232C and RS485 serial interface (8) (ii) Compare the advantages and disadvantages of data transfer using serial and parallel port devices (8) 7. Explain the working principle of RS 232 serial communication standard in detail. 8. Why we need device driver? How do you write a device driver? List the steps involved in writing a device driver. Unit 3 1. Explain the different phases of embedded product development life cycle 2. Explain the following models adopted in embedded product development a) Iterative/Incremental or Fountain model (7) b) Prototyping/Evolutionary model (6) 3. Draw the neat sketch of Incremental model and spiral model. Also mention its advantages and drawbacks. 4. Design a FSM model of an automotive seatbelt warning system 5. Design an automatic tea/coffee vending machine based on FSM model
  • 209. 6. What is meant for hardware software co-design? Explain in detail about the fundamental issues involved in it. 7. Explain how the embedded system is designed by using sequential program model and concurrent process model with suitable example Unit 4 1. What is the structure of a real time operating system? Explain in detail about the Kernel, Process, and Thread and Task 2. Explain in detail about Task, Process and threads. 3. Explain the different types of preemptive and non-preemptive scheduling algorithms with suitable examples. 4. Explain the terminologies Semaphores, Mailbox, Pipes and Shared memory in RTOS 5. What is meant by semaphore? Explain the two types of semaphore with suitable examples 6. Define massage passing. Explain different massage passing technique in embedded system 7. Explain priority inversion and priority inheritance in detail 8. Explain how the interrupt routines are handled by RTOS and illustrate the features of VX Works Unit 5 1. With suitable diagram explain in detail about the concept of washing machine application 2. Elucidate the selection of processor and memory for any one embedded applications with suitable diagram in detail 3. With suitable diagram Explain in detail about the concept of Smart card 4. Explain the following in designing Smart Card (i) Requirements (ii) Class diagram (iii) Smart card hardware (iv) Synchronization Model Part – C 1. List the tasks involved in the adaptive cruise control in an automobile system. And explain the inter process communication functions required and their uses in ACC. 2. Explain the various steps involved in design automotive application 3. Explain with a block diagram the ECUs in Present day automobiles 4. Three process with a process IDs P1,P2,P3 with estimated completion time 10,5,7 millisecond respectively enters the ready queue together .A new process P4 with estimated completion time 2ms enters the ready queue after 2ms.Assume all the
  • 210. process contain only CPU operation and no I/O operation are involved .Calculate and compare the waiting time and Turn Around Time (TAT) for each process and the average waiting time and Turn Around Time in SJF algorithm using Non-Preemptive and Preemptive Scheduling 5. (i) Three process with a process IDs P1,P2,P3 with estimated completion time 6,4,2 millisecond respectively enters the ready queue together in the order P1,P2,P3. Calculate the waiting time and Turn Around Time (TAT) for each process and the average waiting time and Turn Around Time (Assume there is no I/O waiting for the process ) in RR algorithm with time slice = 2ms. (ii) The processes with process IDs P1, P2, P3 with estimated completion times 10,2 ,6 milliseconds respectively enters the ready queue together. Calculate the waiting time and turnaround time (TAT) for each process and average waiting time and average TAT in FIFO algorithm. 6. Explain the finite state machine model for Public operated telephone System Part A Unit 1 1. What are the types of embedded systems? 2. Illustrate the steps involved in build process 3. What is real time system? 4. Differentiate hard and soft real time systems. 5. Define embedded system. 6. List out the challenges in building an embedded system 7. What is need of DMA? 8. What is real time clock? 9. What is the need of watch dog timer? 10. What is timing device? Unit 2 1. What is MOSI & MISO? 2. Mention the features of CAN and SPI interfaces 3. List the features of CAN 4. Define UART 5. What is half and full duplex? 6. What is a handshaking signal? 7. What is the use of NACK Signal? 8. Draw the data framework of I2C 9. List out the standards for I2C bus with its different speed levels.
  • 211. 10. What are the advantages of RS 485 than RS 422? Unit 3 1. What are the different phases of EDLC? 2. What is meant by cost benefit analysis? 3. Define deployment phase. 4. What are the objectives of EDLC? 5. What are the process involved in Co-design? 6. What is the difference between prototyping model and fountain model? 7. What is meant by modeling in EDLC? 8. What is the difference between Linear and fountain model? 9. Model the Control data flow graph with an example. 10. What is the difference between Linear and spiral model? Unit 4 1. Define semaphore signaling 2. What do you understand by real time scheduling 3. Compare preemptive and non-preemptive scheduling 4. Define thread and process 5. What are the functions of RTOS 6. Name any two mailbox related functions. 7. Name any two important RTOS. 8. What is Round robin algorithm? 9. Define Turn Around Time (TAT). 10. What is deadlock? What are the different conditions favouring deadlock? Unit 5 1. List some applications of embedded systems. 2. What are the events involved in the smart card application. 3. List the design metrics of Smart Card 4. Draw the system components in the Smart Card. 5. What are the sensors and actuators of Washing machine? 6. What is ACHVWLT in Automobiles 7. List the design metrics of ACC 8. What is meant by ACC? 9. Define ECU in CAR.