Nothing Special   »   [go: up one dir, main page]

Es 2

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

Introduction to Embedded System

Unit Two-

Attiuttama Mishra
Asst. Prof.
B.K Birla college, Kalyan

1
[lecture slides contains some content adapted from : Shibu K V textbook
authors, Mc Graw Hill Education]
Application and Domain specific Embedded systems

Washing Machine-Application-Specific Embedded System

Automotive-Domain-Specific Examples of Embedded System

Embedded systems are application and domain specific, meaning; they are
specifically built for certain applications in certain domains like consumer
electronics, telecom, automotive, industrial control, etc.
Washing Machine-Application-Specific Embedded System

Washing Machine is a typical example of an embedded system providing


extensive support in home automation applications. An embedded system
contains sensors, actuators, control unit and application-specific user interfaces
like keyboards, display units, etc. You can see all these components in a washing
machine if you have a closer look at it. Some of them are visible and some of
them may be invisible to you.

The actuator part of washing machine consists of a motorized agitator, tumble

tub, water drawing pump and inlet valve to control the flow of water into the

unit.

The sensor part consists of the water temperature sensor, level sensor, etc.
The control part contains a microprocessor/controller based board with

interfaces to the sensors and actuators.

The sensor data is fed back to the control unit and the control unit generates the

necessary actuator outputs.

The control unit also provides connectivity to user interfaces like keypad for

setting the washing time, selecting the type of material to be washed like light,

medium, heavy duty, etc.

User feedback is reflected through the display unit and LEDs connected to the

control board.
The functional block diagram of a washing machine is shown in Figure.
The integrated control panel consists of a microprocessor/controller based
board with I/O interfaces and a control algorithm running in it.
Input interface includes the keyboard which consists of wash type selector
namely Wash, Spin and Rinse, cloth type selector namely Light, Medium, Heavy
duty and washing time setting, etc.
The output interface consists of LED/LCD displays, status indication LEDs, etc.
connected to the I/O bus of the controller.
It is to be noted that this interface may vary from manufacturer to
manufacturer and model to model.
The other types of I/O interfaces which are invisible to the end user are
different kinds of sensor interfaces, namely, water temperature sensor, water
level sensor, etc. and actuator interface including motor control for agitator
and tub movement control, inlet water flow control, etc.
Automotive-Domain-Specific Examples of Embedded System

The major application domains of embedded systems are consumer, industrial,


automotive, telecom, etc. of which telecom and automotive industry holds a big
market share
Inner Workings of Automotive Embedded Systems

Automotive embedded systems are the one where electronics take control
over the mechanical systems.
The presence of automotive embedded system in a vehicle varies from simple
mirror and wiper controls to complex air bag controller and antilock brake
systems (ABS).
Automotive embedded systems are normally built around microcontrollers or
DSPs or a hybrid of the two and are generally known as Electronic Control
Units (ECUs).
The various types of electronic control units (ECUs) used in the automotive
embedded industry can be broadly classified into two-High speed embedded
control units and Low speed embedded control units.
High speed Electronic Control Units (HECUs) : High speed electronic control
units (HECUs) are deployed in critical control units requiring fast response, like
fuel injection systems, antilock brake systems, etc.

Low speed Electronic Control Units (LECUs) : Low speed electronic control
units are deployed in applications where response time is not so critical. They
are generally built around low cost microprocessors/microcontrollers and
digital signal processors. Audio controllers, passenger and driver door locks,
door glass controls, etc., are examples for LECUs.
Automotive Communication Buses

Automotive applications use serial buses for communication.


Controller Area Network (CAN), Local Interconnect Network (LIN), Media
Oriented System Transport (MOST) bus, etc. are the important automotive
communication buses.

CAN bus is an event driven serial protocol interface with support for error
handling in data transmission. It is generally employed in safety system like
airbag control, powertrain systems like engine control and Antilock Brake
Systems.
LIN bus is a single master multiple slave (up to 16 independent slave nodes)
communication interface. LIN is a low speed, single wire communication
interface with support for data rates up to 20 kbps and is used for
sensor/actuator interfacing.
The Media Oriented System Transport (MOST) bus is targeted for automotive
audio video equipment interfacing. MOST bus is a multimedia fiber-optic point-
topoint network implemented in a star, ring or daisy chained topology over
optical fibers cables.
COMPONENTS ON AN EMBEDDED SYSTEM

Before the programmer can start to code anything, he has to invest some
time in understand the functioning of the embedded system.
• He is expected to understand the following things:
a. Functioning or purpose of the embedded system
b. Individual components involved
c. The way data flows through the components of an embedded system

Consider an example of an embedded system intended to be used as a printer-


sharing device. This device is attached to a printer and allows access to two
computers through serial interface and one printer through a parallel interface.
• The diagram describes the way the devices are connected to each other. Data
to be printed is accepted from either serial port, held in RAM until the printer is
ready for more data, and delivered to the printer via the parallel port. The
software that makes all of this happen is stored in ROM.
• The working or execution of the code is brought about by the processor. The
processor knows two types of components: memory and peripherals
• Memories are for data and code storage and retrieval. Ex. RAM & ROM
• Peripherals are specialized hardware devices that either coordinate
interaction with the outside world (I/O) or perform a specific hardware
function. Ex. Serial Port
Certain processors like Intel communicate with these memories and peripherals
with two distinct address spaces.
• The first address space is called the memory space and is intended mainly for
memory devices; the second is reserved exclusively for peripherals and is called
the I/O space.
• When peripherals are located in I/O space they are called I/O Mapped
peripheral else when peripherals are located in memory space they are called
Memory Mapped peripherals or memory mapped I/O.
Memory Map

A Memory Map is the processor's "address book." It shows what these


devices look like to the processor. The memory map contains one entry for
each of the memories and peripherals that are accessible from the processor's
memory space.
 All processors store their programs and data in memory.
 These chips are located in the processor's memory space, and the processor
communicates with them by way of two sets of electrical wires called the
address bus and the data bus. To read or write a particular location in memory,
the processor first writes the desired address onto the address bus. The data is
then transferred over the data bus.
 A memory map is a table that shows the name and address range of each
memory device and peripheral that is located in the memory space.
 Organize the table such that the lowest address is at the bottom and the
highest address is at the top. Each time a new device is added, add it to the
memory map, place it in its approximate location in memory and label the
starting and ending addresses, in hexadecimal. After inserting all of the devices
into the memory map, be sure to label any unused memory regions as such.
• The block diagram of the Printer sharing device shown above contains three
devices attached to the address and data buses. These devices are the RAM and
ROM and a Serial Controller.
• Let us assume that the RAM is located at the bottom of memory and extends
upward for the first 128 KB of the memory space.
• The ROM is located at the top of memory and extends downward for 256 KB.
But considering the ROM contains two ROMs-an EPROM and a Flash memory
device-each of size 128 KB.
• The third device, the Serial Controller, is a memory-mapped peripheral whose
registers are accessible between the addresses say 70000h and 72000h.
The diagram below shows the memory map for
the printer sharing device.

For every embedded system, a header file should


be created that describes these important
features and provides an abstract interface to the
hardware. It allows the programmer to refer to
the various devices on the board by name, rather
than by address.

• The part of the header file below describes the


memory map
#define RAM_BASE (void *) 0x00000000
#define SC_BASE (void *) 0x70000000
#define SC_INTACK (void *) 0x70001000
#define FLASH_BASE (void *) 0xC0000000
#define EPROM_BASE (void *) 0xE0000000
I/O map

 The I/O map contains one entry for each of the peripheral.
 An I/O map has to be created if a separate I/O space is present. It is done by
repeating the steps performed to create memory map.
 To create an I/O map, simply create a table of peripheral names and address
ranges, organized in such a way that the lowest addresses are at the bottom.
 The diagram below shows the I/O map for the printer sharing device

It includes three devices: the peripheral control block (PCB),


parallel port, and debugger port. The PCB is a set of registers
within the processor that are used to control the on-chip
peripherals. The chips that control the parallel port and
debugger port reside outside of the processor. These ports
are used to communicate with the printer and a host-based
debugger, respectively.

• The part of the header file below describes the I/O map
#define SVIEW_BASE 0xFC00
#define PIO_BASE 0xFD00
#define PCB_BASE 0xFF00
INTERRUPT MAP

There are two techniques which can be used by the processor to communicate with
memories or peripheral devices. These are:

a. Polling: In this technique the processor polls the device (asks question) repeatedly
at regular intervals to check if the device has completed the given task or has any new
task to execute.
b. Interrupt: An interrupt is a signal sent from a peripheral to the processor. A
peripheral may send an interrupt signal to a processor when it has some job to
perform which requires the processors intervention

Upon receiving an interrupt signal the Processor does the job by issuing certain
commands and waits for another interrupt to signal the completion of the job.
• While the processor is waiting for the interrupt to arrive, it is free to continue
working on other things.
• When a fresh interrupt signal is received, the processor temporarily sets aside its
current work and executes a small piece of software called the interrupt service routine
(ISR). When the ISR completes, the processor returns to the work that was interrupted.
• The programmer must write the ISR himself and enable it so that it will be executed
when the relevant interrupt occurs.

You might also like