Vous êtes sur la page 1sur 60

Embedded Systems

R.Hariharan AP/EEE - SECE


R.Hariharan AP/EEE
Unit – I
Introduction to
Embedded Systems

R.Hariharan AP/EEE
Embedded System:
• Embedded system is a system that has embedded
software and hardware,
hardware which makes it a system
dedicated for an application or product or a part
of a larger system.
system
• Embedded system are electronic systems contain
a microprocessor and microcontroller.
• 3 main components :
1. Hardware 2. Application Software
3. RTOS

R.Hariharan AP/EEE
RTOS (Real Time Operating System)
• RTOS supervises the application software
running on hardware and organizes access
to a resource according to the priorities of
task in the system.

R.Hariharan AP/EEE
Components of embedded system hardware:

R.Hariharan AP/EEE
Registers
 Used to store information temporarily.
 information - byte of data to be processed.

R.Hariharan AP/EEE
R.Hariharan AP/EEE
Memories

R.Hariharan AP/EEE
Memories

R.Hariharan AP/EEE
Volatile Memory Non Volatile Memory

R.Hariharan AP/EEE
Memory Address Map

R.Hariharan AP/EEE
Random Access Memory
1
0
00

R.Hariharan AP/EEE
Read Only Memory

R.Hariharan AP/EEE
Read Only Memory
Nonvolatile memory

Can be read from but not written to, by a


processor in an embedded system

Traditionally written to, “programmed”, before


inserting to embedded system

Uses
Store software program for general-purpose
processor program instructions can be one or more
ROM words
Store constant data needed by system
R.Hariharan AP/EEE
Read Only Memory Internal view

 Horizontal lines = words 8 × 4 ROM

 Vertical lines = data word 0


3×8
 Lines connected only at enable decoder word 1
circles word 2
 Decoder sets word 2’s line to A 0
word line
1 if address input is 010 A 1

 Data lines Q3 and Q1 are set to A 2

1 because there is a “programmed”


connection with word 2’s line data line
 Word 2 is not connected with data
lines Q2 and Q0 programmabl
e connection wired-OR
 Output is 1010
Q3 Q2 Q1 Q0

R.Hariharan AP/EEE
Look Up
Tables

0
3X8
1 Decoder

1 0 AP/EEE
R.Hariharan 1 0
Erasable Programmable Read Only
Memory
Transistor has “floating” gate surrounded by an insulator
(a) Negative charges form a channel between source and
drain storing a logic 1
(b) Large positive voltage at gate causes negative charges
to move out of channel and get trapped in floating gate
storing a logic 0
(c) (Erase) Shining UV rays on surface of floating-gate
causes negative charges to return to channel from floating
gate restoring the logic 1
(d) An EPROM package showing quartz window through
which UV light can pass
R.Hariharan AP/EEE
R.Hariharan AP/EEE
R.Hariharan AP/EEE
Electrically Erasable Programmable Read Only
Memory

 Erased cell in EPROM contains 1


 Selective Programming 0s in desired
bit location.
 Only 0s will be programmed.
 Program duration 11.5v to 25v
 Possible program – individually ,
sequentially, Random.

R.Hariharan AP/EEE
Electrically Erasable Programmable Read Only
Memory
Programmed and erased electronically
typically by using higher than normal voltage
can program and erase individual words
Better write ability
can be in-system programmable with built-in circuit to
provide higher than normal voltage
built-in memory controller commonly used to hide details
from memory user
writes very slow due to erasing and programming
“busy” pin indicates to processor EEPROM still writing
can be erased and programmed tens of thousands of times
Similar storage permanence to EPROM (about 10 years)
Far more convenient than EPROMs, but more expensive
R.Hariharan AP/EEE
Samsung 90nm smart card IC (S3CC9PF)
16-bit RISC processor
16.5KB RAM,
384KB ROM,
large capacity 288KB EEPROM.

R.Hariharan AP/EEE
Structural units in Embedded Processor:
Processors is an important unit of an Embedded System

Processors are classified based on the bit size :


• Small scale embedded system
• Medium scale embedded system
• Large scale embedded system

R.Hariharan AP/EEE
R.Hariharan AP/EEE
R.Hariharan AP/EEE
R.Hariharan AP/EEE
Structural units in Embedded Processor:
Processors is an important unit of an Embedded System

Processors in an Embedded System:


Processors has two essential units:
1. Program Flow Control Unit (CU) – Fetch Unit for
fetching instruction.
2. Execution unit (EU) – data transfer operation and
data conversion.
EU includes the ALU and also the circuit that executes
instruction for program control task, halt, interrupt,jump
instruction.

R.Hariharan AP/EEE
Processors in an Embedded System:

R.Hariharan AP/EEE
R.Hariharan AP/EEE
• What is a machine cycle?
 Machine cycle is a unit that refers to the time required
by the microcontroller to execute instructions.
Step 1. Fetch
Obtain program instruction
or data item from memory

Memory
Step 2.
Step 4. Store Decode
Write result to memory Translate
instruction into
Processor commands
ALU Control Unit
Step 3.
Execute
Carry out command

R.Hariharan AP/EEE
Important Consideration of a system designer
to selecting processor:
• Instruction set
• Maximum bits in an operand (8 or 16 or 32).
• Clock Frequency in MHZ and processing
speed in Millions Instruction Per Second
[MIPS].
• Processor ability to solve complex
algorithm.
R.Hariharan AP/EEE
Design Process for Embedded System

R.Hariharan AP/EEE
R.Hariharan AP/EEE
R.Hariharan AP/EEE
Architecture Design

PLAN

R.Hariharan AP/EEE
Designing H/W & S/W Components
Architectural tells the
components required

Components include
both H/W & S/W.

R.Hariharan AP/EEE
System Integration
Designers seeing a working
system.

Bugs are been rectified only in


this period.

R.Hariharan AP/EEE
Selection of Processors
• High Clock speed.
• High Computing performance – Pipeline
• Processors with registers - multitasking
• Power – efficient – auto shutdown
• Processors –Burst mode - external memory.
• Processor – Atomic Operation
• Processor – coding – Big Endian, Little Endian

R.Hariharan AP/EEE
Selection Of Memory Devices
• Actual memory requirement is known only after
coding.
• ROM & RAM allocation for various segments,
data & structures will be available from the
software design.
• Prior estimate of memory type and size can be
made.

R.Hariharan AP/EEE
Direct Memory Access (DMA)
Least Processor Intervention

R.Hariharan AP/EEE
• DMA transfer is controlled by a DMA controller,
controller which
request control of the bus from CPU.

Re
qu
es
t

R.Hariharan AP/EEE
A bus with DMA Controller
DMA requires 2 bus signals : (i). Bus Request (ii). Bus Grant

R.Hariharan AP/EEE
Data transfer occurs between hard disk & system
memory.

R.Hariharan AP/EEE
R.Hariharan AP/EEE
• Single Transfer at a time - (bytes transfer) –
release the IO bus hold in each transfer.
• Burst Transfer at a time – (Kilobytes transfer) -
release the IO bus hold in each transfer.
• Bulk Transfer at a time – release the IO bus
hold after transfer is completed.
DMAC is first initialized,
i). Read or write.
ii). Mode of DMA transfer.
iii). Total number of bytes
to be transferred
iv). Starting memory
address.
R.Hariharan AP/EEE
• 8086, 8085 processors doesn't have DMAC
units.
• 8051 family member 83C152JA & MC68340
microcontroller have two DMA channels on
chip.

R.Hariharan AP/EEE
Memory Management
• Memory is the important resource,
resource there is a
constant interaction and communication
between the processor.
• Semiconductor memory is the primary
memory
• Hard disk is the secondary memory
• All programs run with the data and code in the
RAM

R.Hariharan AP/EEE
VIRTUAL MEMORY
• Virtual memory is a concept by which the
application is made to believe that it has much
more memory than in physically available.
• Enlarged Address space which is also a virtual
address space.

R.Hariharan AP/EEE
Timer and Counting Devices
• Counter / Timer is used for many count based
measurements solutions.
Used for frequency measurements.
Used for edge or event counting.
Used for pulse – width measurement.
Used in event time stamps.
Timing Device or Timer :
Timer device is used to count the regular interval
clock pulses at its input.
Timer is a dedicated hardware for timing events.
R.Hariharan AP/EEE
• For example 8051 timer register TMOD & TCON.
• In timer count register, a number is loaded and
then the timer is started.
• Count keeps increasing until its reaches the
maximum value.
Counting Device or Counter :
Counting device is used to count the irregular
interval clock pulses at its input.

R.Hariharan AP/EEE
Watch Dog Timer (WDT)

A Watch Dog Timer is an additional timer that does


a monitoring job resets the system.
“Self- Reliant System”
R.Hariharan AP/EEE
• Software getting stuck in infinite loop.
• Dead lock
• Noise Voltage is some pin leads to – Wrong
triggering
Watch Dog Timer – it can be loaded with a count
which decrements down to zero.zero
8051 doesn't have inbuilt WDT but PIC ,ARM
microcontrollers have WDT.
Reset by WDT is called as “Soft Reset or Warm Boot”
Boot

R.Hariharan AP/EEE
Real Time Clock (RTC)
• System needs a clock which refers for REAL TIME.
• There are specialized ICs for keeping time which
can be programmed to count time in terms of
second, minutes and hours.
• For example ARM Microcontrollers have On-Chip,
Real Time Clock (RTC).

R.Hariharan AP/EEE
IN-CIRCUIT EMULATOR(ICE)
In Circuit Emulator is an emulator of microprocessor or
microcontroller of target circuit in a target emulating
circuit.

Ease of developing various application in a single


system.

Independent of a particular targeted system processor.

Motorola provides M68HC11EVM & M68HCEVB as


the emulator for 68HC11 micro controlled based target
system.
R.Hariharan AP/EEE
R.Hariharan AP/EEE
Target Hardware Debugging
• Monitor is a debugging tool for actual target
microprocessor in ICE ROM emulator in target
development board.

R.Hariharan AP/EEE
Unit – I 16 Marks Important Questions
1. steps involved in build process of embedded control
systems.
2. Structural units in embedded processor
3. How processor selected for embedded applications.
4. Working of DMA
5. Functional building blocks of embedded systems
6. Role of timers in embedded systems
7. Operation of Interrupt controllers.

R.Hariharan AP/EEE
Unit – I 16 Marks Important Questions
8. Structural unit of processors?
9. Embedded system and their classifications
10.Different program layers in embedded
software
11.Various memories present in embedded
system.

R.Hariharan AP/EEE
R.Hariharan AP/EEE

Vous aimerez peut-être aussi