0% found this document useful (0 votes)
19 views29 pages

Embedded System 03

The document provides an overview of embedded systems, detailing the differences between microprocessors and microcontrollers, as well as their applications in real-time operations. It explains the architecture types (Von Neumann and Harvard), the distinctions between CISC and RISC, and the tools used for development and debugging. Additionally, it outlines criteria for selecting microcontrollers based on specifications such as speed, power consumption, and cost.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views29 pages

Embedded System 03

The document provides an overview of embedded systems, detailing the differences between microprocessors and microcontrollers, as well as their applications in real-time operations. It explains the architecture types (Von Neumann and Harvard), the distinctions between CISC and RISC, and the tools used for development and debugging. Additionally, it outlines criteria for selecting microcontrollers based on specifications such as speed, power consumption, and cost.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Embedded System

LEC #03

© Dr. Ahmed Mahrous


Embedded system hardware
Embedded system hardware can be microprocessor- or microcontroller-
based. In either case, an integrated circuit is at the heart of the product
that is generally designed to carry out computation for real-time
operations.
Microprocessors are visually indistinguishable from microcontrollers,
but while the microprocessor only implements a central processing unit
(CPU) and, thus, requires the addition of other components such as
memory chips, microcontrollers are designed as self-contained systems.
Microcontrollers include not only a CPU, but also memory and
peripherals such as flash memory, RAM or serial communication ports.
Embedded system hardware
Because microcontrollers tend to implement full (if relatively low
computer power) systems, they are frequently put to use on more
complex tasks. For example, microcontrollers are used in the operations
of vehicles, robots, medical devices and home appliances, among
others.
At the higher end of microcontroller capability, the term system on a
chip (SoC) is often used, although there's no exact delineation in terms
of RAM, clock speed and so on.
Embedded system firmware and software
The firmware on embedded systems, referred to as embedded
firmware, is specific software written into the memory of a device that
serves the purpose of ROM, but can be updated more easily.
Firmware can be stored in non-volatile memory devices including
ROM, programmable ROM, or erasable PROM.
Embedded firmware is used to control various device and system
functions, for example, telling the device how to communicate with
other devices, perform specific functions and provide input and output
functionality.
Embedded system firmware and software
The delineation between the terms embedded firmware and embedded
software are blurring, but embedded software often refers to the only
code running on a piece of hardware, while firmware can also refer to
the chip that houses a device's basic input/output system (BIOS) or
Unified Extensible Firmware Interface (UEFI), which connect software
and a system's operating system.
Embedded systems vs. VLSI
Very-large-scale integration, or VLSI, is a term that describes the
complexity of an integrated circuit. VLSI is the process of embedding
hundreds of thousands of transistors into a chip, whereas LSI (large-
scale integration) microchips contain thousands of transistors, MSI
(medium-scale integration) contain hundreds of transistors, and SSI
(small-scale integration) contain tens of transistors. ULSI, or ultra-large-
scale integration, refers to placing millions of transistors on a chip.
VLSI circuits are common features of embedded systems.
Processors in a System
A processor has two essential units:
1. Program Flow Control Unit (CU)
2. Execution Unit (EU)
The CU includes a fetch unit for fetching instructions from the memory.
The EU has circuits that implement the instructions pertaining to data
transfer operation and data conversion from one form to another.
The EU includes the Arithmetic and Logical Unit (ALU) and also the
circuits that execute instructions for a program control task such as
interrupt, or jump to another set of instructions.
A processor runs the cycles of fetch and executes the instructions in the
same sequence as they are fetched from memory.
Types of Processors
1. General Purpose Processor (GPP)
A. Microprocessor
B. Microcontroller
C. Embedded Processor
D. Digital Signal Processor
E. Media Processor
2. Application Specific System Processor (ASSP)
3. Application Specific Instruction Processors (ASIPs)
Microprocessor
A microprocessor is a single VLSI chip having a CPU. In addition, it may
also have other units such as floating point processing arithmetic unit,
and pipelining units that help in faster processing of instructions.
Microcontroller
A microcontroller is a single-chip VLSI unit (also called microcomputer)
which, although having limited computational capabilities, possesses
enhanced input/output capability and a number of on-chip functional
units.
1. CPU 2. RAM 3. ROM
4. I/O Port 5. Timer 6. Serial COM Port
Microcontrollers are particularly used in embedded systems for real-
time control applications with on-chip program memory and devices.
Microprocessor vs Microcontroller
Microprocessor Microcontroller
Microprocessors are multitasking Single task oriented. For example,
in nature. Can perform multiple a washing machine is designed for
tasks at a time. For example, on washing clothes only.
computer we can play music while
writing text in text editor.

RAM, ROM, I/O Ports, and Timers RAM, ROM, I/O Ports, and Timers
can be added externally and can cannot be added externally. These
vary in numbers. components are to be embedded
together on a chip and are fixed in
numbers.
Microprocessor vs Microcontroller
Microprocessor Microcontroller
Designers can decide the number Fixed number for memory or I/O
of memory or I/O ports needed. makes a microcontroller ideal for a
limited but specific task.
External support of external Microcontrollers are lightweight
memory and I/O ports makes a and cheaper than a
microprocessor-based system microprocessor.
heavier and costlier.

External devices require more A microcontroller-based system


space and their power consumes less power and takes
consumption is higher. less space.
Embedded Systems - Architecture Types
When data and code lie in different memory blocks, then the
architecture is referred as Harvard architecture. In case data and code
lie in the same memory block, then the architecture is referred as Von
Neumann architecture.

Von Neumann Architecture


The Von Neumann architecture was first proposed by a computer
scientist John von Neumann. In this architecture, one data path or bus
exists for both instruction and data. As a result, the CPU does one
operation at a time. It either fetches an instruction from memory, or
performs read/write operation on data. So an instruction fetch and a
data operation cannot occur simultaneously, sharing a common bus.
Embedded Systems - Architecture Types
Von Neumann Architecture
Embedded Systems - Architecture Types
Harvard architecture.
The Harvard architecture offers separate storage and signal buses for
instructions and data. This architecture has data storage entirely
contained within the CPU, and there is no access to the instruction
storage as data. Computers have separate memory areas for program
instructions and data using internal data buses, allowing simultaneous
access to both instructions and data.

Programs needed to be loaded by an operator; the processor could not


boot itself. In a Harvard architecture, there is no need to make the two
memories share properties.
Embedded Systems - Architecture Types
Harvard architecture.
Embedded Systems - Architecture Types
Von-Neumann Architecture Harvard Architecture
Single memory to be shared by Separate memories for code and
both code and data. data.
Processor needs to fetch code in a Single clock cycle is sufficient, as
separate clock cycle and data in separate buses are used to access
another clock cycle. So it requires code and data.
two clock cycles.
Slower in speed, thus more time- Higher speed, thus less time
consuming. consuming.

Simple in design. Complex in design.


CISC vs RISC
Complex Instruction Set Computer Reduced Instruction Set Computer
CISC RISC
Larger set of instructions. Easy to Smaller set of Instructions. Difficult
program to program.

Simpler design of compiler, Complex design of compiler.


considering larger set of
instructions.

Many addressing modes causing Few addressing modes, fix


complex instruction formats. instruction format.
.
CISC vs RISC
Complex Instruction Set Computer Reduced Instruction Set Computer
CISC RISC
Slower execution, as instructions Faster execution, as each
are to be read from memory and instruction is to be executed by
decoded by the decoder unit. hardware.
Pipelining is not possible. Pipelining of instructions is
possible, considering single clock
cycle.
Embedded Systems - Tools
Compiler
A compiler is a computer program (or a set of programs) that transforms
the source code written in a programming language (the source
language) into another computer language (normally binary format).
The most common reason for conversion is to create an executable
program. The name "compiler" is primarily used for programs that
translate the source code from a high-level programming language to a
low-level language (e.g., assembly language or machine code).
Embedded Systems - Tools
Cross-Compiler
If the compiled program can run on a computer having different CPU or
operating system than the computer on which the compiler compiled
the program, then that compiler is known as a cross-compiler.

Decompiler
A program that can translate a program from a low-level language to a
high-level language is called a decompiler.

Language Converter
A program that translates programs written in different high-level
languages is normally called a language translator, source to source
translator, or language converter.
Embedded Systems - Tools
Assemblers
An assembler is a program that takes basic computer instructions (called
as assembly language) and converts them into a pattern of bits that the
computer's processor can use to perform its basic operations. An
assembler creates object code by translating assembly instruction
mnemonics into opcodes, resolving symbolic names to memory
locations. Assembly language uses a mnemonic to represent each low-
level machine operation (opcode).
Debugging Tools in an Embedded System
Debugging is a process used to find and reduce the number of bugs in a
computer program or a piece of electronic hardware, so that it works as
expected.
1. Simulators
2. Microcontroller starter kits
Debugging Tools in an Embedded System
Simulators
Code is tested for the MCU / system by simulating it on the host
computer used for code development. Simulators try to model the
behavior of the complete microcontroller in software.
Functions of Simulators
- Defines the processor or processing device family as well as its various
versions for the target system.
- Monitors the detailed information of a source code part with labels
and symbolic arguments as the execution goes on for each single step.
- Provides the status of RAM and simulated ports of the target system
for each single step execution.
Debugging Tools in an Embedded System
- Monitors system response and determines throughput.
- Provides trace of the output of contents of program counter versus the
processor registers.
- Provides the detailed meaning of the present command.
- Monitors the detailed information of the simulator commands as
these are entered from the keyboard or selected from the menu.
- Supports the conditions (up to 8 or 16 or 32 conditions) and
unconditional breakpoints.
- Provides breakpoints and the trace which are together the important
testing and debugging tool.
- Facilitates synchronizing the internal peripherals and delays.
Debugging Tools in an Embedded System
Microcontroller Starter Kit
A microcontroller starter kit consists of −
- Hardware board (Evaluation board)
- In-system programmer
- Some software tools like compiler, assembler, linker, etc.

A big advantage of these kits over simulators is that they work in real-
time and thus allow for easy input/output functionality verification.
Starter kits, however, are completely sufficient and the cheapest option
to develop simple microcontroller projects.
Debugging Tools in an Embedded System
Microcontroller Starter Kit
Criteria for Choosing Microcontroller
While choosing a microcontroller, make sure it meets the task at hand
and that it is cost effective.
Number of Bits - We must see whether an 8-bit, 16-bit or 32-bit
microcontroller can best handle the computing needs of a task.
Speed − What is the highest speed the microcontroller can support?
Packaging − Is it 40-pin DIP (Dual-inline-package) or QFP (Quad flat
package)? This is important in terms of space, assembling, and
prototyping the end-product.
Power Consumption − This is an important criteria for battery-powered
products.
Criteria for Choosing Microcontroller
Amount of RAM and ROM on the chip.
Count of I/O pins and Timers on the chip.
Cost per Unit − This is important in terms of final cost of the product in
which the microcontroller is to be used.

Further, make sure you have tools such as compilers, debuggers, and
assemblers, available with the microcontroller. The most important of
all, you should purchase a microcontroller from a reliable source.

You might also like