Embedded System Lectures
Embedded System Lectures
1
CONTENT
✔ Generation of Computer
✔ Definition of Micro-processor
✔ Definition of Micro-controller
✔ Definition of Embedded System
2
GENERAL PURPOSE COMPUTER (GPC)
CPU
Memory Block
Vacuum Tubes
Advantages:
✔ Easily available
✔ Used machine language only
Disadvantages:
✔ Very large in size
✔ Consumed a large amount of energy
✔ Heated very soon due to thousands of vacuum
tubes
✔ Very slow speed
✔ Very less data storage
✔ Costly commercial production
▪ Honeywell 400
▪ IBM 7094
▪ CDC 1604
▪ CDC 3600
▪ UNIVAC 1108
▪ IBM 7030
CPU Transistors
Magnetic Fe - core
✔ ICs (SSI and MSI) were used to form CPU and other electronic components (Transistors).
✔ Semiconductor memories (RAMs and ROMs) replaced magnetic core type main memory.
✔ Examples
▪ IBM 360/370
▪ CDC 6600
▪ Honeywell-6000 series
▪ PDP (Personal Data Processor)
▪ TDC-316
▪ IBM-370/168
Semiconductor
Memory
Semiconductor
Memory
technology”
Embedded System
which includes
Microcontroller,
Input and output
devices
✔ Applications in communication: Radios, telephones, cellular phones, answering machines, fax machines,
wireless routers.
✔ Consumer electronics: Washing machine, clocks and watches, games and toys, remote controls, audio/video
electronics.
✔ Automotive systems: Braking system, electronic ignition, locks, power windows and seats, collision avoidance.
✔ Commercial usage: ATM machines, bar code readers, elevator controllers.
✔ Medical treatments: Cancer treatments, dialysis machines, blood pressure measuring equipment,
electrocardiography (ECG), etc.
✔ Industrial: Process automation, oil refineries, food processing plants, paper and board mills, etc.
✔ Military use: Missile guidance systems, global positioning systems, surveillance systems.
✔ While designing an embedded system, the factors that are of utmost importance are listed below.
1. Power consumption
2. Speed of execution
3. System size and weight
4. Performance accuracy
✔ Basics of Microprocessor
✔ Basics of Microcontroller
✔ Memory
✔ The Central Processing Unit (CPU) of a computer which built on a single Integrated Circuit (IC) is called
a microprocessor.
✔ It is usually called as the brain of a computer which is having the capability with 8, 16, 32, 64 bits, etc.
✔ It has a capability of executing instructions at an extremely high speed.
✔ The basic building blocks of an Micro-processor are as follows
Interconnecting
Buses
✔ The purpose of the arithmetic logic unit (ALU) is to perform arithmetic and logical operations such as
addition, subtraction, etc. and logic operations such as AND, OR operations, etc.
✔ Each operation is encoded by a unique binary combination, which is termed the operational code or
op-code.
✔ Control unit will generate suitable control signals such read, write signal, etc. for executing a particular
operation.
✔ The operations and operands (data) are initially stored in the memory which will be brought inside the
microprocessor using buses and are stored temporarily in microprocessor registers.
✔ The data transfer between each block is operated with help of interconnected buses such data bus,
address bus and control bus.
✔ The timing unit will provide timing signal or clock signal to the processor to carry out various activities
and to synchronize its tasks.
✔ In general, the steps are involved in execution of an instruction by CPU. However, not all of them are
required for all instructions.
Memory
▪ Load the address into the Program Counter (PC)
1000 10111101
in which the instruction is stored
Data 1001 10000011
▪ Fetch the opcode of the instruction from memory
1002 …
▪ Decode the opcode
1003 …
▪ Perform ALU operation (Optional)
Addresses 1004 …
▪ Access memory . …
▪ Update register file . …
▪ Update the Program Counter (PC) . …
. …
✔ A microcontroller combines a
microprocessor, read only memory (ROM),
random access memory (RAM), and
input/output (I/O) peripheral devices on a
single chip.
✔ The microprocessor sends signals to control
as well as to exchange information with
various subsystems inside the
microcontroller.
✔ The data, address, and control buses will be
used to communicate among these
subsystems.
✔ During the execution of a program, the address will be fetched from the memory i.e. RAM or ROM by placing
the address in the address bus generated by the processor.
✔ The data bus carries the data stored in a particular address.
✔ Increasing the size of the data bus allows more number of bits to be communicated between two subsystems.
✔ The control bus is used to generate control signals such as read/write inform whether the CPU is interested in
reading some information or wants to write some information to the location whose address was generated
over the address bus.
✔ The capability of a microprocessor to process simultaneously a certain number of bits defines the type of
microcontroller in terms of processing bits such as 8, 16, 32 bits, etc.
✔ Another feature of microcontroller is Input/Output (I/O) ports in which data can be processed through serial
(single line) and parallel (multiple lines) ports.
✔ To store binary information, digital electronic circuits such as complementary metal oxide semiconductor
(CMOS) can be built and a collection of a large number of such circuits is named memory.
✔ Memory is the portion of a computer or other system that stores binary data. In a computer, memory is
accessed millions of times per second.
✔ A memory unit is a device to which binary information is transferred for storage and from which
information is retrieved when needed for processing.
✔ Binary information received from an input device is stored in memory, and information transferred to an
output device is taken from memory.
✔ A memory unit is a collection of cells capable of storing a large quantity of binary information.
▪ Memory Read: The process of transferring the stored information out of memory.
✔ Memory
✔ Types of Memory
▪ RAM
▪ ROM
▪ Memory Read: The process of transferring the stored information out of memory.
✔ A memory device that can permanently keep binary data even when power is turned off or on. Hence
nonvolatile in nature.
✔ ROM does not have data inputs, because it does not have a write operation.
✔ Instructions or a program code are the information that is normally stored in a ROM.
✔ Example: used in Desktops and laptops for running the operating system.
✔ Only allow single byte read and write operations that makes them
slow speed device.
Flash Memory
✔ Flash memory is a type of EEPROM that allows read and write operations to be carried out in large
multi-byte blocks.
✔ In addition, the cost of flash memory is also low compared to byte-programmable EEPROM.
✔ Many modern PCs have their BIOS stored on a flash memory chip, called as flash BIOS and they are also
used in modems as well.
✔ Classification of Microprocessor
Architecture
✔ Using the complexity of instructions, it can be again categorised into two types
▪ Complex Instruction Set Computer (CISC)
▪ Reduced Instruction Set Computer (RISC)
Reduced Instruction Set Computer (RISC) Complex Instruction Set Computer (CISC)
▪ RISC processors have simple instructions taking ▪ CSIC processor has complex instructions that
about one clock cycle. The average clock cycle per take up multiple clocks for execution. The
instruction (CPI) is 1.5. average clock cycle per instruction (CPI) is in the
range of 2 and 15.
▪ Performance is optimized with more focus on ▪ Performance is optimized with more focus on
software hardware
▪ It has no memory unit and uses separate ▪ It has a memory unit to implement complex
hardware to implement instructions instructions
▪ It has a hard-wired unit of programming ▪ It has a microprogramming unit
▪ The instruction set is reduced i.e. it has only a few ▪ The instruction set has a variety of different
instructions in the instruction set. Many of these instructions that can be used for complex
instructions are very primitive. operations.
Reduced Instruction Set Computer (RISC) Complex Instruction Set Computer (CISC)
▪ The instruction set has simple addressing modes. ▪ CISC has many different addressing modes and
can thus be used to represent higher-level
programming language statements more
▪ Complex addressing modes are synthesized using efficiently.
the software. ▪ CISC already supports complex addressing modes
▪ Multiple register sets are present ▪ Only has a single register set
▪ RISC processors are highly pipelined ▪ They are normally not pipelined or less pipelined
▪ The complexity lies in the microprogram
▪ The complexity of RISC lies with the compiler that
executes the program
▪ Execution time is very high
▪ Execution time is very less
Reduced Instruction Set Computer (RISC) Complex Instruction Set Computer (CISC)
▪ Code expansion can be a problem ▪ Code expansion is not a problem
▪ The decoding of instructions is simple ▪ Decoding of instructions is complex
▪ It does not require external memory for ▪ It requires external memory for calculations
calculations
▪ The most common RISC microprocessors are ▪ Examples of CISC processors are the
Alpha, ARC, ARM, AVR, MIPS, PA-RISC, PIC, System/360, VAX, PDP-11, Motorola 68000
Power Architecture, and SPARC. family, AMD, and Intel x86 CPUs.
▪ RISC architecture is used in high-end applications ▪ CISC architecture is used in low-end
such as video processing, telecommunications, applications such as security systems, home
and image processing. automation, etc.
Memory-memory
✔ This type of ISA allows more than one operand of most instructions to be specified in memory.
✔ Examples: VAX and PDP series
Register-memory
✔ These architectures allow one operand of an instruction to be specified in memory, while the other operand
is in CPU register.
✔ Examples: x86 and Motorola 68k
Register-register
✔ This ISA classification is also called load-store architecture. Only load and store instruction can access the
memory.
✔ All instructions other than load and store instructions get their operands from and store their results to
registers.
✔ Examples: ARM and MIPS
Memory-memory
Slower
MOV [1000H], [3000H] Speed
ADD [R1], [2000H]
Register-memory
Medium
MOV R1, [1050H] Speed
SUB [2020H], R2
Register-register
MOV R1, R4 Faster Speed
✔ The Harvard architecture utilizes separate buses for accessing code and data memories.
✔ This allows instructions and data to be accessed simultaneously.