Embedded Unit 1
Embedded Unit 1
Embedded Systems
UNIT 1
WHAT IS AN EMBEDDED
SYSTEM?
Embedded systems are devices used to control, monitor or assist the operation of
equipment, machinery or plant. “Embedded” reflects the fact that they are an
integral part of thesystem.
An embedded system is some combination of computer hardware and software,
either fixed in capability or programmable, that is specifically designed for a
particular function.
HARDWARE SOFTWARE
CPU APPLICATION
MEMORY OS
I/O DEVICES DEVICE DRIVERS
EMBEDDED STEM
SY
Layered architecture of an Embedded System
Now let us see the details of the various building blocks of the
hardware of an embedded system.
TYPES OF EMBEDDED
SYSTEM
REAL SMALL
TIME SCALE
STAND MEDIUM
ALONE SCALE
MOBILE
NETWORKED
SOPHISTICATED
BASED ON PERFORMANCE AND FUNCTIONAL REQUIREMENT
The connected network can be LAN, WAN or the internet. The connection can be
any wired or wireless. This type of embedded system is the fastest growing area in
embeddedsystemapplications. .
4.MOBILE EMBEDDED SYSTEMS
Mobile embedded systems are used in portable embedded devices like cell
phones, mobiles, digital cameras, mp3 players and personal digital
assistants, etc.
The basic limitation ofthesedevices is the other resources and limitation of
memory.
Based onthePerformance of theMicrocontroller
Small Scale Embedded Systems
These types of embedded systems are designed with a single 8 or 16-
bit microcontroller, thatmayevenbeactivatedbyabattery.
For developing embedded software for small scale embedded systems, the main
programming tools are an editor, assembler, cross assembler and integrated
development environment (IDE).
These systems have emerged in recent years. These systems run the
protocol TCP/IP stack and get connected through PPP or Ethernet to an
network and communicate with other nodes in the network.
Here are some examples of such systems
Inflexible Flexible
Functions they perform can’t be We need only to update the
changed software.
easily.
Example: Example:
Communication Personal
system Ciphering computer,PDA’s
algorithm Mobile phones,PLC’s
•An embedded system is some combination of computer
hardware and software.
•In ATM there are three types of languages are used like
Hindi,Punjabi,English.
•Visual part of computer application or operating system through
which a user interacts with a computer or a software.
• Crypto Implementation
Leverage our expertise to ensure crypto is implemenented securely
•Power consumption has traditionally been something
influenced only by hardware developers. But power
consumption depends not only on the hardware, but also
on how it is used and how it is controlled by the system
software.
requirements
specification
architecture
component
design
system
integration
56
Development Process
57
H/W and S/W Co-Design
58
Levels of Abstraction from Top to Bottom
• Requirements
• Specifications
• Architecture
• Components
• System Integration
59
Requirement
Complete clarity of:
• Required Purpose
• Inputs
• Outputs
• Functioning
• Design metrics
• Validation requirements for finally developed
system specifications
• Consistency in the requirements
60
Specifications
• Clear specification of customer expectations
from the product
• Needs specification for
– H/W, eg: Peripherals, Divices,Processors and
memory specifications
– Data types and processing specifications
• Expected system behavior specifications
• Constraints of design
• Expected lifecycle specifications of the
product
61
Specifications
• Process specifications analyzed by making list
of I/Ps on event list, O/Ps on events, process
activated on each event
62
Architecture
63
Components of Embedded system
H/W
- Processor
- Power source and clock
- Reset circuit
- Memory Unit
- Interrupt Handler
- Linking Embedded System H/W
- I/O communication Unit
S/W
- ROM image/Applications/w
- Programming Languages
- Device Drivers
- Program Models
64
Components of Embedded system
RTOS/EOS
S/W Tools
- Development tools
- Simulator
- Project Manager
- IDE
65
Difference between RISC and CISC
RISC CISC
Reduced instruction set Complex Instruction set
Small in size with resp to die area Comparatively large in size since
and No.of pins more complex instruction needs
to be implemented.
Eg:PIC18,ARM 8051,8086
Unit cost
NRE cost
Size
Performance
Flexibility
Time-to-market
Time-to-prototype
Correctness
safety
Unit cost and NRE cost
Power dissipation
Physical size, number of gates and engineering
Prototype development and manufacturing costs.
Power dissipation optimizing
Find errors and to validate that the implemented product is as per the
specifications and requirements to get reliable product.
verification
To ensure that the system that has been created is a s per requirements
agreed upon at the analysis phase, and to ensure its quality
Summary
MICROPROCESSOR MICROCONTROLLER
• Microprocessor assimilates • A microcontroller can be
the function of a central considered as a small
processing unit (CPU) on to a computer that has a
single integrated circuit (IC). processor and some other
• Microprocessors are basic components in order to make
components of personal it a computer.
Computers. • Microcontrollers are
• A Microprocessor-based generally used in embedded
system can perform numerous systems.
tasks. • A Microcontroller-based
• The clock frequency is very system can perform single or
high usually in the order of very few tasks.
giga Hertz • The clock frequency is less
• Instruction throughout is usually in the order of
given higher priority than MegaHertz.
interrupt latency. • In contrast, microcontrollers
are designed to optimize
interrupt latency.
Difference
between
RISC and
CISC
Definition of Harvard architecture and
Von Neumann architecture
• Harvard architecture:-The Harvard architecture is a computer architecture with
separate storage and signal pathways for instructions and data. It contrasts with the
von Neumann architecture, where program instructions and data share the same
memory and pathways.
Von Neumann architecture:- Von Neumann architecture is the design upon which many
general purpose computers are based. The key elements of von Neumann architecture are:
data and instructions are both stored as binary digits. data and instructions are both stored
in primary storage.
Harvard Architecture
Von Neumann
Architecture
Difference between Harvard and Von Neumann Architectures
1.2 Harvard and Von-Neumann architecture.
Most common microprocessor Intel 80x86 and Motorola 68K series use
CISC philosophy.
CISC was developed to make compiler development simpler. It tried to reduce burden of
generating machine instructions to the processor. Instead of having to make a compiler write long
machine instructions to calculate a square-root, a CISC processor itself could do it.
Attributes of CISC
(constraints : small amounts of slow memory, most early machines were programmed in assembly
language)
A 2-operand format, where instructions have a source and a destination. Register to register,
register to memory, and memory to register commands. Multiple addressing modes for memory,
including specialized modes for indexing through arrays
Variable length instructions where the length often varies according to the addressing mode
As the CISC generation processor advanced, the older instruction set and
hardware need to be there to support the new version. This increased the
complexity .
The first RISC projects came from IBM, Stanford, and UC-Berkeley in the late 70s and early
80s. The IBM 801, Stanford MIPS, and Berkeley RISC 1 and 2 were all designed with a similar
philosophy which has become known as RISC. Certain design features have been
characteristic of most RISC processors:
One cycle execution time: RISC processors have a CPI (clock per instruction) of one cycle.
Large number of registers: the RISC design philosophy generally incorporates a larger
number of registers to prevent in large amounts of interactions with memory
⚫ Few addressing schemes for memory operands with only two basic
instructions, LOAD and STORE
CISC RISC
Emphasis on hardware Emphasis on software
Includes multi-clock Single-clock,reduced
complex instructions instruction only
Memory-to-memory:"LOAD" Register to
and "STORE“ incorporated in register:
instructions “LOAD" and
STORE“
are independent instructions
Small code sizes, high cycles Low cycles per second, large
per second code sizes
Transistors used for storing Spends more transistors on
complex instructions memory registers
Why a microcontroller ?
Microcontroller 8051
General-purpose Microprocessors
🠶 CPU
🠶 No RAM
🠶 No ROM
🠶 No I/O ports
Microprocessor
Address bus
Seri
I/O Timer al
CO
M
Port
Features Of 8051
🠶 128 bytes of RAM
🠶 4 K bytes of on-chip ROM
🠶 Two timers
🠶 One serial port
🠶 Four I/O ports, each 8 bits wide(i.e. 32 I/O pins.)
🠶 6 interrupt sources
🠶 Commercially available version of 8051 run on 12 MHz to 18 MHz
Architecture Of 8051
Interrupts
On-chip Etc.
Interrupt On-chip
ROM Timer 0
Control for code RAM Timer 1
CPU
OF 8051 P1.1
P1.2
2
3
39
38
P0.0(AD0)
P0.1(AD1)
P1.3 4 37 P0.2(AD2)
🠶 VCC & VSS
P1.4 5 36 P0.3(AD3)
🠶 RESET P1.5 6 35 P0.4(AD4)
🠶 ALE/PROG P1.6 7 34 P0.5(AD5)
P1.7 8 33 P0.6(AD6)
-It is used for demultiplexing RST P0.7(AD7)
9 32
address and data . EA/VPP
(RXD)P3.0 10 31
-It is valid only for External (TXD)P3.1 11 30 ALE/PROG
memory accesses. (INT0)P3.2 12
8051 29 PSEN
(INT1)P3.3 13 28 P2.7(A15)
🠶 EA/VPP
(T0)P3.4 14 27 P2.6(A14)
- EA/VPP =0 : Execute program on
(T1)P3.5 15 26 P2.5(A13)
external memory.
(WR)P3.6 16 25 P2.4(A12)
-EA/VPP =1 : Execute program on (RD)P3.7 17 24 P2.3(A11)
internal memory. XTAL2 18 23 P2.2(A10)
-Receives 21 v for programming XTAL1 19 22 P2.1(A9)
of the on chip EPROM. VSS 20 21 P2.0(A8)
PIN8051
Pin Configuration P1.0 1 40 VCC
OF 8051 P1.1
P1.2
2
3
39
38
P0.0(AD0)
P0.1(AD1)
P1.3 4 37 P0.2(AD2)
🠶 PSEN P1.4 5 36 P0.3(AD3)
P1.5 6 35 P0.4(AD4)
-Acts as a strobe to read the P1.6 7 34 P0.5(AD5)
external program memory. P1.7 8 33 P0.6(AD6)
-It is low during external program RST 9 32 P0.7(AD7)
(RXD)P3.0 10 31 EA/VPP
memory accesses.
(TXD)P3.1 11 30 ALE/PROG
🠶 Port 0 (P0.0-P0.7) (INT0)P3.2 12
8051 29 PSEN
-8 bit bidirectional bit addressable (INT1)P3.3 13 28 P2.7(A15)
(T0)P3.4 14 27 P2.6(A14)
I/O port.
(T1)P3.5 15 26 P2.5(A13)
- Allotted an address in SFR (WR)P3.6 16 25 P2.4(A12)
address range. (RD)P3.7 17 24 P2.3(A11)
-Act as Multiplexed A/D lines XTAL2 18 23 P2.2(A10)
during external memory access. XTAL1 19 22 P2.1(A9)
VSS 20 21 P2.0(A8)
PIN8051
Pin Configuration P1.0 1 40 VCC
OF 8051 P1.1
P1.2
2
3
39
38
P0.0(AD0)
P0.1(AD1)
P1.3 4 37 P0.2(AD2)
P1.4 5 36 P0.3(AD3)
🠶 Port 1 (P1.0-P1.7) P1.5 6 35 P0.4(AD4)
P1.6 7 34 P0.5(AD5)
-8 bit bidirectional bit addressable P1.7 8 33 P0.6(AD6)
port.
RST 9 32 P0.7(AD7)
- Allotted an address in SFR (RXD)P3.0 10 31 EA/VPP
address range. (TXD)P3.1 11 30 ALE/PROG
(INT0)P3.2 12
8051 29 PSEN
(INT1)P3.3 13 28 P2.7(A15)
🠶 Port 2 (P2.0-P2.7)
(T0)P3.4 14 27 P2.6(A14)
-During external memory, It emits (T1)P3.5 15 26 P2.5(A13)
higher 8 bits of address when (WR)P3.6 16 25 P2.4(A12)
ALE =1 & EA=0 . (RD)P3.7 17 24 P2.3(A11)
-Also receives higher order XTAL2 18 23 P2.2(A10)
address bit during programming of XTAL1 19 22 P2.1(A9)
on chip EPROM. VSS 20 21 P2.0(A8)
PIN8051
Pin Configuration P1.0 1 40 VCC
OF 8051 P1.1
P1.2
2
3
39
38
P0.0(AD0)
P0.1(AD1)
P1.3 4 37 P0.2(AD2)
P1.4 5 36 P0.3(AD3)
🠶 Port 3 (P3.0-P3.7) P1.5 6 35 P0.4(AD4)
P1.6 7 34 P0.5(AD5)
-8 bit bidirectional bit addressable P1.7 P0.6(AD6)
8 33
port. RST P0.7(AD7)
9 32
- Allotted an address in SFR (RXD)P3.0 10 31 EA/VPP
(TXD)P3.1 11 30 ALE/PROG
address range.
(INT0)P3.2 12
8051 29 PSEN
(INT1)P3.3 13 28 P2.7(A15)
🠶 XTAL1 & XTAL2 (T0)P3.4 14 27 P2.6(A14)
(T1)P3.5 15 26 P2.5(A13)
-A Crystal is to be connected (WR)P3.6 16 25 P2.4(A12)
externally between these two pins (RD)P3.7 17 24 P2.3(A11)
to complete the feedback path to XTAL2 18 23 P2.2(A10)
start oscillations. XTAL1 19 22 P2.1(A9)
- Controller can be operated on VSS 20 21 P2.0(A8)
external clock .
The 8051 is a 40 pin device, but out
+5 volts DC.
PSEN, ALE.
through port 0 .
This ALE pin will demultiplex the address and data bus
.When the pin is High , the AD bus will act as address bus