Introduction To Embedded System New
Introduction To Embedded System New
● Consumer electronics – Televisions and digital cameras; computer printers; video game
consoles and home entertainment systems like PS4.
● Household appliances – Refrigerators; washing machines, microwave ovens, air conditioners
● Medical equipment – Scanners like those for MRI, CT; ECG machines; devices to monitor
blood pressure and heartbeat
● Automobiles – Fuel injection systems, anti-lock braking systems, music and entertainment
systems, controls for air-conditioner
● Industrial applications – Assembly lines, systems for feedback, systems for data collection
● Aerospace – Systems for navigation and guidance, GPS
● Communications – Routers, satellite phones
Though Mobile phones use embedded system, they operate in a way akin to general purpose
computers; hence not included in the above list.
● They are convenient for mass production. This results in low price per piece.
● These systems are highly stable and reliable.
● Embedded systems are made for specific tasks.
● The embedded systems are very small in size, hence can be carried and loaded anywhere.
● These systems are fast. They also use less power.
● The embedded systems optimize the use or resources available.
● They improve the product quality.
Disadvantages of Embedded System
The disadvantages of Embedded Systems are as follows:
Architecture Design
The specification does not say how the system does things, only what the system does.
Describing how the system implements those functions is the purpose of the architecture. The
architecture is a plan for the overall structure of the system that will be used later to design
the components that make up the architecture. The creation of the architecture is the first
phase of what many designers think of as design. A sample system architecture in the form of
a block diagram that shows major operations and dataflows among them.
Block Diagram of GPS Moving Map:
Architecture of GPS moving map divided into two block diagrams.
Hardware and Software.
The hardware block diagram clearly shows that we have one central CPU surrounded by
memory and I/O devices. In particular, we have chosen to use two memories: a frame buffer
for the pixels tobe displayed and a separate program/data memory for general use by the
CPU.
The software block diagram fairly closely follows the system block diagram, but we have
added a timer to control when we read the buttons on the user interface and render data onto
the screen. To have a truly complete architectural description, we require more detail, such as
where units in the software block diagram will be executed in the hardware block diagram
and when operations will be performed in time.
Architectural descriptions must be designed to satisfy both functional and non functional
requirements. Not only must all the required functions be present, but we must meet cost,
speed, power, and other nonfunctional constraints. Starting out with a system architecture and
refining that to hardware and software architectures is one good way to ensure that we meet
all specifications.
Processor is the heart of an embedded system. It is the basic unit that takes inputs and
produces an output after processing the data. For an embedded system designer, it is
necessary to have the knowledge of both microprocessors and microcontrollers.
Processors in a System
A processor has two essential units −
● Program Flow Control Unit (CU)
● 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
Processors can be of the following categories −
● General Purpose Processor (GPP)
o Microprocessor
o Microcontroller
o Embedded Processor
o Digital Signal Processor
o Media Processor
● Application Specific System Processor (ASSP)
● Application Specific Instruction Processors (ASIPs)
● GPP core(s) or ASIP core(s) on either an Application Specific Integrated Circuit
(ASIC) or a Very Large-Scale Integration (VLSI) circuit.
Microprocessor
A microprocessor is a single VLSI chip having a CPU. In addition, it may also have other
units such as coaches, floating point processing arithmetic unit, and pipelining units that help
in faster processing of instructions.
Earlier generation microprocessors’ fetch-and-execute cycle was guided by a clock frequency
of order of ~1 MHz. Processors now operate at a clock frequency of 2GHz
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.
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 in nature. Can Single task oriented. For example, a washi
perform multiple tasks at a time. For example, on machine is designed for washing clothes only.
computer we can play music while writing text in text
editor.
RAM, ROM, I/O Ports, and Timers can be added RAM, ROM, I/O Ports, and Timers cannot
externally and can vary in numbers. added externally. These components are to
embedded together on a chip and are fixed
numbers.
Designers can decide the number of memory or I/O Fixed number for memory or I/O makes
ports needed. microcontroller ideal for a limited but specific task
External support of external memory and I/O ports Microcontrollers are lightweight and cheaper than
makes a microprocessor-based system heavier and microprocessor.
costlier.
External devices require more space and their power A microcontroller-based system consumes le
consumption is higher. power and takes less space.
Let us now take a look at the most notable differences between a microprocessor and
microcontroller.
The 8051 microcontrollers work with 8-bit data bus. So they can support external data
memory up to 64K and external program memory of 64k at best. Collectively, 8051
microcontrollers can address 128k of external memory.
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
Hardware It requires more hardware since it In contrast to the Harvard architecture, this
requirements will be requiring separate data and requires less hardware since only a common
address bus for each memory. memory needs to be reached.
Space This requires more space. Von-Neumann Architecture requires less
requirements space.
Space usage It results in wastage of space since if Space is not wasted because the space of
the space is left in the data memory the data memory can be utilized by the
then the instructions memory cannot instructions memory and vice-versa.
use the space of the data memory
and vice-versa.
Controlling Controlling becomes complex since Controlling becomes simpler since either
data and instructions are to be data or instructions are to be fetched at a
fetched simultaneously. time.
C ISC RISC
A large number of instructions are present in the Very fewer instructions are present. The number of instructions
architecture. are generally less than 100.
Some instructions with long execution times. These No instruction with a long execution time due to very simple
include instructions that copy an entire block from one instruction set. Some early RISC machines did not even have an
part of memory to another and others that copy multiple integer multiply instruction, requiring compilers to implemen
registers to and from memory. multiplication as a sequence of additions.
Variable-length encodings of the instructions. Fixed-length encodings of the instructions are used
Example: IA32 instruction size can range from 1 to 15 Example: In IA32, generally all instructions are encoded as 4
bytes. bytes.
Multiple formats are supported for specifying operands. Simple addressing formats are supported. Only base and
A memory operand specifier can have many different displacement addressing is allowed.
combinations of displacement, base and index registers.
Arithmetic and logical operations can be applied to both Arithmetic and logical operations only use register operands
memory and register operands. Memory referencing is only allowed by load and store
instructions, i.e. reading from memory into a register and writing
from a register to memory respectively.
Implementation programs are hidden from machine Implementation programs exposed to machine level programs
level programs. The ISA provides a clean abstraction Few RISC machines do not allow specific instruction sequences.
between programs and how they get executed.
Condition codes are used. No condition codes are used.
The stack is being used for procedure arguments and Registers are being used for procedure arguments and return
return addresses. addresses. Memory references can be avoided by some
procedures.
Software Components
Once the hardware is completed, we need to build the software for the embedded devices.
There are different software tools for programming and coding. These software tools are
referred to as software components.
How is software embedded into a system?
We need a program written in assembly or in embedded c language. And then we compile it.
This compiled code converted into HEX code. This hex code is programmed or burned into
the ROM of the system using some programmer.
These are the tools that are generally used in embedded system development
● Assembler
● Emulator
● Debugger
● Compiler
Assembler
When you program in assembly language. This assembly language program is converted into
the HEX code using this utility. Then using some hardware called as a programmer we write
the chip.
Emulator
An emulator is hardware or software tool that has a similar functionality to the target system
or guest system. It enables the host system to execute the functionality and other components.
It is a replica of the target system. And used for debugging the code and issues.
Once program or code is fixed at the host system. It is transferred to the target system.
Debugger
Sometimes we are not getting expected results or output due to errors or bug. There are
certain tools that are specifically used for the debugging process. Where we can see the
controls flow and register value to identify the issue.
Compiler
A compiler is a software tool that converts one programming language into target code that a
machine can understand. The compiler basically used for translating the high-level language
into the low-level language like machine code, assembly language or object code.