Module 1
Module 1
Module 1
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.
1
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)
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.
Storage High storage capacity or memory to store Less memory capacity as compared to
capacity data and information on the system. computers.
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)
• 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.
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.
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)
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.
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
• 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.
• 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.
• 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.
8
Embedded Systems (Course Code 5041) Semester V ( Revision 2021)
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.
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.
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:
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.
12