ES 18EC62 Module3 Notes
ES 18EC62 Module3 Notes
EMBEDDED SYSTEMS
• Course Code : 18EC62
• CIE Marks :40
• Lecture Hours/Week : 03 + 2 (Tutorial)
• SEE marks :60
• Total Number of Lecture Hours : 50 (10 Hrs / Module)
• Exam Hours : 03
• CREDITS : 04
Module-3
Embedded System Components: Embedded Vs General computing system, Classification
of Embedded systems, Major applications and purpose of ES. Elements of an Embedded
System (Block diagram and explanation),Differences between RISC and CISC, Harvard and
Princeton, Big and LittleEndian formats, Memory (ROM and RAM types), Sensors,
Actuators, Optocoupler, Communication Interfaces (12C, SPI, IrDA, Bluetooth, Wi-Fi,
Zigbee only)(Text 2: All the Topics from Ch—l and Ch-2 (Fig and explanation before
2.1)2.1.1.6 to 2.1.1.8, 2.2 to 2.2.2.3, 2.3 to 2.3.2, 2.3.3.3, selected topics of 2.4.1and 2.4.2
only).
• Every embedded system is unique and the hardware as well as the firmware is highly
specialised to the application domain.
Page 1
EMBEDDED SYSTEMS-18EC62
possible for the end user to re-install non-alterable by the end-user (There
the operating system, and also add or may be exceptions for system
remove user applications) supporting OS kernel image flashing
through special hardware settings)
4. Performance is the key deciding 4. Application-specific requirements
factor in the selection of the system. (like performance, power
Always, ‘Faster is Better’ requirements, memory usage, etc.) are
the key deciding factors
5. Less/not at all tailored towards 5. Highly tailored to take advantage of
reduced operating power the power saving modes supported
requirements, options for different by the hardware and the operating
levels of power management system
6. Response requirements are not time- 6. For certain category of embedded
critical systems like mission critical systems,
the response time requirement is
highly critical
7. Need not be deterministic in 7. Execution behaviour is deterministic
execution behaviour for certain types of embedded
systems like ‘Hard Real Time’
systems
• The first recognised modern embedded system is the Apollo Guidance Computer
(AGC) developed by the MIT Instrumentation Laboratory for the lunar expedition.
• The clock frequency of was 1.024 MHz and it was derived from a 2.048 MHz crystal
clock.
• The first mass-produced embedded system was the Autonetics D-17 guidance
computer for the Minuteman-I missile in 1961.
• It was built using discrete transistor logic and a hard-disk for main memory.
• The first integrated circuit was produced in September 1958 and computers using
them began to appear in 1963.
Page 2
EMBEDDED SYSTEMS-18EC62
1. Based on generation
4. Based on triggering
1. First Generation
• Early embedded systems were built around 8-bit microprocessors like 8085 and Z80
and 4-bit microcontrollers.
• Simple in hardware circuits with firmware developed in assembly code.
• E.g.: Digital telephone keypads, stepper motor control units, etc.
2. Second Generation
3. Third Generation
4.Fourth Generation
Page 3
EMBEDDED SYSTEMS-18EC62
5. Next Generation
• Simple in application needs and the performance requirements are not time critical.
• E.g.: An electronic toy
• Usually built around low performance and low cost 8-bit or 16-bit
microprocessors/microcontrollers.
• May or may not contain an operating system for its functioning.
Page 4
EMBEDDED SYSTEMS-18EC62
• Usually contain a high performance real time operating system (RTOS) for task
scheduling, prioritization and management.
Page 5
EMBEDDED SYSTEMS-18EC62
1. Data Collection/Storage/Representation
2. Data Communication
• Embedded data communication systems are deployed in applications ranging from
complex satellite communication systems to simple home networking systems.
• The transmission is achieved either by a wire- line medium or by a wireless medium.
• The data collecting embedded terminal itself can incorporate data communication
units like wireless modules (Bluetooth, ZigBee, Wi-Fi, EDGE, GPRS, etc.) or wire-
line modules (RS- 232C, USB, TCP/IP, PS2, etc.).
Page 6
EMBEDDED SYSTEMS-18EC62
• Network hubs, routers, switches, etc. are typical examples of dedicated data
transmission embedded systems.
• They act as mediators in data communication and provide various features like
data security, monitoring etc.
• The data (voice, image, video, electrical signals and other measurable quantities)
collected by embedded systems may be used for various kinds of data processing.
• Embedded systems with signal processing functionalities are employed in
applications demanding signal processing like speech coding, synthesis, audio video
codec, transmission applications, etc.
4. Monitoring
• Almost embedded products coming under the medical domain are used for
monitoring.
• A very good example is the electro cardiogram (ECG) machine for monitoring the
heartbeat of a patient.
• The machine is intended to do the monitoring of the heartbeat.
• It cannot impose control over the heartbeat.
• The sensors used in ECG are the different electrodes connected to the patient's body.
Page 7
EMBEDDED SYSTEMS-18EC62
5. Control
Page 8
EMBEDDED SYSTEMS-18EC62
Page 9
EMBEDDED SYSTEMS-18EC62 Azdocuments
• It contains a single chip controller, which acts as the master brain of the system.
• The controller can be
o A microprocessor or
o A microcontroller or
o A Field Programmable Gate Array (FPGA) device or
o A Digital Signal Processor (DSP) or
o An Application Specific Integrated Circuit (ASIC)/Application Specific
Standard Product (ASSP)
• An embedded system can be viewed as a reactive system.
• The control is achieved by processing the information coming from the sensors and
user interfaces, and controlling some actuators that regulate the physical variable.
• Key boards, push button switches, etc. are examples for common user interface input
devices.
• LEDs, liquid crystal displays, piezoelectric buzzers, etc. are examples for common
user interface output devices for a typical embedded system.
• The memory of the system is responsible for holding the control algorithm and other
• important configuration details.
• For most of embedded systems, the memory for storing the algorithm or configuration
data is of fixed type, which is a kind of Read Only Memory (ROM).
o It is not available for the end user for modifications
o The memory is protected from unwanted user interaction by implementing
some kind of memory protection mechanism.
o The most common types of memories used in embedded systems for
control algorithm storage are OTP, PROM, UVEPROM, EEPROM and
FLASH.
• Sometimes the system requires temporary memory for performing arithmetic
operations or control algorithm execution and this type of memory is known as
"working memory".
o Random Access Memory (RAM) is used in most of the systems as the
working memory.
o Various types of RAM like SRAM, DRAM and NVRAM are used for this
purpose.
• Apart from these, communication interface is essential for communicating with
various subsystems of the embedded system and with the external world.
• The communication interfaces may be used to achieve onboard (I2C, SPI, UART,
parallel bus interface, etc.) or external communication (wireless interfaces like
Infrared, Bluetooth, Wi-Fi, etc.)
Page 10
EMBEDDED SYSTEMS-18EC62 Azdocuments
RISC CISC
1. Lesser number of instructions 1. Greater number of instructions
2. Instruction pipelining and increased 2. Generally no instruction pipelining
execution speed feature
Page 11
EMBEDDED SYSTEMS-18EC62 Azdocuments
Harvard Architecture
Page 12
EMBEDDED SYSTEMS-18EC62 Azdocuments
• For example, a 4 byte long integer Byte3 Byte2 Byte1 Byte0 will be stored in the
memory as shown below:
• Big-endian means the higher-order byte of the data is stored in memory at the lowest
address, and the lower-order byte at the highest address. (The big end comes first.)
• For example, a 4 byte long integer Byte3 Byte2 Byte1 Byte0 will be stored in the
memory as shown below:
Little-Endian
Page 13
EMBEDDED SYSTEMS-18EC62 Azdocuments
Big-Endian
Memory
• Memory is an important part of a processor/controller based embedded systems.
• Some of the processors/controllers contain built in memory and this memory is
referred as on-chip memory.
• Others do not contain any memory inside the chip and requires external memory
to be connected with the controller/processor to store the control algorithm. It is
called off-chip memory.
• Also some working memory is required for holding data temporarily during
certain operations.
• The program memory or code storage memory of an embedded system stores the
program instructions.
• The code memory retains its contents even after the power is turned off. It is
generally known as non-volatile storage memory.
• It can be classified into different types as shown:
Page 14
EMBEDDED SYSTEMS-18EC62 Azdocuments
• Since the MROM is permanent in bit storage, it is not possible to alter the bit
information.
• Different mechanisms are used for the masking process of the ROM, like
• Creation of an enhancement or depletion mode transistor through channel implant.
• By creating the memory cell either using a standard transistor or a high threshold
transistor.
• In the high threshold mode, the supply voltage required to turn ON the transistor is
above the normal ROM IC operating voltage.
• This ensures that the transistor is always off and the memory cell stores always logic
0.
• Erasable Programmable Read Only Memory (EPROM) gives the flexibility to re-
program the same chip.
• EPROM stores the bit information by charging the floating gate of an FET.
• Bit information is stored by using an EPROM programmer, which applies high
voltage to charge the floating gate.
• EPROM contains a quartz crystal window for erasing the stored information.
• If the window is exposed to ultraviolet rays for a fixed duration, the entire
memory will be erased.
• Even though the EPROM chip is flexible in terms of re-programmability, it needs
to be taken out of the circuit board and put in a UV eraser device for 20 to 30
minutes.
• It is a tedious and time-consuming process.
Page 15
EMBEDDED SYSTEMS-18EC62 Azdocuments
5. FLASH
• FLASH memory is a variation of EEPROM technology – It combines the re-
programmability of EEPROM and the high capacity of standard ROMs.
• FLASH is the latest ROM technology.
• Most popular ROM technology used in today's embedded designs.
• FLASH memory is organised as sectors (blocks) or pages.
• FLASH memory stores information in an array of floating gate MOSFET transistors.
• The erasing of memory can be done at sector level or page level without affecting the
other sectors or pages.
• Each sector/page should be erased before re-programming.
• The typical erasable capacity of FLASH is of the order of a few thousand cycles.
• E.g.: SST39LF010 from Microchip is an example of 1Mbit (organised as 128Kx8)
FLASH
• memory with typical endurance of 100,000 cycles.
Page 16
EMBEDDED SYSTEMS-18EC62 Azdocuments
• This is in contrast to the Sequential Access Memory (SAM), where the desired
memory location is accessed by either traversing through the entire memory or
through a 'seek' method. Magnetic tapes, CD ROMs, etc. are examples of
sequential access memories.
• RAM generally falls into three categories: Static RAM (SRAM), Dynamic RAM
(DRAM) and Non-Volatile RAM (NVRAM).
Page 17
EMBEDDED SYSTEMS-18EC62 Azdocuments
• The access to the memory cell is controlled by Word Line, which controls the
access transistors (MOSFETs) Q5 and Q6.
• The access transistors control the connection to bit lines B & B\.
• In order to write a value to the memory cell, apply the desired value to the bit
control lines (For writing 1, make B = 1 and B\ = 0; For writing 0, make B = 0
and B\ = 1) and assert the Word Line (Make Word line high).
• This operation latches the bit written in the flip-flop.
• For reading the content of the memory cell, assert both B and B\ bit lines to 1 and
set the Word line to 1.
• The major limitations of SRAM are low capacity and high cost.
Page 18
EMBEDDED SYSTEMS-18EC62 Azdocuments
SRAM vs DRAM
• Table given below summarises the relative merits and demerits of SRAM and
DRAM technology.
Page 19
EMBEDDED SYSTEMS-18EC62 Azdocuments
Optocoupler
• Optocoupler is a solid state device to isolate two parts of a circuit.
• Optocoupler combines an LED and a photo-transistor in a single housing.
• Figure illustrates the functioning of an optocoupler device.
Communication Interface
• Communication interface is essential for communicating with various subsystems of
the embedded system and with the external world.
• For an embedded product, the communication interface can be viewed in two
different perspectives:
➢ Onboard Communication Interface (Device/board level communication
interface)
▪ E.g.: Serial interfaces like I2C, SPI, UART, 1-Wire, etc and parallel
bus interface.
➢ External Communication Interface (Product level communication interface)
Page 20
EMBEDDED SYSTEMS-18EC62 Azdocuments
Page 21
EMBEDDED SYSTEMS-18EC62 Azdocuments
• The I2C bus interface is built around an input buffer and an open drain or collector
transistor.
• When the bus is in the idle state, the open drain/collector transistor will be in the
floating state and the output lines (SDA and SCL) switch to the 'High Impedance'
state.
• For proper operation of the bus, both the bus lines should be pulled to the supply
voltage (+5 V for TTL family and +3.3V for CMOS family devices) using pull-up
resistors.
o The typical value of resistors used in pull-up is 2.2K.
o With pull-up resistors, the output lines of the bus in the idle state will be
'HIGH'
• The address of a I2C device is assigned by hardwiring the address lines of the
• device to the desired logic level.
• Done at the time of designing the embedded hardware.
• The sequence of operations for communicating with an I2C slave device is listed
below:
1. The master device pulls the clock line (SCL) of the bus to 'HIGH'
2. The master device pulls the data line (SDA) 'LOW', when the SCL line is at
logic 'HIGH' (This is the 'Start' condition for data transfer)
3. The master device sends the address (7 bit or 10 bit wide) of the 'slave' device
to which it wants to communicate, over the SDA line.
◦ Clock pulses are generated at the SCL line for synchronising the bit
reception by the slave device.
Page 22
EMBEDDED SYSTEMS-18EC62 Azdocuments
◦ The data in the bus is valid during the 'HIGH' period of the clock
signal
4. The master device sends the Read or Write bit (Bit value = 1 Read operation;
Bit value = 0 Write operation) according to the requirement
5. The master device waits for the acknowledgement bit from the slave device
whose address is sent on the bus along with the Read/ Write operation
command.
◦ Slave devices connected to the bus compares the address received with
the address assigned to them
6. The slave device with the address requested by the master device responds by
sending an acknowledge bit (Bit value 1) over the SDA line
7. Upon receiving the acknowledge bit, the Master device sends the 8 bit data to the
slave device over SDA line, if the requested operation is 'Write to device’.
◦ If the requested operation is 'Read from device', the slave device sends data to
the master over the SDA line
8. The master device waits for the acknowledgement bit from the device upon byte
transfer complete for a write operation and sends an acknowledge bit to the Slave
device for a read operation
9. The master device terminates the transfer by pulling the SDA line 'HIGH' when the
clock line SCL is at logic 'HIGH' (Indicating the 'STOP' condition)
• First generation I2C devices were designed to support data rates only up to 100kbps.
• Over time, there have been several additions to the specification so that there are now
five operating speed categories:
Page 23
EMBEDDED SYSTEMS-18EC62 Azdocuments
o There can be more than one masters, but only one master device can be active
at any given point of time.
• SPI requires four signal lines for communication. They are:
o Master Out Slave In (MOSI) – Signal line carrying the data from master to
slave device. It is also known as Slave Input/SIave Data In (SI/SDI)
o Master In Slave Out (MISO) – Signal line carrying the data from slave to
master device. It is also known as Slave Output (SO/SDO)
o Serial Clock (SCLK) – Signal line carrying the clock signals
o Slave Select (SS) – Signal line for slave device select. It is an active low signal
• The bus interface diagram shown in the figure illustrates the connection of master
and slave devices on the SPI bus.
• The master and slave devices contain a special shift register for the data to transmit or
receive.
Page 24
EMBEDDED SYSTEMS-18EC62 Azdocuments
• During transmission from the master to slave, the data in the master's shift register is
shifted out to the MOSI pin and it enters the shift register of the slave device through
the MOSI pin of the slave device.
• At the same time the shifted out data bit from the slave device's shift register enters
the shift register of the master device through MISO pin.
• In summary, the shift registers of 'master' and 'slave' devices form a circular buffer.
• When compared to I2C, SPI bus is most suitable for applications requiring transfer of
data in 'streams'.
• E.g.: RS-232 C & RS-485, Universal Serial Bus (USB), IEEE 1394 (Firewire),
Infrared (IR), Bluetooth (BT), Wi-Fi, ZigBee, GPRS, etc.
Infrared (IrDA)
• Infrared (IrDA) is a serial, half duplex, line of sight based wireless technology
• It is in use from the olden days of communication and you may be very familiar with
it.
• E.g.: The remote control of TV, VCD player, etc. works on Infrared.
• The range can be increased by increasing the transmitting power of the IR device.
Page 25
EMBEDDED SYSTEMS-18EC62 Azdocuments
• IrDA communication involves a transmitter unit for transmitting the data over IR and
a receiver for receiving the data.
• Infrared Light Emitting Diode (LED) is the IR source for transmitter and at the
receiving end a photodiode acts as the receiver.
• Both transmitter and receiver unit will be present in each device supporting IrDA
communication for bidirectional data transfer. Such IR units are known as
'Transceiver’.
• The remote control unit contains the transmitter unit and TV contains the receiver
unit.
• Infrared Data Association (IrDA ) is the regulatory body responsible for defining and
licensing the specifications for IR data communication.
• IR communication has two essential parts: a physical link part and a protocol part.
• The physical link is responsible for the physical transmission of data between devices
supporting IR communication
• The physical link works on the wireless principle making use of Infrared for
communication.
• The IrDA specifications include the standard for both physical link and protocol
layer.
• The IrDA control protocol contains implementations for Physical Layer (PHY),
Media Access Control (MAC) and Logical Link Control (LLC).
• IrDA is a popular interface for file exchange and data transfer in low cost devices.
Page 26
EMBEDDED SYSTEMS-18EC62 Azdocuments
• IrDA was the prominent communication channel in mobile phones before Bluetooth's
existence.
Bluetooth (BT)
• Bluetooth is a low cost, low power, short range wireless technology for data and
voice communication.
• Bluetooth was first proposed by Ericsson in 1994.
• Bluetooth operates at 2.4GHz of the Radio Frequency spectrum and uses the
Frequency Hopping Spread Spectrum (FHSS) technique for communication.
• Bluetooth supports a data rate of up to 1Mbps to 24Mbps and a range of
approximately 30 to 100 feet for data communication (depending on the version)
o v1.2 supports data rate up to 1Mbps
o v2.0 + EDR supports data rate up to 3Mbps
o v3.0 + HS and v4.0 supports data rate up to 24Mbps
• Bluetooth communication has two essential parts – a physical link part and a protocol
part.
o The physical link is responsible for the physical transmission of data between
devices supporting Bluetooth communication
o The protocol part is responsible for defining the rules of communication.
• The physical link works on the wireless principle making use of RF waves for
communication.
• Bluetooth enabled devices essentially contain a Bluetooth wireless radio for the
transmission and reception of data.
• The rules governing the Bluetooth communication is implemented in the 'Bluetooth
protocol stack’.
• The Bluetooth communication IC holds the stack.
• Each Bluetooth device will have a 48 bit unique identification number.
• Bluetooth communication follows packet based data transfer.
• Bluetooth supports point-to-point (device to device) and point-to-multipoint (device
to multiple device broadcasting) wireless communication.
• The point-to-point communication follows the master-slave relationship.
• A Bluetooth device can function as either master or slave.
• When a network is formed with one Bluetooth device as master and more than one
device as slaves, it is called a Piconet.
• A Piconet supports a maximum of seven slave devices.
• Bluetooth is the favourite choice for short range data communication in handheld
embedded devices.
• Bluetooth technology is very popular among cell phone users as they are the easiest
communication channel for transferring ringtones, music files, pictures, media files,
etc. between neighbouring Bluetooth enabled phones.
• Bluetooth Low Energy (BLE)/Bluetooth Smart is a latest addition to the Bluetooth
technology.
Page 27
EMBEDDED SYSTEMS-18EC62 Azdocuments
• BLE allows devices to use much less power compared to the standard Bluetooth
connections, while offering most of the connectivity of Bluetooth and maintaining a
similar communication range.
• Bluetooth 4.2 specification enables IoT support through low-power IP connectivity,
with support for flexible Internet connectivity options (IPv6/6LoWPAN or Bluetooth
Smart Gateways) and implements industry-leading privacy, power efficiency and
industry standard security.
• The Bluetooth standard specifies the minimum requirements that a Bluetooth device
must support for a specific usage scenario.
• The Generic Access Profile (GAP) defines the requirements for detecting a Bluetooth
device and establishing a connection with it.
• All other specific usage profiles are based on GAP.
• Serial Port Profile (SPP) for serial data communication, File Transfer Profile (FTP)
for file transfer between devices, Human Interface Device (HID) for supporting
human interface devices like keyboard and mouse are examples for Bluetooth
profiles.
• BLE implements various application specific profiles for communicating with low
power Bluetooth peripherals like fitness devices, blood pressure and heart rate
monitors, etc.
o Examples:
▪ Healthcare Profiles
Wi-Fi
• Wi-Fi or Wireless Fidelity is the popular wireless communication technique for
networked communication of devices.
• Wi-Fi is intended for network communication and it supports Internet Protocol (IP)
based communication.
Page 28
EMBEDDED SYSTEMS-18EC62 Azdocuments
• The Wi-Fi router is responsible for restricting the access to a network, assigning IP
address to devices on the network, routing data packets to the intended devices on the
network.
• Wi-Fi enabled devices contain a wireless adaptor for transmitting and receiving data
in the form of radio signals through an antenna.
• Wi-Fi operates at 2.4 GHz or 5 GHz of radio spectrum and they co-exist with other
ISM band devices like Bluetooth.
• For communicating with devices over a Wi-Fi network, the device when its Wi-Fi
radio is turned ON, searches the available Wi-Fi network in its vicinity and lists out
the Service Set Identifier (SSID) of the available networks.
• If the network is security enabled, a password may be required to connect to a
particular SSID.
• Wi-Fi employs different security mechanisms like Wired Equivalency Privacy
(WEP), Wireless Protected Access (WPA), etc. for securing the data communication.
• Wi-Fi supports data rates ranging from 1 Mbps to 1.73 Gbps depending on the
standards (802.11a/b/g/n/ac) and access/modulation method.
• Depending on the type of antenna and usage location (indoor/outdoor), Wi-Fi offers a
range of 100 to 1000 feet.
Page 29
EMBEDDED SYSTEMS-18EC62 Azdocuments
ZigBee
• ZigBee is a low power, low cost, wireless network communication protocol based
on the IEEE 802.15.4-2006 standard.
• ZigBee is targeted for low power, low data rate and secure applications for
Wireless Personal Area Networking (WPAN).
• The ZigBee specifications support a robust mesh network containing multiple
nodes.
• This networking strategy makes the network reliable by permitting messages to
travel through a number of different paths to get from one node to another.
• ZigBee operates worldwide at the unlicensed bands of Radio spectrum, mainly at
2.400 to 2.484 GHz, 902 to 928 MHz and 868.0 to 868.6 MHz.
• ZigBee supports an operating distance of up to 100 metres and a data rate of 20 to
250 Kbps.
• In the ZigBee terminology, each ZigBee device falls under any one of the
following ZigBee device category:
o The ZC is responsible for initiating the ZigBee network and it has the
capability to store information about the network.
o It can talk only with a ZR or ZC and doesn't have the capability to act as a
mediator for transferring data from one device to another.
• The diagram shown in figure gives an overview of ZC, ZED and ZR in a ZigBee
network.
Page 30
EMBEDDED SYSTEMS-18EC62
o ZigBee PRO offers an optional new and innovative feature, ‘Green Power’
to connect energy harvesting for self-powered devices into ZigBee PRO
networks.
o The ‘Green Power’ feature of ZigBee PRO is the most eco-friendly way to
power battery-less devices such as sensors, switches, dimmers and many
other devices and allows them to securely join ZigBee PRO networks.
• ZigBee 3.0 delivers all the features of ZigBee while unifying the ZigBee
application standards found in ZigBee devices.
• The specifications for ZigBee is developed and managed by the ZigBee Alliance,
a non-profit consortium of leading semiconductor manufacturers, technology
providers, OEMs and end-users worldwide.
References
Page 31