2. Subject Code: 710409
Subject Name: Embedded Systems
Course Hand Out
Topic
No.
Name of the Topic
1 Introduction to Embedded system design (ESD) and Products; Requirements of
Embedded controller core and Memories, DRAM Controller
2 Introduction to ARM7 controllers and architecture (Timers, interrupts, UART,
SPI, details)
3 Embedded Programming (cross compiler, Hardware Emulation, C and assembly
interfacing)
4 Introduction to serial data transfer standards, SCI, SPI, UART, USB technologies,
JTAG interface
5 Signal conditioning, interfacing with real world peripherals, ADC and DAC
interfacing
6 Real Time Operating System Concepts (Scheduler Algorithms, Multitasking,
Threading)
7 Applications and studies: Phones, PDAs, ATM, Digital Cameras, J2ME of
Embedded systems
8 Seminars on relevant topics
3. List of Books
Text Books
1 Title
Author
Publisher
Embedded Microcomputer Systems
Real Time Interfacing
Jonathan W. Valvano
Thomson Books
2 Title
Author
Publisher
Embedded Systems Design, 2nd edition
Steve Heath
Newnws ( Elsevier )
Reference Books
1 Title
Author
Publisher
The 8051 Microcontroller
K J Ayala
Penram Intl.
2 Title
Author
Publisher
Embedded Systems: Architecture, Programming and
Design
Raj Kumar
Mc Graw Hill
3 Title
Author
Publisher
Embedded/Real Time Systems: Concept, Design and
Programming
Dr. K V K K Prasad
Dreamtech Press
4 Title:
Author:
Publisher:
Embedded Systems Architecture : A Comprehensive
Guide for Engineers and Programmers
Tammy Noergaard
Newnws (Elsevier)
4. What is an Embedded System
An Embedded System is a microprocessor based
system that is embedded as a subsystem, in a
larger system (which may or may not be a
computer system).
O
I
5. • Monitoring / controlling the physical world.
• A user can make choices concerning
functionality but cannot change the
functionality of the system by adding /
replacing software
• It is having capability to provide upgradation
about the functionality
9. Essential Components
• Microprocessor / DSP
• Sensors
• Converters (A-D and D-A)
• Actuators
• Memory (On-chip and Off chip)
• Communication path with the interacting
environment
11. Characteristics of Microcontroller to
design an embedded system
• Low cost
• Low speed, on the order of 10 KHz – 20 MHz
• Low Power, extremely low power in sleep mode
• Small architecture, usually an 8-bit architecture
• Small memory size, but usually enough for the type of
application it is intended for. Onboard Flash.
• Limited I/O, but again, enough for the type of application
intended for
13. Harvard Architecture
1) Harvard Architecture refers to a memory structure where the
processor is connected to two different memory banks via two sets
of buses
2) This is to provide the processor with two distinct data paths, one for
instruction and one for data
3) Through this scheme, the CPU can read both an instruction and data
from the respective memory banks at the same time
4) A Harvard architecture computer can thus be faster for a given
circuit complexity because instruction fetches and data access do not
contend for a single memory pathway.
5) The cost of such a system is complexity in hardware Commonly used
in DSPs.
14. Von – Neumann Architecture
1) A Von-Neumann Machine, in contrast to the Harvard Architecture
provides one data path (bus) for both instruction and data
2) As a result, the CPU can either be fetching an instruction from memory, or
read/writing data to it
3) Other than less complexity of hardware, it allows for using a single,
sequential memory.
4) Today’s processing speeds vastly outpace memory access times, and we
employ a very fast but small amount of memory (cache) local to the
processor
5) Modern processors employ a Harvard Architecture to read from two
instruction and data caches, when at the same time using a Von-Neumann
Architecture to access external memory
15. Big vs. Little Endian format of storing
data in memory
Although numbers are always displayed in the same way,
they are not stored in the same way in memory
Big-Endian machines store the most significant byte of data
in the lowest memory address
Little-Endian machines on the other hand, store the least
significant byte of data in the lowest memory address
A Big-Endian machine stores
0x12345678 as:
A Little-Endian machine
stores 0x12345678 as:
ADD+0: 0x12
ADD+1: 0x34
ADD+2: 0x56
ADD+3: 0x78
ADD+0: 0x78
ADD+1: 0x56
ADD+2: 0x34
ADD+3: 0x12
16. Contd.
The Intel family of Microprocessors and processors from
Digital Equipment Corporation use Little-Endian Mode
Whereas Architectures from Sun, IBM, and Motorola are
Big-Endian
Architectures such as PowerPC, MIPS, and Intel’s IA- 64
are Bi-Endian, supporting either mode
17. Characteristics of Embedded Systems
Embedded Systems, unlike a PC, never “exit” an
application
They idle through an Infinite Loop waiting for an
event to happen in the form of an interrupt, or a pre-
scheduled task
In order to save power, some processors enter special
sleep or wait modes instead of idling through an
Infinite Loop, but they will come out of this mode
upon either a timer or an External Interrupt
19. ES, MS and RTS
• All embedded systems are microprocessor based systems,
but all microprocessor based systems may not be amenable
to embedding (Area, Power, Cost, Payload parameters).
• Most of the embedded systems have real time constraints,
but there may be ES which are not hard RTS (for example
off line Palm tops)
• There may be RTS which are not embedded (e.g. Separate
Process Control Computers in a network)
• Embedded Systems are not general purpose systems; they
are designed for dedicated applications with specific
interfaces with the sphere of control
20. Hard Real vs. Soft Real
• The correctness of the system depends not
only on the results of computations, but also
on the time at which the results are produced.
• Hard real time system are time bounded while
soft real time systems are not.
21. A real-time system in which a missed deadline causes
the work performed to have no value or to result in a
catastrophic event.
22. A real-time system in which a missed deadline does not
compromise the integrity of the system or result in a catastrophic
event.
23. Examples
• Hard real time systems
1. Traffic signal controllers
2. Anti-Lock brake systems
3. Manufacturing plant controllers
4. Medical devices
• Soft real time systems
1. Set Top Boxes
2. Consumer Electronics
24. General Characteristics of Embedded Systems
• Perform a single task
– Usually not general purpose
• Increasingly high performance and real time constrained
• Power, cost and reliability are important considerations
• HW-SW systems
– Software is used for more features and flexibility
– Hardware (processors, ASICs, memory etc. are used for
performance and security
25. General Characteristics of Embedded Systems
(contd.)
ASIC s
Processor
Cores
ASIPs and ASICs form a significant component
– Adv: customization lower power, cost and enhanced performance
– Disadv: higher development effort (debuggers, compilers etc.) and
larger time to market
Mem
Analog IO
Digital
27. What is a Microcontroller
• Flash + RAM on the chip
• Ports with sufficient driving capacity
• Timers
• Interrupts
• Serial data transfer engines like SPI, UART, I2C
• For DSP applications DMA controller and MAC
unit
28. Memory Requirements
• Flash memory holds the program code
• RAM will hold the dynamic data associated with the
program
• Boot loader resides in flash that helps in
communicating with program in PC to load the
application program in flash
• Microcontrollers generally do not use ROM but rather
EEPROM is provided as flash on the chip
• External Memory interfacing is avoided due to varities
of option available from each manufacturer in the form
of required flash memory on the core. For example
8051 (4KB), 8052(8KB), 8055(20KB), P89c51RD2(64KB).
29. Port Requirements
• In case of 8085 based system we need to have
8255 to assign a port to input or output
device.
• In embedded system we want the port
structure on the core of microcontroller.
Hence Micon. will have port structure defined
on it.
• To save the pins the ports have dual pin
functions.
30. • Ports are bidirectional with latch for output as
well as if possible having sufficient driving
capacity (but not necessary)
• Port pins are bit addressable
31. Timer Requirements
• Timer is present on the core to generate
timing signals for various peripherals like ADC,
RTC, SPI, UART etc.
• The frequency of timer is programmable.
• Timer must have interrupt associated with its
operation.
• Watch dog timer in debugging environment.
• Timer as counter to count external events.
33. Interrupts
• Polled I/O is slower hence Interrupt driven data
transfer is better approach.
• Hardware / Software Interrupt.
• Exceptions
• Important activities on the architectural level are
associated with Interrupt to reduce the tasks
handled by Main program.
• Multitasking is implemented with the help of
Interrupts in Real Time Operating System
Environment.
34. Interrupt can be associated with following
kind of activities:
Timer overflow
ADC conversion completed
Data is received on UART port
Some port pin is activated with active signal.
Etc…….
35. Interrupts with Timer
• When a timing event is generated Interrupt
occurs.
• Timing events
(a) Roll over of the timer
(b) Timer count = Match register
36. Idle / Power Down Modes
• Power can be shut down to selected segments
of the architecture.
• Retention of the RAM contents is followed in
the power down modes.
• In “Embedded Operating Systems”
environment, power down mode saves power
in between successive systems ‘ticks’.
• Hardware reset or interrupt can be used to
quit the power down mode.
37. Philosophy of Microcontrollers
• Special Function Registers enable / disable the
resources as per requirement.
• The functioning associated with the resources
(ADC, Timer etc.) are controlled by the
respective SFRs.
• This controls the power consumption.
• This also makes it possible for dual / triple pin
functions.
Editor's Notes
Highlight the interaction with the environment
Input output communications require proper transduction and actuation
So A/D conversion requirements can also be mentioned here
A very important aspect that should be mentioned is that the design of the hardware and software of the ES derives its specifications from the environment with which it will interact