Embedded Systems
By
Dr Suman Nelaturi
Department of ECE
NIT Kurukshetra
Embedded System
System
System is a Way of working organizing or doing one or many tasks
according to a fixed plan program or set of rules.
A System is also an arrangement in which all units assemble and
work together according to the plan or program.
Embedded System
An Embedded System is a system that has Embedded Software
and Computer hardware which makes it a system dedicated for an
application(s) or specific part of an application or product or a
part of larger system
Wayne wolf author of Computers as Components:
It is any device that includes a programmable computer but is not
itself intended to be a general purpose computer and a fax
machine or a clock built from a microprocessor is an embedded
computing system
Embedded System
Todd D Morton author of Embedded Microcontrollers:
Embedded Systems are electronic systems that contain a
microprocessor or microcontroller but we do not think of them as
computers- the computer is hidden or embedded in the system.
David E Simon author of An Embedded Software primer :
People use the term embedded system to mean any computer
system hidden in any of these products.
Embedded System
W Tim author of An Introduction to the Design of Small Scale
Embedded Systems with examples from PIC, 80C51 and
68HC05/08 microcontrollers
An Embedded System is a system whose principal function is not
computational but which is controlled by a computer embedded
within it.
The Computer is likely to be a Microprocessor or Microcontroller.
The word Embedded implies that it lies inside the overall system
hidden from view forming an integral part of greater whole
Embedded System
W Tim author of An Introduction to the Design of Small Scale
Embedded Systems with examples from PIC, 80C51 and
68HC05/08 microcontrollers
An Embedded System is a Microcontroller based software driven
reliable real time control system autonomous or human or
network interactive operating on diverse physical variables and in
diverse environments and sold into a competitive and cost
conscious market.
Embedded System
The Components of Embedded System Hardware
Embedded System
A Computer is a system that has the following or more
components.
1. A Microprocessor
2. A large memory of the following two kinds:
(a) Primary memory (Semi conductor memories: Random
Access Memory (RAM), Read Only Memory (ROM) and fast
accessible caches)
(b) Secondary Memory (Magnetic Memory located in hard
disks, diskettes and cartridge tapes optical memory in
CDROMs or memory sticks (in mobile computers) using
which different user programs can be loaded into the primary
memory and run
3. I/O units such as touch screen modem fax cum modem
4. Input units such as keyboard mice digitizer scanner
5. Output Units such as an LCD screen video monitor printer
Embedded System
A Computer is a system that has the following or more
components.
6. Networking units such as an Ethernet card front end processor
based server bus drivers
7. An Operating System (OS) that has general purpose user and
application software in the secondary memory
Embedded System
An Embedded System is a system that has 3 main components
embedded into it:
1. It embeds hardware similar to a computer (units shown in the
diagram), As its software usually embeds in the ROM or flash
memory it usually do not need a secondary hard disk and CD
memory as in a computer.
2. It embeds main application software. The application software
may concurrently perform a series of tasks or processes or
threads
3. It embeds a real time operating system (RTOS) that supervises
the application software running on hardware and organizes
access to a resource according to the priorities of tasks in the
system. It provides a mechanism to let the processor run a
process as scheduled and context switch between the various
processes.
Embedded System
Characteristics:
An Embedded System is characterized by the following
1. Real Time and Multi rate operations
2. Complex Algorithms
3. Complex GUIs and other user interfaces
4. Dedicated functions
Embedded System
Constraints:
An Embedded System is characterized by the following
1. Available System memory
2. Available processor speed
3. The need to limit power dissipation when running the system
continuously in cycles of wait for events run stop wake up
and sleep
The system design or an embedded system has constraints with
regard to performance power size and design and manufacturing
costs.
Processor Embedded into a System
Embedded Processors in a System
A Processor has two essential units:
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
operations and data conversion from one form to another.
The EU includes the ALU and also the circuits that execute instructions for a
program control task say halt interrupt or jump to another set of instructions.
It can also execute instructions for a call or branch to another program and for a
call to a function.
Processor Embedded into a System
An Embedded System Processor chip or core can be one of the
following
1. General Purpose Processor (GPP)
2. Application Specific Instruction Set Processor (ASIP)
3. Single Purpose Processors as additional processors
4. GPP or ASIP cores integrated into either an ASIC or a VLSI
circuit or FPGA core integrated with processor units in a VLSI
(ASIC) chip.
5. Application Specific System Processor (ASSP)
6. Multicore Processors or multiprocessor
Processor Embedded into a System
For a system designer the following are important considerations
when selecting a processor:
1. Instruction set
2. Maximum bits in an operand in a single arithmetic or logical
operation
3. Clock frequency in MHz and processing speed in MIPS
(Million Instructions per second)
4. Processor ability to solve complex algorithms while meeting
deadline for their processing
Processor Embedded into a System
Microprocessor 8086 Architecture
Processor Embedded into a System
Microcontroller 8051 Architecture
Processor Embedded into a System
Microcontroller 8051 Architecture
Processor Embedded into a System
Single Purpose Processors
Commonly used Microcontrollers in Small medium and large scale Embedded Systems
Processor Embedded into a System
Single Purpose Processors
Single Purpose Processors used in embedded systems include
1. Coprocessor
2. Graphics Processor (for ex. Floating point processing)
3. Pixel Coprocessor
4. Encryption Engine
5. Decryption Engine
6. A Discrete Cosine Transformation (DCT) and (DCIT)
7. Protocol stack processor
8. Network Processor
9. Accelerator
10. CODEC
11. JPEG CODEC
12. MPEG CODEC
13. Controller (peripheral, DMA)
Embedded Hardware Units and Devices in a system
Power Source
Clock Oscillator circuit and clocking units
System Timers and Real Time clocks
Reset circuit power up reset and watchdog timer reset
Memory
Input output and IO ports IO Buses and IO interfaces
DAC using a PWM and an ADC
LCD, LED and Touchscreen Displays
Keypad/ Keyboard
Pulse Dialer Modem and Transceiver
Interrupt Handler
Memory
Various forms of memories in the system
Memory
Functions assigned to the memories in a system
Embedded Software in a system
Final Machine Implantable Software for a system
Coding of Software in Machine Codes
Software in processor Specific Assembly Language
Software in High Level Language
Program models for software designing
Software for concurrent processing and scheduling of multiple tasks
And ISRs using an RTOS
Software for device drivers and device management in an operating system
Software tools for designing an embedded system
Embedded Software in a system
Software in High Level Language
The process of converting a C program
into the file for ROM image
Different program layers in
the embedded software in C
Embedded Software in a system
Software tools required in exemplary systems
Embedded System on Chip (SoC) and Use
of VLSI Circuit Design Technology
A SoC may be embedded with the following components:
1. Embedded Processor GPP or ASIP Core
2. Single purpose processing cores or multiple processors
3. A network bus protocol core
4. An encryption function unit
5. DCT for Signal Processing applications
6. Memories
7. Multiple standard source solutions called IP cores
8. Programmable logic device and FPGA cores
9. Other logic and analog units
Embedded System on Chip (SoC) and Use
of VLSI Circuit Design Technology
An exemplary application of such an embedded SoC is the mobile phone.
Single purpose processors
ASIPs and IPs on an SoC are configured to process encoding and
deciphering,
Dialing
Modulating
Demodulating
Interfacing the keypad and multiple line LCD matrix displays or touch
screen
Storing data input and recalling data from memory
Embedded System on Chip (SoC) and Use
of VLSI Circuit Design Technology
Embedded System on Chip (SoC) and Use
of VLSI Circuit Design Technology
ASIC
IP Core
FPGA Core with single or multiple processors
Embedded System on Chip (SoC) and Use
of VLSI Circuit Design Technology
ASIC
ASICs are designed using the VLSI design tools with the
processor GPP or ASIP and analog circuits embedded into the
design.
The designing is done using the EDA tool.
Embedded System on Chip (SoC) and Use
of VLSI Circuit Design Technology
IP Core
On a VLSI chip, there may be integration of high level components.
These components possess gate level sophistication in circuits above that of the
counter, register,
Multiplier, floating point operation unit and ALU.
A standard source solution for synthesizing a high level component by
configuring an FPGA core or a core of VLSI circuit may be available as an
Intellectual Property called IP.
The designer or the designing company holds the copyright for the synthesized
design of a higher level component for gate level implementation of an IP.
One might have to pay royalty for every chip shipped.
Embedded System on Chip (SoC) and Use
of VLSI Circuit Design Technology
IP Core
An Embedded System may incorporate several IPs:
1. An IP may provide hardwired implantable design of a transform,
an encryption algorithm or a deciphering algorithm.
2. An IP may provide a design for adoptive filtering of a signal.
3. An IP may provide a design for implementing HTTP or FTP or
Bluetooth protocol to transmit a web page or a file on the
internet.
4. An IP may be designed for a USB or PCI bus controller.
Embedded System on Chip (SoC) and Use
of VLSI Circuit Design Technology
FPGA Core with Single or Multiple Processors
Virtex-II Pro and Virtex-II Pro X Platform FPGAs
XC2VP125.
It has 125136 logic cells in the FPGA core with 4
IBM power PCs.
It has been used as a data security solution with
encryption engine and data rate of 1.5 Gbps.
Other examples are Embedded systems integrated
with logic FPGA arrays are DSP enabled real time
video processing systems.
Examples of Embedded Systems
Examples of Embedded Systems- Small Scale
1. Point of sales terminals: automatic chocolate vending machine
2. Stepper motor controllers for a robotic system
3. Washing or cooking systems
4. Multitasking toys
5. Microcontroller based single or multi display digital panel meter for voltage current
resistance and frequency
6. Keyboard controller
7. SD, MMI network access cards
8. CD drive or hard disk drive controller
9. The peripheral controllers of a computer CRT display controller, a keyboard
controller, DRAM controller, DMA controller, a printer controller, LAN controller
10. Fax or photocopy or printer or scanner machine
11. Remote of TV
12. Telephone with memory, display and other sophisticated features
13. Motor control systems accurate control of speed and position of the dc motor
14. Electronic data acquisition and supervisory control system
15. Electronic instruments industrial process controller
16. Electronic smart weight display system
17. Digital storage system for a signal wave form or for electric or water meter reading
18. Spectrum analyzer
19. Biomedical systems such as ECG LCD display cum recorder a blood cell recorder
cum analyzer and a patient monitor system
Examples of Embedded Systems- Medium
1. Computer networking system, A router
2. For internet appliances
3. Entertinement systems such as video game and a music system
4. Banking systems
5. Signal tracj=king systes
6. Communication systems
7. Image filtering, image processing
8. Video games
9. A system that connects to a remote server for internet
10. A personal information manager
11. Thin client
12. Embedded firewall/ router using ARM7
Examples of Embedded Systems- Sophisticated
1. Mobile Smart phones and computing systems
2. Mobile computer
3. Embedded systems for wireless LAN and for convergent technology devices
4. ES for video interactive video broadband IPv6
5. Embedded interface and networking systems using high speed ultra high speed
6. Security products and high speed network security
Automatic Chocolate Vending Machine (ACVM)
1. Abstraction
2. Hardware and Software Architectures
3. Extra Functional properties
4. System related family of designs
5. Modular Design
6. Mapping
Automatic Chocolate Vending Machine (ACVM)
1. Abstraction:
Diagrammatic representation of the ACVM
Automatic Chocolate Vending Machine (ACVM)
1. Abstraction:
ACVM hardware components are abstracted as follows:
Keypad on the top of the machine
LCD display unit on the top of the machine
Coin insertion slot
Delivery slot
Internet connection port
ACVM software is abstracted as consisting of two units:
Embedded application software
RTOS
Automatic Chocolate Vending Machine (ACVM)
2. Hardware and Software Architectures:
Architectures should be well understood before a design.
Hardware architecture is considered as consisting of the following interconnected
components:
Microcontroller
RAM for storing temporary variables and stack
ROM for application codes and RTOS codes for scheduling the tasks
Flash memory for storing user preferences contact data user address user date of
birth user identification code answers of FAQs.
Timer
Interrupt controller
Wi-Fi or USB port for TCP/IP (Internet broadband connection) to the ACVM
remote control and for obtaining ACVM status reports by the owner.
ACVM specific hardware sorts the coins of different denomination and then
generates a set of status and input bits and port interrupt input. The bits give the
information that how much value coins have been inserted. The status bits are reset
by the routine after each read operation.
Power supply
Automatic Chocolate Vending Machine (ACVM)
2. Hardware and Software Architectures:
Software architecture is abstracted as consisting of the following software
processes:
Keypad input read process
Display process
Coins input read process consisting of an interrupt service routine for a
port at which the ACVM microcontroller reads the port status and input bits
and gets the interrupt signal
Chocolate deliver process
Network process for TCP/IP stack communication with the ACVM owner
at remote place.
Automatic Chocolate Vending Machine (ACVM)
3. Extra Functional properties:
Extra functionalities required in the system being developed should be well
understood from the design.
ACVM functional properties can be abstracted as follows:
ACVM displays the GUIs. An extra functional requirement like if the
customer wishes to enter contact information, birthday information or get
answer to FAQs etc., the ACVM displays appropriate menu.
An extra functional requirement is that machine displays a welcome
message in idle state. It also displays continuously time and date at the right
bottom corner of display screen. It can also intermittently display
advertisement or important information of interest during the idle state, for
example weather forecast for today or news headlines.
Automatic Chocolate Vending Machine (ACVM)
3. Extra Functional properties:
When the first coin inserts a timer also starts. The customer is expected to
insert all required coins in 2 minutes. An extra functional requirement is
that after 2 minutes the ACVM displays a query to the customer. If the
customer does not insert sufficient coins or query is not answered in a
preset time then the coins are refunded.
When sufficient coins are collected it displays a thank you message, Thanks
wait for a few moments please and then delivers the chocolate through the
delivery slot and displays the message collect the chocolate and visit again
please. An extra functional requirement is that the machine congratulates on
birthday and may offer an additional chocolate if the customers contact and
birthday are registered.
Automatic Chocolate Vending Machine (ACVM)
4. System related family of designs
Automatic coffee vending machine tickets vending machine and machines
at sales point are the systems having related to ACVM family. The
machines developed earlier are taken into consideration during designing.
5. Modular Design
System designing is decomposition of hardware and software modules.
ACVM hardware is considered in modules as follows: microcontroller
based hardware with LCD or touch screen display, mechanical devices to
collect the coins refund the coins and chocolate delivery slot and bowl.
ACVM software is considered as modules as follows: GUIs Multiple
processes and RTOS to
6. Mapping
Mapping into various representations is done using the requirements of
software. GUIs on the desktop of a computer or in a mobile handset are
mapped to GUIs of ACVM.
Smart card
Smart card is one of the most used embedded systems today.
It is used as credit debit bank card, ATM card, e-purse or e- wallet card,
medical card (for history and diagnosis details) and cards for a number of
new innovative applications.
The design process uses the following concepts:
1. Abstraction:
Abstraction of smart card is a plastic card of standard dimensions.
Hardware is abstracted as a very small silicon chip size just a few mm to
protect the card during bending or mishandling.
Smart card
2. Hardware and software architectures
Abstraction of hardware and software in the card
Smart card
Hardware is considered as consisting of the following interconnected components:
Microcontroller
RAM for storing temporary variables and stack
ROM
Flash memory for account number expiry date card number
Timer
Interrupt controller
NFC (near field communication) port for wireless communication with host ATM
or card reader
Self powered by radiation falling on the cards metal plated surface which also
functions as antenna transceiver
Software architecture is abstracted as consisting of the following software
processes:
Boot up initialization and RTOS software
Software for the communication with host machine
Smart card
Smart card embeds the following software components:
Boot up initialization and RTOS software
Smart card secure file system
Connection establishment and termination
Communication with host
Cryptography algorithm
Host authentication
Card authentication
Saving addition parameters or recent new data sent by the host (for
example present balance left)
Smart card
The Smart card is an exemplary secure embedded system with security software.
The card needs cryptographic software.
Embedded software in the card needs special features in its operating system over
and above the MS DOS or UNIX system features.
Special feature needed are as follows:
1. Protected Environment
2. Restricted run time environment
3. Its OS every method class and run time library should be scalable.
4. Code size generated should be optimum.
5. Limited use of data types
6. A 3 layered file system for the data.
7. There is either a fixed length file management or a variable length file
management with each file having a predefined offset.
8. Classes for the network, sockets, connections, data grams, character input
output and streams, security management, digital certification, symmetric and
asymmetric key based cryptography and digital signatures.
Digital Camera
1. Abstraction of Digital Camera
Abstraction of Digital Camera hardware and software components
Digital Camera
2. Hardware and software architectures
Camera embeds the following hardware units:
Microcontroller or ASIP
Multiple processors
RAM for storing temporary variables and stack
ROM for application codes and RTOS codes for scheduling the
tasks
Timer Flash memory for storing user preferences contact data
user address user date of birth user identification code, ADC,
DAC and interrupt controller
DMA controller
LCD controller
Battery
Digital Camera
2. Hardware and software architectures
Digital camera software components are abstracted as follows:
CCD signal processing for offset correction
JPEG coding
JPEG decoding
Pixel processing before display
Memory and file system
Light, Flash and display device drivers
COM, USB port and Bluetooth device drivers for port
operations for printers and computer communication control
Mobile Phone
Mobile Phone has sophisticated hardware and software
Hardware units:
A mobile phone embeds an SoC integrating the following hardware units.
1. Microcontroller or ASIP
2. DSP core, CCDSP, DSP, video, voice and pixel processors
3. Flash, memory stick, EEPROMs and SRAMs
4. Peripherals circuits ADC DAC and interrupt controller
5. DMA controller
6. LCD controller
7. Battery
Mobile Phone
Mobile Phone has sophisticated hardware and software
Software components:
A mobile phone software development tools are as follows.
1. OS (windows mobile, palm, symbian) or BREW
2. JAVA 2 Micro edition (J2ME) along with KVM as a JAVA virtual machine
3. JAVA ireless tool kit with JDK (Java Development Kit)
Mobile Phone
Mobile Phone has sophisticated hardware and software
Software components:
A mobile phone embeds the following software components:
1. Memory and file systems
2. Keypad LCD, serial, USB, 3G or 2G port device drivers for port operations for keypad
Printer and computer communication control
3. SMS (Short Messaging service) message creation and communicator contract and PIM
4. Mobile imager for uploading pictures and MMS
5. Mobile browser for access to the web
6. Downloader for JAVA games ring tones games wall papers
7. Simple camera
8. Bluetooth synchronization, IrDA and WAP connections support
Mobile Computer
The mobile computer has Windows CE or Windows mobile as OS.
It has a touch screen for GUI.
The user uses a stylus to enter command.
It has virtual keypad.
In addition to phone a mobile computer has following software
components:
1. OS (Windows CE, Windows Mobile, PocketPC, Palm OS or
Symbian OS)
2. Touch screen GUIs memory and file systems
3. Memory sticks
4. Outlook, Internet explorer, Word Excel, Power point, and
handwritten text processor
5. Applications or enterprise software.
A Set of Robots
Consider a set of 8 robots.
One robot is the master robot (music director) and seven are slave
robots (conductors).
Hardware components in the set of robots & Software components in the set of robots
in which a master robots signals the commands and slave robots play according to the
signals from the master
A Set of Robots
Assume that the set is used to play an orchestra.
Assume that the robot has the following components:
1. The master robot signals the commands and slave robots play
accordingly
2. Each robot has a microcontroller with expansion ports
3. Each robot is assumed to have five degrees of freedom.
4. The port outputs connects the motors and PWM outputs drive the
motors in each robot.
5. Each robot has a serial IO with IrDA protocol
6. Internal memory flash to store the OS, embedded software and
limited amount of music,
7. There is a music file processor for playing the music. Slave
robots have speaker outputs for playing music.
A Set of Robots
Mater robots Functions:
Assume that master robot functioning is as follows:
1. It receives commands from a remote controller to a start and stop the
music and the code for the specific orchestra to be played.
2. It sends PWM signals to the ports for moving the sticks in both hands
as per the program.
3. It establishes and binds the socket connection with the slaves. It sends
the signals through sockets using IrDA protocol. The byte streams
response to the clients are as per the music file to be played by the
slave.
Slave robot functions:
4. It establishes and binds the sockets connection with the master
5. It receives from a master socket the commands accept () and write (); it
also receives commands to start and stop music and the code for the
specific orchestra to be played
6. It receives the signals through sockets using IrDA protocols. The byte
streams from the server are as per the music file being played.
A Set of Robots
Hardware units:
Robots embed the following hardware units:
1. Microcontroller or ASIP
2. Music file processor
3. RAM for storing temporary variables and stack
4. ROM for application codes and RTOS codes for scheduling robot
actions and tasks
5. Timer Flash memory for storing user preferences and music files
6. IrDA controller
7. DMA controller
8. Power supply source or battery
A Set of Robots
Software units:
Robots embed the following Software components:
1. Socket functions
2. Music coding
3. Music decoding
4. Memory and file systems
5. Light Flash and display device drivers
6. IrDA and socket port device drivers
7. Motor drivers
8. IO ISRs