BECE204L – MICROCONTROLLERS AND ITS
APPLICATIONS
MODULE - 1
INTRODUCTION TO
PROCESSORS
Module - 1
• Introduction to Microprocessors
Introducti and Microcontrollers, 8-bit/16-bit
on to Microprocessor Architectures
Processor [8085, 8086], Overview of Intel
Pentium I (i3, i5, i7)series
s processors
IMPORTANT
TERMINOLOGY
1
IMPORTANT TERMINOLOGY
Internal organization of computing device
Module - 1 Microcontroller and Its Applications 2
IMPORTANT TERMINOLOGY
CPU
Fetch, decode and executes the instruction stored in
memory
CPU must equipped with necessary resource
Important resources of CPU:
Registers – to store the information temporarily
ALU – to carryout Arithmetic and Logical operation
Program Counter – to point the next instruction to be
executed
Module - 1 Microcontroller and Its Applications 3
IMPORTANT TERMINOLOGY
MEMORY
One of the important feature
Binary digits : 0’s and 1’s
Bit: 0 or 1
Nibble: 4-Bits or half a byte – ex: 0101
Byte: 8-Bit or Byte – ex: 1010 0101
Word : 16-bits – ex: 1111 0000 1010 0101
Kilo Byte: 210 = 1024 bytes, Mega : 220, Giga : 230, Tera :
240
Ex: 16 Megabyte = 16 x 220 = 24 x 220 =224 Bytes
Memory Types: RAM & ROM
RAM or Volatile Memory : Temporary storage
ROM or Non-volatile Memory : Permanent storage
Module - 1 Microcontroller and Its Applications 4
IMPORTANT TERMINOLOGY
Input and outputs
I/O devices used to provide a communication with CPU
via keyboard, video monitor etc.,
Buses
CPU is connected through stripes of wires called Buses
Address bus: To identify the device connected to CPU.
Total number of memory location addressable by a CPU
is 2x, where x is the number of bits.
Data Bus: To carry info. in and out of CPU, 8-bit to 64-bit
Control bus: To provide the read or write signal to CPU
Module - 1 Microcontroller and Its Applications 5
IMPORTANT TERMINOLOGY
Steps to execute an instruction
1. Fetch Instruction from Memory
2. Decode Instruction and Fetch Operands
3. Perform ALU Operations
4. Store ALU result to register file
5. Memory Access (for load/store)
6. Update Program counter
Module - 1 Microcontroller and Its Applications 6
INTRODUCTION TO
MICROPROCESSOR &
MICROCONTROLLER
7
INTRODUCTION TO
MICROPROCESSOR
What is microprocessor?
It is a central processing unit (CPU) on a single
integrated circuit (IC) chip containing millions
of very small components including transistors,
resistors, and diodes that work together.
Module - 1 Microcontroller and Its Applications 8
INTRODUCTION TO
MICROPROCESSOR
Module - 1 Microcontroller and Its Applications 9
INTRODUCTION TO
MICROPROCESSOR
How does it look like?
Module - 1 Microcontroller and Its Applications 10
INTRODUCTION TO
MICROPROCESSOR
But inside?
Module - 1 Microcontroller and Its Applications 11
8085 MICROPROCESSOR -
ARCHITECTURE
MODULE - 1 Microcontroller and Its Applications 12
INTRODUCTION TO
MICROPROCESSOR
What was the first microprocessor?
Module - 1 Microcontroller and Its Applications 13
INTRODUCTION TO
MICROPROCESSOR
First Microprocessor 4004 - Inventors
Federico Faggin Marcian "Ted" Hoff Stanley Mazor Masatoshi Shima
Module - 1 Microcontroller and Its Applications 16
INTRODUCTION TO
MICROPROCESSOR
Evolution of Intel processors (1)
Module - 1 Microcontroller and Its Applications 17
INTRODUCTION TO
MICROPROCESSOR
Evolution of Intel processors (2)
Module - 1 Microcontroller and Its Applications 18
INTRODUCTION TO
MICROPROCESSOR
Microprocessor – Block Diagram
Module - 1 Microcontroller and Its Applications 20
INTRODUCTION TO
MICROPROCESSOR
Microprocessor is a CPU on a single chip.
Microprocessor has several support devices like
ROM, Read write memory, timer, serial interface, I/O
ports, etc.
All these support devices are interfaced to the
microprocessor through a system bus.
So finally we can conclude that all support devices in
a microprocessor are connected externally.
Module - 1 Microcontroller and Its Applications 21
INTRODUCTION TO
MICROPROCESSOR
Microprocessor applications
• Calculators
• Accounting system
• Games machine
• Complex Industrial Controllers
• Traffic light Control
• Data acquisition systems
• Multi user, multi-function environments
• Military applications
• Communication systems
Module - 1 Microcontroller and Its Applications 22
INTRODUCTION TO
MICROPROCESSOR
Microprocessor Based Temperature Monitoring System
Module - 1 Microcontroller and Its Applications 23
INTRODUCTION TO
MICROCONTROLLER
What is microcontrollers?
A microcontroller is a compact integrated circuit
designed to govern a specific operation in an
embedded system.
A typical microcontroller includes a processor,
memory and input/output (I/O) peripherals on a
single chip.
Module - 1 Microcontroller and Its Applications 24
INTRODUCTION TO
MICROCONTROLLER
Module - 1 Microcontroller and Its Applications 25
INTRODUCTION TO
MICROCONTROLLER
How does it look like?
Module - 1 Microcontroller and Its Applications 26
INTRODUCTION TO
MICROCONTROLLER
But inside?
Module - 1 Microcontroller and Its Applications 27
INTRODUCTION TO
MICROCONTROLLER
MICROCONTROLLER BLOCK DIAGRAM
Module - 1 Microcontroller and Its Applications 29
INTRODUCTION TO
MICROCONTROLLER
Microcontroller can be easily interfaced to external
peripheral devices like ADC, DAC, serial ports,
Bluetooth, Wi-Fi, etc.
Examples of the microcontrollers are microchip’s
PIC, Intel’s 80196, The 8051, Motorola’s 68HCxx.
Microcontrollers is mainly designed to control
specific electronic applications.
Microcontrollers are normally found in toys, office
machines, automobiles, home appliances, etc.
Module - 1 Microcontroller and Its Applications 31
INTRODUCTION TO
MICROCONTROLLER
Applications of microcontrollers
• Automobile
• Aeronautics
• Rail Transport
• Mobile communications
• Industrial processing
• Remote sensing , Radio and Networking
• Robotics
• Consumer electronics , music players
• Security (e-commerce, smart cards)
• Medical electronics (hospital equipment, and mobile monitoring) and
• Defense application
Module - 1 Microcontroller and Its Applications 32
INTRODUCTION TO
MICROCONTROLLER
Microcontroller Based Temperature Monitoring System
Module - 1 Microcontroller and Its Applications 33
MICROPROCESSOR vs
MICROCONTROLLER
Module - 1 Microcontroller and Its Applications 34
MICROPROCESSOR vs
MICROCONTROLLER
Paramete µP µC
rs
Architecture Von-Neumann and RISC Harvard and CISC
architecture architectures.
Flexibility designer can decide on the amount fixed amount of on-chip ROM,
of ROM, RAM and I/O ports. RAM, I/O ports
Processing High Low
Power
Design Time More Less
Power High Low
Protection Less More
Cost High Low
Module - 1 Examples 8085, 8086 8051
Microcontroller and Its Applications 35
ARCHITECTURE
Von Neumann Architecture Harvard Architecture
Module - 1 Microcontroller and Its Applications 36
ARCHITECTURE
X86 Architecture ARM, Power PC
Module - 1 Microcontroller and Its Applications 37
8085
MICROPROCESSOR
ARCHITECTURE
38
8085 MICROPROCESSOR -
ARCHITECTURE
The Intel 8085 ("eighty-eighty-five") is an 8-
bit microprocessor produced by Intel and introduced
in 1976.
It is software-binary compatible with the more-
famous Intel 8080 with only a few minor instructions
added.
However, it requires less support circuitry, allowing
MODULE - 1 Microcontroller and Its Applications 39
8085 MICROPROCESSOR -
ARCHITECTURE
An improvement over the 8080 is that the 8085 can
itself drive a piezoelectric crystal directly connected
to it
A built-in clock generator generates the internal high
amplitude two-phase clock signals at half the crystal
frequency (a 6.14 MHz crystal would yield a
3.07 MHz clock, for instance).
Both the 8080 and the 8085 were eclipsed by
the Zilog Z80 for desktop computers in the early-to-
mid-1980s.
MODULE - 1 Microcontroller and Its Applications 40
8085 MICROPROCESSOR -
ARCHITECTURE
The salient features of 8085 µp are:
It is a 8-bit microprocessor
Six 8-bit general purpose register arranged in pairs:
BC, DE, HL.
8-bit Data bus is a group of D0 – D7
It has 16-bit address bus and hence can address up
to 216 = 65536 bytes (64KB) memory locations
through A0-A15
The first 8 lines of address bus and 8 lines of data
MODULE - 1 Microcontroller and Its Applications 41
8085 MICROPROCESSOR -
ARCHITECTURE
It supports external interrupt request
A 16 bit program counter (PC)
A 16 bit stack pointer (SP)
It requires a signal +5V power supply and operates
at 3.2 MHZ single phase clock.
It is enclosed with 40 pins DIP (Dual in line
MODULE - 1 Microcontroller and Its Applications 42
8085 MICROPROCESSOR -
ARCHITECTURE
MODULE - 1 Microcontroller and Its Applications 43
8085 MICROPROCESSOR -
ARCHITECTURE
MODULE - 1 Microcontroller and Its Applications 44
8085 MICROPROCESSOR -
ARCHITECTURE
MODULE - 1 Microcontroller and Its Applications 45
8085 MICROPROCESSOR -
ARCHITECTURE
It consists of five essential blocks.
(1) Arithmetic Logic Section
(2) Register Section
(3) The Interrupt Control Section
(4) Serial I/O Section
(5) The Timing And Control Unit
MODULE - 1 Microcontroller and Its Applications 46
8085 MICROPROCESSOR -
ARCHITECTURE
ARITHMETIC LOGIC SECTION
This section consists of
(a) An arithmetic logic unit (ALU)
(b) Accumulator Register (A)
(c) Temporary Register (TR)
(d) A flag register (FR)
MODULE - 1 Microcontroller and Its Applications 47
8085 MICROPROCESSOR -
ARCHITECTURE
REGISTER SECTION
The 8085/8080A has six general-purpose registers to
store 8-bit data; these are identified as B,C,D,E,H, and L
They can be combined as register pairs - BC, DE, and HL
- to perform some 16-bit operations.
The programmer can use these registers to store or copy
data into the registers by using data copy instructions.
In addition, it has two 16-bit registers: the stack pointer
and the program counter.
MODULE - 1 Microcontroller and Its Applications 48
8085 MICROPROCESSOR -
ARCHITECTURE
INTERRUPT CONTROL SECTION
Interrupt is a mechanism by which an I/O or an
instruction can suspend the normal execution of
processor and get itself serviced.
Generally, a particular task is assigned to that
interrupt signal.
In the microprocessor based system the interrupts
are used for data transfer between the peripheral
devices and the microprocessor.
MODULE - 1 Microcontroller and Its Applications 49
8085 MICROPROCESSOR -
ARCHITECTURE
INTERRUPT CONTROL SECTION
Types of interrupts in 8085: Hardware & Software
Interrupts
Software Interrupt: A software interrupts is a
particular instructions that can be inserted into the
desired location in the program. There are eight
Software interrupts in 8085 Microprocessor i.e from
RST0 to RST7.
Hardware Interrupt: Generated by user externally
through one of the interrupts pins: TRAP, RST5.5,
MODULE - 1 Microcontroller and Its Applications 50
8085 MICROPROCESSOR -
ARCHITECTURE
SERIAL I/O SECTION
Serial communication is useful for data transfer
between two devices serially.
SID (serial input data) used to accept serial 1 bit data
under software control when a RIM instruction is
executed the SID pin data is loaded in bit D7 of
Accumulator
SOD (serial output data) used to transfer 1 bit data
under software control when a SIM instruction is
executed the SOD pin is set or reset depending on D7
MODULE - 1 Microcontroller and Its Applications 51
8085 MICROPROCESSOR -
ARCHITECTURE
TIMING AND CONTROL SECTION
It provides timing and control signal to the
microprocessor to perform the various operation.
It controls all external and internal circuits. It
synchronizes all the data transfers. It Performs decoding
of instruction.
There are three control signal:
1.ALE-Address Latch Enable – Used to Demultiplexing the lower order
Address and Data bus
2.RD- This is active low used for reading operation.
3.WR-This is active low used for writing operation.
MODULE - 1 Microcontroller and Its Applications 52
8086
MICROPROCESSOR
ARCHITECTURE
53
8086 MICROPROCESSOR -
ARCHITECTURE
8086 Microprocessor is an enhanced version of 8085
Microprocessor that was designed by Intel in 1976.
It is a 16-bit Microprocessor having 20 address lines and
16 data lines that provides up to 1MB storage.
It consists of powerful instruction set, which provides
operations like multiplication and division easily.
It supports two modes: Maximum mode and Minimum
mode.
Maximum mode is suitable for system having multiple
processors and Minimum mode is suitable for system
MODULE -having
1 a single processor.
Microcontroller and Its Applications 54
8086 MICROPROCESSOR -
ARCHITECTURE
Features
It is a first 16-bit μp having 16-bit ALU, 16-bit
registers, internal data bus, and 16-bit external data
bus resulting in faster processing..
8086 has a 20 bit address bus can access up to 220 =1
MB
It provides 14, 16 -bit registers.
It has multiplexed address and data bus AD0- AD15
and A16 – A19.
It is available in 3 versions based on the frequency of
operation 5MHz, 8MHz and 10MHz
MODULE - 1 Microcontroller and Its Applications 55
8086 MICROPROCESSOR -
ARCHITECTURE
8086 is designed to operate in two modes, Minimum
and Maximum
It can pre-fetches up to 6 instruction bytes from
memory and queues them in order to speed up
instruction execution.
It requires +5V power supply and 40 pin dual in line
package.
It uses two stages of pipelining, i.e. Fetch Stage and
Execute Stage, which improves performance.
Memory is byte addressable - Every byte has a
MODULE - 1 Microcontroller and Its Applications 56
8086 MICROPROCESSOR -
ARCHITECTURE
8085 vs 8086
Key features 8085 8086
size 8-bit microprocessor 16-bit microprocessor
Address bus 16-bit address bus 20-bit address bus
memory can access up to 64Kb can access up to 1Mb
Instruction queue doesn’t have an instruction Has an instruction queue,
queue
Pipelining doesn’t support a pipelined supports a pipelined
architecture architecture.
No. of I/O can address 2^8 = 256 I/O's can access 2^16 = 65,536
I/O's
Cost Low high
MODULE - 1 Microcontroller and Its Applications 57
8086 MICROPROCESSOR -
ARCHITECTURE
Pin diagram of 8086
MODULE - 1 Microcontroller and Its Applications 58
8086 MICROPROCESSOR -
ARCHITECTURE
Architecture of 8086
MODULE - 1 Microcontroller and Its Applications 59
8086 MICROPROCESSOR -
ARCHITECTURE
Bus Interface Unit (BIU)
8086 Microprocessor is divided into two functional
units, i.e., EU (Execution Unit) and BIU (Bus Interface
Unit).
The function of BIU is to:
Fetch the instruction or data from memory.
Write the data to memory.
Write the data to the port.
MODULE - 1
Read data from theand
Microcontroller port.
Its Applications 60
8086 MICROPROCESSOR -
ARCHITECTURE
Instruction Queue
1.To increase the execution speed, BIU fetches as many
as six instruction bytes ahead to time from memory.
2.All six bytes are then held in first in first out 6 byte
register called instruction queue.
3.Then all bytes have to be given to EU one by one.
4.This pre fetching operation of BIU may be in parallel
with execution operation of EU, which improves the
speed execution of the instruction.
MODULE - 1 Microcontroller and Its Applications 61
8086 MICROPROCESSOR -
ARCHITECTURE
Segment Registers
BIU has 4 segment registers, i.e. CS, DS, SS & ES. It
holds the addresses of instructions and data in
memory, which are used by the processor to access
memory locations.
It also contains one 16-bit instruction pointer (IP),
which holds the address of the next instruction to be
executed.
CS − It stands for Code Segment. It is used for
addressing a memory location in the code segment of
MODULE - 1 Microcontroller and Its Applications 62
8086 MICROPROCESSOR -
ARCHITECTURE
Segment Registers
DS − It stands for Data Segment. It consists of data
used by the program and is accessed in the data
segment by an offset address or the content of other
register that holds the offset address.
SS − It stands for Stack Segment. It handles memory
to store data and addresses during execution.
ES − It stands for Extra Segment. ES is additional
data segment, which is used by the string to hold the
extra destination data.
MODULE - 1 Microcontroller and Its Applications 63
8086 MICROPROCESSOR -
ARCHITECTURE
Execution Unit (EU)
Its main function is to control operations on data
using the instruction decoder & ALU.
The functions of execution unit are:
To tell BIU where to fetch the instructions or
data from.
To decode the instructions.
To execute the instructions.
MODULE - 1 Microcontroller and Its Applications 64
8086 MICROPROCESSOR -
ARCHITECTURE
Execution Unit (EU)
The EU contains the control circuitry to perform
various internal operations.
A decoder in EU decodes the instruction fetched from
memory to generate different internal or external
control signals required to perform the operation.
EU has 16-bit ALU, which can perform arithmetic and
logical operations like +, −, ×, /, OR, AND, NOT
operations on 8-bit as well as 16-bit.
MODULE - 1 Microcontroller and Its Applications 65
8086 MICROPROCESSOR -
ARCHITECTURE
Flag Register(FR)
A 16-bit flag register is a flip-flop which indicates
some condition produced by the execution of an
instruction or controls certain operations of the EU.
They are modified automatically by CPU after
mathematical operations.
It has 9 flags and they are divided into two
categories:
1. Conditional Flags
2. Control Flags
MODULE - 1 Microcontroller and Its Applications 66
8086 MICROPROCESSOR -
ARCHITECTURE
Flag Register(FR)
MODULE - 1 Microcontroller and Its Applications 67
8086 MICROPROCESSOR -
ARCHITECTURE
Conditional Flags
Conditional flags represent result of last arithmetic
or logical instruction executed. Conditional flags are
as follows:
Carry Flag (CF): indicates an overflow condition
Auxiliary Flag (AF): results in a carry/barrow from
lower nibble
Parity Flag (PF): indicate the parity of the result
Zero Flag (ZF): indicate result is zero or not
Sign Flag (SF): holds
MODULE - 1
the sign
Microcontroller of the result
and Its Applications 68
8086 MICROPROCESSOR -
ARCHITECTURE
Control Flags
Control flags are set or reset deliberately to control
the operations of the execution unit.
Control flags are as follows:
Trap Flag (TF): It is used for single step control and allows
the user to execute one instruction at a time for debugging.
Interrupt Flag (IF): It is an interrupt enable/disable flag
Direction Flag (DF): It is used in string operation. When it is
set then string bytes are accessed from the higher memory
address to the lower memory address and vice-a-versa.
MODULE - 1 Microcontroller and Its Applications 69
8086 MICROPROCESSOR -
ARCHITECTURE
General Purpose Registers of 8086
MODULE - 1 Microcontroller and Its Applications 70
8086 MICROPROCESSOR -
ARCHITECTURE
General Purpose Registers of 8086
These registers can be used as 8-bit registers
individually or can be used as 16-bit in pair to have
AX, BX, CX, and DX.
1. AX Register: AX register is also known as
accumulator register that stores operands for
arithmetic operation like divided, rotate.
2. BX Register: This register is mainly used as a base
register. It holds the starting base location of a
memory region within
MODULE - 1
a data segment.
Microcontroller and Its Applications 71
8086 MICROPROCESSOR -
ARCHITECTURE
General Purpose Registers of 8086
3. CX Register: It is defined as a counter. It is primarily
used in loop instruction to store loop counter.
4. DX Register: DX register is used to contain I/O port
address for I/O instruction.
Stack pointer(SP): It is a 16-bit register, which holds
the address from the start of the segment to the
memory location, where a word was most recently
stored on the stack.
MODULE - 1 Microcontroller and Its Applications 72
THANK YOU