Module 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

MODULE I
Basics of embedded systems and its architecture

Syllabus Content:
Embedded Systems - Definition, difference from general purpose computers -
Classification of embedded systems, Application areas,
Components of embedded system hardware, and Software embedded into the system
Architecture of embedded system – Building blocks of an embedded system , Core of
embedded system – categories, Memory –ROM and RAM, Sensors, actuators and I/O sub

Embedded System: An embedded system can be thought of as a computer hardware system having
software embedded in it. An embedded system can be an independent system or it can be a part of a
large system. An embedded system is a microcontroller or microprocessor based system which is
designed to perform a specific task. For example, a fire alarm is an embedded system; it will sense
only smoke.

Difference between General Purpose Computer and Embedded System:

1
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

Paramater General Purpose Computer Embedded System


Basic It is a general purpose electronic device It is a specialized computer system that used
used to perform different types of tasks. to perform one or a few specific tasks.

System A computer typically consists of a CPU, Embedded system are designed with a
hardware storage unit, and I/O units. microcontroller which consists of a CPU,
memory unit, and I/O interface on a single IC
chip.

Processing High processing power. Relatively low processing power.


power

Storage High storage capacity or memory to store Less memory capacity as compared to
capacity data and information on the system. computers.

Size Generally larger in size. Smaller in size than computers.

Cost More expensive than embedded systems. Less expensive.

Operating Computers use a full-featured operating Embedded systems use a specialized


system system to run. operating system to run.

Software For computers, the general purpose The development of software for embedded
development development tools can be used to develop systems requires specialized and expert tools.
tools computer software.

Maintenance Computers need regular maintenance and Embedded systems do not require much
& updates updates. maintenance and updates.

Upgradability Computers are easily upgradable with new Embedded systems require significant
hardware and software. hardware modification for upgradation.

System Computers involve more complex system Embedded systems are comparatively less
complexity design. complex.

Real time Computers do not have real-time Embedded systems are purposely designed to
constraints constraints. operate in real time.

Applications Computers are used for a variety of Embedded systems are used in consumer
applications, such as word processing, electronic devices, medical devices, industrial
web browsing, data analysis, scientific control systems, etc.
simulation, communication, etc.

2
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

Q) List any three differences between embedded system and general purpose computer.(3 marks)
Q) List differences between general purpose computer and embedded system. (7 marks)

Classification of embedded systems:


1) Based on Generation: The classification of embedded systems is based on the generation in
which they are evolved from its initial version to the latest version.

• First Generation: The first-generation embedded systems were built around 8-bit
microprocessors and 4-bit microcontrollers. Such embedded system possess simple hardware
and firmware developed using assembly code. Digital telephone keypads, stepper
motor control units are examples of the first-generation embedded system.
• Second Generation: The second generation embedded systems uses 16-bit microprocessors
and 8-bit microcontrollers. They are more powerful and complex compared to previous
generation processors. Data acquisition systems, SCADA systems are examples of second-
generation embedded systems.
• Third Generation: The embedded system of this period has powerful 32-bit microprocessors
and 16-bit microcontrollers. Hence, its operation has become much more powerful and
complex than the second generation. During this period, domain-specific
processors/controllers like Digital Signal Processors (DSP), Application-Specific Integrated
Circuits (ASICs) and the concept of instruction pipelining, embedded real-time operating
system evolved into the embedded system industry. Robotics, industrial process control,
embedded networking are examples of the third-generation embedded system.
• Fourth Generation: The recent development of microprocessors and microcontrollers has
evolved during these modern days. New concepts like System-on-Chip(SOC),
reconfigurable processors, multicore processors, coprocessors also emerged into the
embedded market to add more powerful performance in the embedded system. These systems
also make use of the high-performance real-time operating system for their operation. Smart
phones, digital cameras, etc are examples of fourth-generation embedded systems.

2) Based on Complexity & Performance: The embedded systems are classified into three types
based on the complexity & performance of the systems.

• Small Scale Embedded Systems: Small Scale Embedded Systems are built with a single 8
or 16-bit microprocessor or controller. The main programming tools used are an editor,
assembler, cross assembler and integrated development environment (IDE). The hardware
and software complexities in small-scale embedded system are very low. It may or may not
contain an operating system for its functioning. An electronic toy is an example for a small-
scale embedded system.
• Medium Scale Embedded Systems: The Embedded system with medium performance 16-
bit or 32-bit microprocessor or controller, ASICs or DSPs fall under the medium scale
embedded systems. They have both hardware and software complexities. The main
programming tools used are C, C++, JAVA, Visual C++, RTOS, debugger, source code
engineering tool, simulator and IDE.
• Large scale Embedded Systems: The embedded systems have highly complex hardware and
software, built around 32-bit or 64-bit processors/controllers, RISC processors, SoC,
scalable and configurable processors. They are also called sophisticated embedded systems.

3
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

They are used for cutting-edge applications that need hardware and software Co-design,
where components have to be assembled into the final system. They also contain a high-
performance real-time operating system for task scheduling, prioritization and management.

Q) Classify embedded systems based on any two criteria.(7 marks)

Applications of Embedded Systems: Today, embedded systems play a critical role in various
sectors.Here are a few examples that make use of embedded technology.

• Telecommunications systems: Switches, Routers, Bridges


• Consumer electronics: MP3 players, Digital cameras, Mobile phones, Digital watches
• Household appliances : Washing machines, Television, Set top Boxes ,Microwave ovens,
Dish washer, refrigerators
• Home automation & Security: Air condition, CCTV Systems, Intruder alarms, Fire alarms
• Healthcare: Different Kinds of Scanners(MRI, CT, PET), EEG & ECG machines
• Automobiles: Anti-Lock Braking System (ABS), Traction Control (TCS) and Electronic
Stability Control (ESP)
• Banking & retails: Automated Teller Machine(ATM), Currency counter
• Measurements & Instrumentation: Digital Multimeter, Digital Storage Oscilloscope
(DSO), Programmable Logic Controller(PLC) systems.
• Computer peripherals: Printer, Scanner, Fax machine
• Card Readers: Barcode, Smart Card Readers, Hand held Devices etc.

Q) List any two examples of embedded systems.(1 mark)


Q) List any two applications of embedded systems.(1 mark)

Purpose of Embedded Sytems: Each embedded system is designed to serve a specific purpose
such as:
1. Data collection/Storage/Representation : Eg.Digital Cameras, Smart TV
2. Data Communication : Eg. Routers, Hub, Switches
3. Data Processing: Eg. Hearing Aids
4. Monitoring: Eg. ECG, EEG, DSO, Digital Multimeter
5. Control: Eg.Air Conditioner System
6. Application Specific User Interface: Eg. Mobile Phones

4
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

Elements of Embedded Systems: An embedded system has three components − Hardware,


Application Software & Real Time Operating system and it is supposed to do one specific task only.
Embedded system hardware/software are designed to regulate a physical variable or to manipulate
the state of some devices by sending signals to the actuators or devices connected to the output system,
in response to the input signal provided by the end users or sensors which are connected to the input
ports.

Hardware components:
1) System Core: A typical embedded system core contains a single chip controller/ Processors which
acts as the master brain of the system. The core of the system performs some predefined operations
on input data with the help of embedded firmware and sends some actuating signals to the actuator.
2) Input port and Sensors: The input signal provided by the end users or sensors which are
connected to the input ports. Keyboards, push button, switches, etc. are examples of input devices
3) Output port and Actuators: The processed control signals is send to the actuators or devices
connected to the output port. LEDs, LCDs, Piezoelectric buzzers, etc. are examples for output
devices.
4) Memory: The memory of the system is responsible for holding the proram and data. Some
controllers may contain internal memory or on-chip memory, while other requires external memory
or off-chip memory. There are two types of memory present:
• Fixed memory: It is a Read Only Memory(ROM) & is used for storing code or program.
The user cannot do any modifications in this type of memory. Common types used are
PROM, EPROM, EEPROM & Flash memory.
• Temporary memory or Working memory: It is a Random Access Memory(RAM) & is
used for performing arithmetic operations. Common types used are SRAM, DRAM and
NVRAM.
5) Communication interface: They are used in embedded systems to establish communication with
other sub-systems or embedded systems in the external world. There are several communication ports
including USB, UART, USB, I2C, SPI, and RS-485.
6) Other supporting Integrating Circuits(ICs) & Sub-Systems: It includes timers, clock circuits,
power supply, Interrupt controller, etc.. for the proper funtioning of an embedded system.

5
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

Application Software: Embedded systems software can be defined as specialized programming tools
in embedded devices that facilitate the functioning of the system. The main components of software
involves editor, compiler, assembler, linker, debugger and emulator.
• The code you write in C, Java, Python programming languages will be saved in a text file in
the editor.
• A compiler is used to translate high level language program into machine code.
• An assembler is used to translate an assembly language program into machine code.
• A debugger is a tool used for testing and debugging purposes. It scans the code thoroughly
and removes the errors and bugs, and identifies the places where they occur.
• A linker, also called a link editor, is a tool that takes one or more object files and combines
them to develop a single executable code.
• The main task of the emulator is to make the embedded system act like a real system in a
simulation environment.

Real Time Operating system (RTOS): It supervises the application software and provide
mechanism to let the processor run a process as per scheduling by following a plan to control the
latencies. RTOS defines the way the system works. It sets the rules during the execution ofapplication
program. A small scale embedded system may not have RTOS.

Q) Explain architecture of embedded system with simple block diagram.(7 marks)


Q) Distinguish hardware and software components in an embedded system. (3 marks)

Core of the Embedded System: The core of the embedded system falls into any oneof the
following categories.
1. Microprocessors
2. Microcontrollers
3. Digital Signal Processors(DSP)
4. Programmable Logic Devices (PLDs)
5. Application Specific Integrated Circuits (ASICs)
6. Commercial off-the-shelf Components (COTS)

Microprocessor Vs Microcontroller:

Microprocessor Microcontroller
• It is a very compact electronic • It is a highly integrated electronic chip
representing a CPU which is capable of which consists of a processing
performing arithematic & logical element(CPU), a small memory (RAM,
operations. ROM, EPROM), I/O ports, etc. on a
single chip.
• The memory and I/O component are • The memory and I/O output component
connected externally. are present internally.

6
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

• System requires more hardware and • Most of the peripherals are in-built and
connecting peripherals externally makes internally connected makes the circuit
the circuit more complex & expensive. simple & economical.
• Since memory and system buses are • Less access time due to in-built
provided externally, access times for peripherals and hence processing speed is
memory and I/O devices are more, hence faster.
processing speed is slower.
• It is mainly used for general purpose • It is used for specific purpose design &
design & operations. operations
• Microprocessors are generally used in • Microcontrollers are generally used in
personal computers. washing machines, air conditioners,
mobile phones, smart watches, digital
cameras etc.
• Eg. Intel 8085, 8086, core i3, i5,i7 • Eg. Intel 8051, PIC, AVR

Digital Signal Processors(DSP): It is a specialized microprocessor chip, with its architecture


optimized for the operational needs of audio, image & video applications. They are faster than general
purpose microprocessors in digital signal processing. They are often used in as mobile phones,
fax/modems, disk drives, radio, printers, medical and health care devices, MP3 players, high-
definition television (HDTV), and digital cameras.

Harvard Vs Von-Neumann Processor/Controller Architecture:

Von Neumann/Priceton architecture Harvard architecture

• It has single memory storage to hold both • It has separate program and data
program instruction and data. space.

• There is common bus for data and • Separate buses are used for
instruction transfer. transferring data and instruction.

• Comparitively slower operation • Faster operation

• Eg. Intel 8085, 8086, 80286, 80386 • Eg. Intel 8051, 8052, PIC

7
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

Types of Memory:
RAM(Random Access Memory) or Temporary memory: It is the data or working memory of the
controller/processor. It retains the content as long as the power is applied to the chip. If the power is
turned off then its contents will be lost forever. It is a volatile momory. It is of 2 types:

• SRAM (Static RAM): It stores data in the form of voltage. They are made up of flip flops.
A typical SRAM cell is made of 6 transistors. It is fast in operations.
• DRAM (Dynamic RAM): It stores data in the form of charges. They are made up of MOS
transistor gates. A typical DRAM cell is made of one capacitor and one transistor. It has high
memory density compared to SRAM. It is slow in operations. A DRAM controller
periodically refreshes the data stored in the DRAM. By refreshing the data several times a
second, the DRAM controller keeps the contents of memory alive for a long time.
• NVRAM(Non - Volatile RAM): It is usually a SRAM with battery backup. When power is
turned on, the NVRAM operates just like any other SRAM but when power is off, the
NVRAM draws enough electrical power from the battery to retain its content. NVRAM is
fairly common in embedded systems. It is more expensive than SRAM.
ROM(Read Only Memory) or Fixed memory: It is the code or program memory of the
controller/processor. It retains the content even the power applied to the chip turns off. It is a non -
volatile momory. It is of 3 types:

• Masked ROM: It is an one time programmable memory. These are hardwired memory
devices found on system & are factory programmed. It contains pre-programmed set of
instruction and data and it cannot be modified by end user.
• PROM (PROGRAMMABLE ROM ): It is also an one time programmable memory. This
memory device comes in an un-programmed state i.e. at the time of purchased it is in an un-
programmed state and it allows the user to write his/her own program or code into this
ROM.

• EPROM (ERASABLE-AND-PROGRAMABLE ROM): It is same as PROM and is


programmed in same manner as a PROM. It can be erased and reprogrammed repeatedly as
the name suggests. The erase operation in case of an EPROM is performed by exposing the
chip to a source of ultraviolet light, but is a time consuming process.

• EEPROM(Electrically Erasable and Programmable ROM). It is same as EPROM, but the


erase operation is performed electrically. Any byte in EEPROM can be erased and rewritten
as desired. The erasing process is faster compared to EPROM.

• Flash: Flash memory is the most recent advancement in memory technology. Flash memory
devices are high density, low cost, nonvolatile, fast (to read, but not to write), and
electrically reprogrammable. Flash is much more popular than EEPROM and is rapidly
displacing many of the ROM devices. Flash devices can be erased only one sector at a time,
not byte by byte.

Q) Describe about memory types used in embedded systems.(3 marks)

8
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

Sensors: A sensor is transducer that is used to generate an input signal to a measurement,


instrumentation or control system. The signal produced by a sensor is an electrical analogy of a
physical quantity, such as distance, velocity, acceleration, temperature, pressure, light level, etc.
Sensors act as an input device. Eg. Temperature sensors, proximity sensors, Accelerometer sensors
etc.

Actuators: It is a form of transducer device (mechanical or electrical) which converts signals


to corresponding physical action (motion). Actuator acts as an output device.

Q) ----- is an example for sensor used in an embedded system. (1 mark)

I/O Sub-systems:It facilitates the interaction of embedded system with external world.

• Light emitted Diode (LED): It is an output device & is used as an indicator for the status of
various signals or situations. LED is a p-n junction diode and it contains an anode & a cathode.
For proper functioning of the LED, the anode of it should be connected to +ve
terminal of the supply voltage and cathode to the –ve terminal of supply voltage. A resistor
is used in series between the power supply and the resistor to limit the current through the
LED.

• 7-Segment LED Display: It is an output device for displaying alpha numeric characters &
contains 8 LED segments arranged in a special form. Out of the 8 LED segments, 7 are used
for displaying alpha numeric characters. LED segments are named A to G and the
decimal point LED segment is named as DP. The current flow through each of the LED
segments should be limited to the maximum value supported by the LED display unit by
connecting a current limiting resistor.

• Stepper Motor: It is an electro mechanical device which generates discrete displacement


(motion) in response to DC electrical signals. It differs from the normal DC motor in its
operation. The DC motor produces continuous rotation on applying DC voltage whereas a
stepper motor produces discrete rotation in response to the dc voltage applied to it. Stepper
motors are widely used in industrial embedded applications, consumer electronic products
and robotics control systems.

9
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

• Relay: It is an electro mechanical device which acts as dynamic path selectors for signals and
power. The ‘Relay’ unit contains a relay coil made up of insulated wire on a metal core and
an armature with one or more contacts. It works on electromagnet principle. When a
voltage is applied to the relay coil, current flows through the coil, which in turn generates a
magnetic field. The magnetic field attracts the armature core and moves the contact point. The
movement of the contact point changes the power/signal flow path. The Relay is normally
controlled using a relay driver circuit connected to the port pin of the processor/controller.

• Push button switch: It is an input device. Push button is used for generating a momentary
pulse. In embedded application push button is used as reset, start switch & pulse generator.

• Matrix Keyboard: It is an input device to provide input data. In a matrix keyboard, the keys
are arranged in matrix fashion. To detect which key is pressed from the matrix keyboard, the
row lines are to be made low one by one and read the columns. Pull-up
resistors are connected to the column lines to limit the current that flows to th row line on a
key press.

• Piezo Buzzer: It is a piezoelectric device for generating audio indications in embedded


applications. A Piezo buzzer contains a piezoelectric diaphragm which produces audible
sound in response to the voltage applied to it.

10
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

Communication Interface: They are essential for communicating with various subsystems of the
embedded system and with the external world.The communication interface can be of two types:

• Onboard Communication Interface: The communication interface channel which


interconnects the various components within an embedded system. Eg: Serial interfaces like
I2C, SPI, UART, 1-Wire etc and Parallel bus interface.
• External Communication Interface: It is responsible for data transfer between the
embedded system and other devices or modules. The external communication interface can
be either wired media or wireless media and it can be a serial or parallel interface. Eg: Infrared
(IR), Bluetooth (BT), Wireless LAN (Wi-Fi), Radio Frequency waves (RF), GPRS etc.
(wireless) and RS-232, USB, Parallel port etc. (wired).

Universal Asynchronous Receiver Transmitter (UART): It is an asynchronous form of serial data


transmission. It doesn't require a clock signal to synchronize the transmitting end and receiving end
for transmission. Instead UART uses start and stop bits with actual data bits, which defines the start
and end of data packet. For proper communication, the Transmit line (TX) of the sending device
should be connected to the Receive line (RX) of the receiving device. UART works under full
duplex communication mode meaning it can transmit and receive data at same time.

Inter-integrated-circuit (I2C): Inter Integrated Circuit (I2C) is a serial communication interface


developed by Philips Semiconductors. The main purpose is to provide connection between peripheral
chips with microcontroller. I2C interface is a master to slave communication interface. Each slave is
been provided with unique address.
I2C interface has two wires SDA (Serial Data Line) and SCL (Serial Clock Line) to carry information
between devices. Data is transferred bit by bit along a single wire (the SDA line). These two active
wires are said to be bidirectional. It is a synchronous form of serial data transmission.

Serial Peripheral Interface (SPI): It is one of the serial communication interface developed by
Motorola. It is a 4-wire protocol namely MOSI (Master Out Slave In), MISO (Master In Slave Out,
SS (Slave Select), and SCLK (Serial Clock). MOSI and MISO are the data lines.
As I2C protocol, SPI is also a master to slave communication protocol. In SPI, the master device first
configures the clock at a particular frequency. Furthermore the SS line is used to select the appropriate
slave by pulling the SS line low where it is normally held high. The communication is established
between the selected slave and the master device as soon as appropriate slave device is selected. SPI
is a full duplex communication interface. It is a synchronous form of serial data transmission.

11
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)

RS232 (Recommended Standard 232): It is a full duplex, wired, asynchronus mode serial
communication interface developed by Electronics Industrial Assosiation(EIA). It extend the UART
communication signal for external data communication.

Universal Serial Bus (USB): It is a common interface that allows the connection between external
devices and controllers. It connects peripheral devices including digital cameras, mice, keyboards,
printers, scanners, media devices, external hard drives, and flash drives. USB protocol sends and
receives the data serially between host and external peripheral devices through data signal lines D+
and D-. Apart from two data lines, USB has VCC and Ground signals to power up the device.

Bluetooth: it is a Low-cost short-distance radio communications standard. Bluetooth is wireles and


replaces cable technology. It uses radio waves for transmitting and receiving data. It operates at
2.4GHz of radio spectrum.

Wireless Fidelity(Wi-Fi): It is the popular wireless communication technique for networked


communication of devices. Wi-Fi operates at 2.4GHz or 5GHz of radio spectrum. Wi-Fi supports
Internet Protocol (IP) based communication. In an IP based communication each device is identified
by an IP address, which is unique to each device 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 Radio).

Q) Give two examples for on-board communication interfaces in a common embedded


system hardware. (1 mark)
Q) Describe different types of communication interfaces in an embedded system. (7 marks)

12

You might also like