Professional Documents
Culture Documents
Introduction 2013
Introduction 2013
Introduction 2013
MCS122
17:02 1
Embedded System
Course Unit I
• Introduction to embedded
systems, categories of
Embedded Systems;
• architecture of Embedded
Systems;
• Implementation of Embedded
System, Hardware Evolution;
• Challenges in designing of
Embedded System. Skill
required for an Embedded
System Designer.
17:02 2
Embedded System
• Programmable Processor
Architecture: Instruction set
architecture;
• memory organization, operand
location and memory
addressing.
17:02 3
Embedded System
• 8051 architecture in brief.
Enhancing processor
performance;
• Introduction to advanced
processor, case studies for
selection of processor in
hardware design and memory
for software design
17:02 4
Embedded System
II Programming in assembly language (ALP) vs. High Level Language - Concepts of EMBEDDED
PROGRAMMING in C++ - Objected Oriented Programming – Embedded Programming in C++, ‘C’
Program, compilers, Cross compiler – Optimization of memory codes. Definitions of process, tasks and
threads – Clear cut distinction between functions – ISRs and tasks by their characteristics – Operating
System Services- Goals – Structures- Kernel - Process Management – Memory Management – Device
Management – File System Organization and Implementation – I/O Subsystems – Interrupt Routines
Handling in RTOS, 14 III REAL TIME OPERATING SYSTEMS : Task scheduling models, Inter process
communication and synchronization, ,Priority Inversion Problem and Deadlock Situations, Inter Process
communications. Study of Micro C/OS-II or Vx Works or Any other popular RTOS – RTOS System Level
Functions – Task Service Functions – Time Delay Functions – Memory Allocation Related Functions –
Semaphore Related Functions – Mailbox Related Functions – Queue Related Functions – Case Studies
of Programming with RTOS – Understanding Case Definition – Multiple Tasks and their functions –
Creating a list of tasks – Functions and IPCs – Exemplary Coding Steps 13
References: Rajkamal, Embedded Systems Architecture, Programming and Design, TATA McGraw-Hill,
First reprint Oct. 2003 David E.Simon, An Embedded Software Primer, Pearson Education Asia, First
Indian Reprint 2000. Steve Heath, Embedded Systems Design, Second Edition-2003, Newnes; Wayne
Wolf, Computers as Components; Principles of Embedded Computing System Design – Harcourt India,
Morgan Kaufman Publishers, First Indian Reprint 2001 Frank Vahid and Tony Givargis, Embedded
Systems Design – A unified Hardware /Software Introduction, John Wiley, 2002
17:02 5
Embedded System
Programming in assembly language
(ALP) vs. High Level Language -
Concepts of EMBEDDED
PROGRAMMING in C++ - Objected
Oriented Programming – Embedded
Programming in C++, ‘C’ Program,
compilers, Cross compiler – Optimization
of memory codes. Definitions of process,
tasks and threads – Clear cut distinction
between functions – ISRs and tasks by
their characteristics – Operating System
Services- Goals – Structures- Kernel -
Process Management – Memory
Management – Device Management –
File System Organization and
Implementation – I/O Subsystems –
Interrupt Routines Handling in RTOS,
17:02 6
References
1. Rajkamal, Embedded
Systems
Architecture, Programming and
Design, TATA McGraw-Hill, First
reprint Oct. 2003 2. David
E.Simon, An Embedded
Software Primer, Pearson
Education Asia, First Indian
Reprint 2000. 3. Steve Heath,
Embedded Systems
Design, Second Edition-2003,
Newnes;
17:02 7
References
4. Wayne Wolf, Computers as
Components; Principles of
Embedded Computing System
Design – Harcourt India, Morgan
Kaufman Publishers, First Indian
Reprint 2001 5. Frank Vahid and
Tony Givargis,
Embedded Systems Design –
A unified Hardware /Software
Introduction, John Wiley, 2002
17:02 8
Definition
An embedded system is a
system that has embedded
software and computer-
hardware, which makes it (a) a
system dedicated for an
application(s)
or (b) specific part of an
application, or (c) product , or (d)
a part of a larger system
17:02 9
Main Components
1. hardware similar to a
computer;
secondary memory not required
as software embeds in ROM or
Flash memory
17:02 10
Main Components
2. main application software, that
may concurrently perform a
series of i. tasks or ii. processes
or iii. threads.
17:02 11
Main Components
3. a real-time operating system
(RTOS) for
(a) supervising the application
software
running on hardware and (b)
organizing access to a resource
according to the priorities of
tasks in the system.
17:02 12
Components of
embedded system
Hardware
Input Devices Interfacing/Driver Circuits
Processor
Program
Power Supply, Reset and
Timers Oscillator
Interrupt Controller
Memory
System Serial Comn
Application Ports
Specific
Circuits
Parallel
Circuits
Ports
Outputs Interfacing/Driver Circuits
17:02 13
Processor
a. In the form a chip b. Core
form in an Application Specific
Integrated Circuit (ASIC) or c.
System on Chip (SoC)
17:02 14
Processor
1. General Purpose Processor
(GPP): not
application specific a.
Microprocessor b. Embedded
Processor
17:02 15
Processor
2. Application Specific
Instruction-set
Processor (ASIP): designed for
specific applications a.
Microcontroller b. Embedded
microcontroller c. Digital Signal
Processor (DSP) d. Network
Processor, IO Processor or
domain specific programmable
processor
17:02 16
Processor
3. Single Purpose Processors as
additional
processors, examples, a.
Coprocessors, e.g., graphic
processors,
floating point processor, TCP/IP
protocol stacking and network
connectors b. Accelerators, namely,
Java codes
accelerator c. Controllers, like,
DMA, bus controllers
17:02 17
Processor
4. GPP or ASIP core integrated
into either
an ASIC or a VLSI circuit or a
Field Programmable Gate Array
(FPGA) core integrated with
processor units in a VLSI (ASIC)
chip. 5. Application Specific
System Processor
(ASSP) 6. Multicore
processors or multiprocessor
17:02 18
Functional Circuits in a
Core Microcontroller
Processor Internal
Flash/ROM Internal RAM
I/O Ports Control & Interfaces/Drivers External Memories
Timers &
Interface
Serial UART Communication Watchdog
Interface Timers
Interrupt Controller
Serial Synchronous comn. Port
17:02 19
Application Specific units
in a specific version of a
microcontroller
DMA Controller
A/D Convertor
Network Driver Stack and Interfaces
PWM Circuit for D/A
CAN Controller
Interrupt Controller
Printer Controller
Modem
Controller Area Network (CAN) – a serial bus system used
in networking of intelligent devices, sensors and actuators
17:02 20
Commonly used
microcontrollers
A. Small Scale Embedded
System 8/16-bit
Microcontroller
• 8051 family
• PIC 16F8X
• Hitachi H8
• 68HC 11xx
17:02 21
Commonly used
microcontrollers
B. Medium Scale Embedded
System 16-bit
Microcontroller
• 8051 MX
• PIC 16F876, PIC 18
• Hitachi D64F2623FA
• 68HC 12xx, 68HC16xx
17:02 22
Commonly used
microcontrollers
C. Large Scale Embedded
System 32-bit
Microcontroller
• ARM family Cortex-M3, Atmel
AT91 series,
• C16x/ST10 series
• Philips LPC 2000 series
• Texas Instruments, TI
TMS470R1B1M,
17:02 23
When to use a
microcontroller?
A microcontroller is used (a)
when a small or part of the
embedded
software has to be located in the
internal memory and (b) when
on-chip functional units such as
the interrupt-handler, port, timer,
ADC, PWM and CAN controllers
are required.
17:02 24
Single Purpose
Processors
1. Coprocessor, e.g., for floating
point
processing 2. Graphics
processor: It is required for
functions such as, for example,
gaming, display from graphics
memory buffers and to move
(translate on screen) and rotate
an image or its segments.
17:02 25
Single Purpose
Processors
Pixels required in some image
formats:
Quarter Common Intermediate
Format (Quarter-CIF) – 144x176
(x-axis, y-axis) pixels, Video
frames –525x625, Video Graphic
Adapter (VGA) – 640x480 pixels
17:02 26
Single Purpose
Processors
3. Pixel coprocessor: required in
digital
cameras for displaying images
directly or after operations such
as rotate right, rotate-left,
rotate-up, rotate-down, shift to
next, shift to previous. Examples
of high-resolution pictures –
2595x1944 pixels
17:02 27
Single Purpose
Processors
4. Encryption Engine: A suitable
algorithm runs in this processor
to encrypt data fro secure
transmission. 5. Decryption
Engine: A suitable algorithm
runs to decrypt the encrypted
data at receiver’s end.
17:02 28
Single Purpose
Processors
6. A Discrete Cosine
Transformation (DCT)
and Inverse Transformation
(DCIT) processor is required in
speech and video processing. 7.
Protocol stack processor: A
protocol
stack, which has a number of
header words, is prepared
before an application data is
sent to a network.
17:02 29
Single Purpose
Processors
At the receiver’s end, the
protocol stack is
received and application data is
accepted accordingly. A TCP/IP
protocol stack processor
processes TCP/IP network data.
17:02 30
Single Purpose
Processors
8. Network processor: functions
– to
establish a connection, finish,
send and receive
acknowledgements, send and
receive retransmission requests
and to check and correct
received frame errors.
17:02 31
Single Purpose
Processors
9. Accelerator (Java codes
accelerator): A
coprocessor that accelerates
computations by taking advance
actions that are just-in-time
compilations of the next object
data in Java programs.
17:02 32
Single Purpose
Processors
10.CODEC (Coder and Decoder):
a processor
that encodes input and decodes
the encoded information or bits or
signals into a complete set of bits
or original signal. Voice, speech,
image, video signals and bits
are encoded for storing or
transmission and decoded from
the stored or received bits or signal
for display or playing.
17:02 33
Single Purpose
Processors
The CODEC functions as a
compression and
decompression unit for voice,
speech, image or video signals.
11. JPEG CODEC: a processor
for jpg compression and
decompression
17:02 34
Single Purpose
Processors
12. MPEG CODEC: The
processor
compresses audio/video data
streams before storing or
transmitting. Decompression is
done before playing. 13.
Controller: for peripheral, direct
memory access or bus. SPPs
are used for specific applications
or computations or as controllers
for peripherals.
17:02 35
Embedded Software in
a System
Final Machine Implementable
Software
for a System:
• An embedded system
processor executes system
application software.
• The instruction codes and data
reside in the ROM or flash
memory.
• The software due to unique
sequence of instruction and
data, like pixels, is also called
ROM image.
17:02 36
Embedded Software in
a System
• The ROM image for the
targeted hardware is a machine
implementable file.
• The ROM image is a table
having in each rows the address
and bytes.
• The bytes are saved at each
address of the system memory.
17:02 37
Typical ROM image in a
system memory
The image consists of
• The boot up program
• Stacks address pointers
• PC address pointers
• Application programs
• ISRs
• Input data and vector
addresses
17:02 38
System ROM memory
embedding the software,
RTO, data and vector
addresses
2 BYTES FOR ADDRESS OF
PC-ADDR STACK ON
RESET
SP-ADDR
2 BYTES FOR ADDRESS FROM WHERE SYSTEM
STARTS EXECUTION ON POWER UP. (not needed in
80x86, 8051,
ISR VECTOR ADDRESSES
80196,..)
OF 2 BYTES EACH
ADDR-1 ADDR-2 BOOTUP PROGRAM CODES
ADDR-3
ADDR-10
17:02 39
e
-
a
l
l
o
c
a
t
i
n
g
A
d
d
r
e
s
s
e
s
4 Loader
The process of converting
an C-LP into machine
code and ROM image
C Program
1
Machine codes Functions
Compiler
in Object files
2
C
From Library needed codes
machine
Linker
17:02 44