You are on page 1of 20

Chapter 1

Introduction to Embedded Systems


_________________________________________________________
Embedded system:

Definition:
An Embedded system is a combination of computer hardware and software. As
with any electronic system, this system requires a hardware platform and that is
built with a microprocessor or microcontroller. The Embedded system hardware
includes elements like user interface, Input/output interfaces, display and memory,
etc. Generally, an embedded system comprises power supply, processor, memory,
timers, serial communication ports and system application specific circuits.

Advantages:
1) Design and Efficiency
2) Cost
3) Accessibility
4) Maintenance
5) Redundancies

1) Design and Efficiency:


The central processing core in embedded system is generally less complicated,
making it easier to design. The limited function required of embedded system
allows them to design to most efficiently perform their function.

2) Cost:
The streamline make-up of most embedded system allows their parts to be smaller
less expensive to produce.

3) Accessibility:
If something goes wrong with certain embedded systems they can be too
inaccessible to repair. This problem is addressed in the design stage, so by
programming an embedded system. So that it will not affect related system
negatively when malfunctioning.
4) Maintenance:
Embedded systems are easier to maintain because the supplied power is embedded
in the system and does not required remote maintenance.

5) Redundancies:
Embedded system does not involve the redundant programming.

Disadvantages:
1) Difficult to change configurations and features.
2) Issue of scalability
3) Limitation of hardware.
4) Applied for a specific purpose

1)Difficult to change configurations and features: - Once an embedded system


is deployed (or finalized), it will be difficult to change its configuration - both its
hardware and software. Remote update of software is possible provided the
capability is included. Hence, proper requirement analysis is a must before
deployment. Hardware configuration change will be much more trickier which
may require existing boards be completely replaced. I have seen this happen and it
is not pretty.

2)Issue of scalability: Because it is difficult to change configuration, an embedded


system cannot be easily scaled up as demand/scope changes. Said so, embedded
systems can be designed to scale up for example using expansion ports or
networking etc. This means it must be decided before hand during design phase for
scale up provisions.

3)Limitation of hardware: With a limited memory or computing capability in


most embedded systems, there is always a limitation (or an upper limit) on our
software design(upgrade). Be always aware of "Memory" and "Speed".

4)Applied for a specific purpose: By definition, embedded systems are


constrained in their objectives. If it is decided to "rehash" an existing embedded
system for a completely different purpose, it will normally result in significant
change(s) in either or both its hardware or/and software.
Block Diagram of Embedded System :

OR
Processor:
The processor is the heart of embedded system. The selection of processor is based
on the following consideration
1. Instruction set
2. Maximum bits of operation on single arithmetic and logical operation
3. Speed
4. Algorithms processing and capability
5. Types of processor( microprocessor, microcontroller, digital signal processor,
application specific processor, general purpose processor)

Power source:
Internal power supply is must. It require from power up to power down to start
time task. Also it can run continuously that is stay “On‟ system consumes total
power hence efficient real time programming by using proper „wait‟ and „stop‟
instruction or disable some unit which are not in use can save or limit power
consumption.

Clock / oscillator Circuits:


The clock ckt is used for CPU, system timers, and CPU machine cycles clock
controls the time for executing an instruction. Clock oscillator may be internal or
external .It should be highly stable.

Real time clock(RTC):


It require to maintain scheduling various tasks and for real time programming RTC
also use for driving timers, counters needs in the system.

Resets Ckts and power on reset:


Reset process starts executing various instructions from the starting address. The
address is set by the processor in the program counter. The reset step resent and
runs the program in the following way
1. System program that execute from beginning
2. System boot up program
3. System initialization program

Memories:
8051 Microcontroller:

8051 microcontroller is an 8-bit family of microcontroller is developed by the Intel


in the year 1981. This is one of the popular families of microcontroller are being
used all across the world. This microcontroller was moreover referred as “system
on a chip” since it has 128 bytes of RAM, 4Kbytes of a ROM, 2 Timers, 1 Serial
port, and 4 ports on a single chip. The CPU can also work for 8bits of data at a
time since 8051 is an 8-bit processor. In case the data is bigger than 8 bits, then it
has to be broken into parts so that the CPU can process easily. Most manufacturers
contain put 4Kbytes of ROM even though the number of ROM can be exceeded up
to 64 K bytes.

PIC Microcontroller:

Peripheral Interface Controller (PIC) is microcontroller developed by a


Microchip, PIC microcontroller is fast and simple to implement program when we
contrast other microcontrollers like 8051. The ease of programming and simple to
interfacing with other peripherals PIC become successful microcontroller.
We know that microcontroller is an integrated chip which is consists of RAM,
ROM, CPU, TIMER and COUNTERS. The PIC is a microcontroller which as well
consists of RAM, ROM, CPU, timer, counter, ADC (analog to digital converters),
DAC (digital to analog converter). PIC Microcontroller also support the protocols
like CAN, SPI, UART for an interfacing with additional peripherals. PIC mostly
used to modify Harvard architecture and also supports RISC (Reduced Instruction
Set Computer) by the above requirement RISC and Harvard we can simply that
PIC is faster than the 8051 based controllers which is prepared up of Von-Newman
architecture.

AVR Microcontroller:

AVR microcontroller was developed in the year of 1996 by Atmel Corporation.


The structural design of AVR was developed by the Alf-Egil Bogen and Vegard
Wollan. AVR derives its name from its developers and stands for Alf-Egil Bogen
Vegard Wollan RISC microcontroller, also known as Advanced Virtual RISC. The
AT90S8515 was the initial microcontroller which was based on the AVR
architecture, though the first microcontroller to hit the commercial market was
AT90S1200 in the year 1997.

AVR Microcontrollers are Available in three Categories

TinyAVR: Less memory, small size, appropriate just for simpler applications
MegaAVR: These are the mainly popular ones having a good quantity of memory
(up to 256 KB), higher number of inbuilt peripherals and appropriate for modest to
complex applications.
XmegaAVR: Used in commercial for complex applications, which need large
program memory and high speed.
ARM Processor:

An ARM processor is also one of a family of CPUs based on the RISC (reduced
instruction set computer) architecture developed by Advanced RISC Machines
(ARM).

An ARM makes at 32-bit and 64-bit RISC multi-core processors. RISC processors
are designed to perform a smaller number of types of computer instructions so that
they can operate at a higher speed, performing extra millions of instructions per
second (MIPS). By stripping out unnecessary instructions and optimizing
pathways, RISC processors give outstanding performance at a part of the power
demand of CISC (complex instruction set computing) procedure.

ARM processors are widely used in customer electronic devices such as smart
phones, tablets, multimedia players and other mobile devices, such as wearables.
Because of their reduced to instruction set, they need fewer transistors, which
enable a smaller die size of the integrated circuitry (IC). The ARM processors,
smaller size reduced difficulty and lower power expenditure makes them suitable
for increasingly miniaturized devices.
Features of 8051, PIC, AVR and ARM Microcontrollers:

Parameters 8051 PIC AVR ARM


32-bit mostly also
8-bit for standard
8/16/32-bit 8/32-bit available in 64-
Bus width core
bit

UART, USART,
UART, USART,
PIC, UART, LIN, I2C, SPI,
SPI, I2C,
USART, CAN, USB,
UART, (special purpose
Communication LIN, CAN,
USART,SPI,I2C AVR support Ethernet, I2S,
Protocols Ethernet, SPI,
CAN, USB, DSP, SAI (serial
I2S
Ethernet) audio
interface), IrDA
12 4 1
1 clock/
Clock/instruction Clock/instruc clock/ instructio
Speed instruction cycle
cycle tion cycle n cycle

ROM, SRAM, FL SRAM, Flash, SRAM, Flash, SDRAM,


Memory ASH FLASH EEPROM EEPROM

Some feature
CLSC RISC RISC
ISA of RISC

Von Neumann Harvard Modified Harvard


Memory Modified
architecture architecture architecture
Architecture
Power Average Low Low Low
Consumption
PIC16,PIC17
Tiny, Atmega,
, PIC18, ARMv4,5,6,7 and
8051 variants Xmega, special
Families PIC24, series
purpose AVR
PIC32

Vast Very Good Very Good Vast


Community
Apple, Nvidia,
NXP, Atmel,
Qualcomm,
Silicon Labs, Microchip
Atmel Samsung
Manufacturer Dallas, Cyprus, Average
Electronics, and
Infineon, etc.
TI etc.

Cost (as
compared to Very Low Average Average Low
features provide)

High speed
operation
Known for its
Cheap Cheap, effective Vast
Other Feature Standard

LPC2148, ARM
PIC18fXX8, Atmega8, 16,
AT89C51, Cortex-M0 to
Popular PIC16f88X, 32, Arduino
P89v51, etc. ARM Cortex-M7,
Microcontrollers PIC32MXX Community
etc.
Types of Embedded System:

1. Stand Alone Embedded Systems


 Stand-alone embedded systems do not require a host system like a computer,
it works by itself.
 It takes the input from the input ports either analog or digital and processes,
calculates and converts the data and gives the resulting data through the
connected device-Which either controls, drives or displays the connected
devices.
 Examples for the stand alone embedded systems are mp3 players, digital
cameras, video game consoles, microwave ovens and temperature
measurement systems.

2. Real Time Embedded Systems


 A real time embedded system is defined as, a system which gives a required
o/p in a particular time.
 These types of embedded systems follow the time deadlines for completion
of a task. Real time embedded systems are classified into two types such as
soft and hard real time systems.

3. Networked Embedded Systems


 These types of embedded systems are related to a network to access the
resources. 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 embedded
system applications. The embedded web server is a type of system wherein
all embedded devices are connected to a web server and accessed and
controlled by a web browser.
 Example for the LAN networked embedded system is a home security
system wherein all sensors are connected and run on the protocol TCP/IP.
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 of these devices is the other resources
and limitation of memory.

5. Small Scale Embedded Systems


 These types of embedded systems are designed with a single 8 or 16-bit
microcontroller that may even be activated by a battery. For developing
embedded software for small scale embedded systems, the main
programming tools are an editor, assembler, cross assembler and integrated
development environment (IDE).

6. Medium Scale Embedded Systems


 These types of embedded systems design with a single or 16 or 32 bit
microcontroller, RISCs or DSPs. These types of embedded systems have
both hardware and software complexities.
 For developing embedded software for medium scale embedded systems, the
main programming tools are C, C++, and JAVA, Visual C++, and RTOS,
debugger, source code engineering tool, simulator and IDE.

7. Sophisticated Embedded Systems


 These types of embedded systems have enormous hardware and software
complexities, that may need ASIPs, IPs, PLAs, scalable or configurable
processors. They are used for cutting edge applications that need hardware
and software Co-design and components which have to assemble in the final
system.
Applications of Embedded Systems:
Embedded systems are used in different applications like automobiles,
telecommunications, smart cards, missiles, satellites, computer networking and
digital consumer electronics.

1. Embedded Systems in Automobiles and in telecommunications


 Motor and cruise control system
 Body or Engine safety
 Entertainment and multimedia in car
 E-Com and Mobile access
 Robotics in assembly line
 Wireless communication
 Mobile computing and networking
2. Embedded Systems in Smart Cards, Missiles and Satellites
 Security systems
 Telephone and banking
 Defense and aerospace
 Communication
3. Embedded Systems in Peripherals & Computer Networking
 Displays and Monitors
 Networking Systems
 Image Processing
 Network cards and printers

4. Embedded Systems in Consumer Electronics


 Digital Cameras
 Set top Boxes
 High Definition TVs
 DVDs
Characteristics of an Embedded System :

1. Processing Power: Selection of processor is based on the amount of


processing power to get the job done and also on the basis of register width
required.
2. Throughput: The system may need to handle a lot of data in a shirt time.
3. Response: The system has to react to the changing events quickly.
4. Memory: Hardware design must make the best estimate of the memory
requirement and must make the provision for expansion.
5. Power consumption: Systems generally work on battery and design of
both software and hardware must take care of power saving techniques.
6. Number of units: The number of units expected to be produced and sold
will dictate the trade-off between production cost and development cost.
7. Expected life-time: Design decisions like selection of components to
system development cost will depend upon on how long the system is
expected to run.
8. Program Installation: Installation of software on to the embedded
system needs special development tools.
9. Testability and Debug ability: Setting up test conditions and equipment
will be difficult and determining what is wrong with the software will
become a difficult task without a keyboard and usual display.
10 Reliability: It is always required that the system designed must give the
output for which it is designed.
Software development tools used in an embedded system :
 Compiler
 Cross assembler
 Cross compiler
 Locators
 Loaders
 Simulators
 Debugger
 Integrated development environment (IDE)

Explanation :

Compiler:
It is a computer program that transforms the source code written in a programming
or source language into another computer language i.e. target language i.e. binary
code known as object code.

Cross assembler:
It is useful to convert object codes for microcontrollers or processor to other codes
for another microcontrollers or processor and vice versa.

Cross compiler:
It is used to create executable code other than one on which the compiler is run.
They are used to generate executable for embedded systems or multiple platforms.

Linker/Locator:
 It is used for relocation process.
 It is done during compilation also it can be done at run time by a relocating
loader.
 It is a program that takes one or more objects generated by compiler and
combines them into a single executable program.

Simulators:
 A simulator is the s/w that simulates an h/w unit like emulator, peripheral,
network and I/O devices on a PC.
 It defines a processor or processing device as well as various versions for the
target system.
 Monitors the detailed information of as source code part with labels and
symbols during the execution for each single step.
 Provides the detailed information of the status of memory RAM and
simulated ports, simulated peripheral devices of the defined target system.
Integrated Development Environment (IDE):
An IDE is a software application that provides comprehensive facilities to
computer programmers for software development. An IDE consists of:
 A source code editor.
 A compiler and or interpreter.
 Build automation tools.
 A debugger.

IDE is dedicated to a specific programming language, allowing a feature set that


most closely matches the programming paradigms [model] of the language. IDE‟s
typically present a single program in which all development is done. This program
typically provides many features for authoring, modifying, compiling, deploying,
and debugging software.
Hardware development tools used in an embedded system:
Design matrices of an embedded system:

Processor power-
 Selection of the processor is based on the amount of processing power to get
the job done and the register width required.
 8 bit, 16 bit, 32 bit and 64 bit microcontrollers are provided.
 Processing power is different for different microcontrollers.
 High clock, speed and addressing capable microcontrollers are available.
 Very powerful DSPS are available for real time analysis of audio and video
signals.

Memory-
 Designer has to make an estimate of the memory requirement and must
make provision for expansion.
 In a system, there are different types of memories : RAM, ROM, EPROM,
PROM, etc.
 Secondary storage devices like HDD can be embedded into the system like
mobile.
 Flash memory can be used instead of secondary memory. Hence, we can
load NT in embedded system. E.g. Embedded Linux OS can be loaded into
wristwatches.

Operating system-
 In desktop, the selection of O.S. is limited.
 In embedded system, a variety of operating systems are available which can
be ported into the embedded system.
 It is categorized as follows : Embedded OS, real time OS and mobile OS.
These operating systems occupy less area in memory than desktop.
 For real time applications, we should use real time OS.
 We can develop our own OS kernel.
 We can use open source OS like Linux. This OS is free and can be
customized.
Reliability:
 Embedded system often reside in machines that are expected to run
continuously for years without errors and in some cases recover by
themselves, if an error occurs.
 So, the software is usually developed and tested more carefully than that for
personal computers and unreliable moving parts such as disk drives,
switches or buttons are avoided.

Unit cost:
 The monetary cost of manufacturing each copy of the system, excluding
NRE cost.
NRE cost:
 The monetary cost of designing the system. Once the system is designed,
any number of units can bemanufactured without incurring any additional
design cost (hence the term “non-recurring”).

Size:
 The physical space required by the system, often measured in bytes for
software, and gates or transistors for hardware.

Performance:
 The execution time or throughput of the system.

Power:
 The amount of power consumed by the system, which determines the
lifetime of a battery, or the cooling requirements of the IC, since more power
means more heat.

Flexibility:
 The ability to change the functionality of the system without incurring heavy
NRE cost. Software is typically considered very flexible.

Time to market:
 The amount of time required to design and manufacture the system to the
point the system can be sold to customers.

Time to prototype:
 The amount of time to build a working version of the system, which may be
bigger or more expensive than the final system implementation, but can be
used to verify the system‟s usefulness and correctness and to refine the
system‟s functionality.

Correctness:
 Our confidence that we have implemented the system‟s functionality
correctly. We can check the functionality throughout the process of
designing the system and we can insert test circuitry to check that
manufacturing was correct.
Safety:

 The probability that the system will not cause harm.


Comparison of RISC and CISC architecture :
Differentiate between Harvard and Von Neumann architecture:

Comparision between assembly language program with an embedded C :

You might also like