You are on page 1of 16

Chapter

B ASICS OF
M ICROPROCESSOR
[8 M ARKS ]

Chapter Details
1.1

Evolution of Microprocessor

1.2

Salient Features of 8085


Microprocessor

1.3

Pin Diagram of 8085 and


Description

1.4

Architecture of Intel 8085

1.5

8085 System Bus

1.6

Demultiplexing of AD0-AD7 of 8085

1.7

Limitations of 8-bit Microprocessor

1-2

Microprocessor & Programming

Graphical and Statistical representation of questions asked from this chapter


in previous years MSBTE Question Papers

Statistical Analysis

MSBTE paper
S-2010
W-2010
S-2011

Total marks questions asked in this chapter


08
08
08

1-3

Basics of Microprocessor

1.1

EVOLUTION OF MICROPROCESSOR

A common way of categorizing microprocessors is by the


number of bits that their ALU can work with at a time.
The first commercially available microprocessor was the Intel
4004 produced in 1971 and known as 4-bit processor.
It contains 2300 PMOS transistors and mostly used with
calculator.
In 1972 8008 microprocessor is produced known as 8-bit
microprocessor but requires 20 or more additional devices to
form a functional CPU.
In 1974, Intel introduced the 8-bit microprocessor which has
much larger instruction set than 8008 and requires only two
additional devices to form a functional CPU. After that Motorola
came out with MC6800 as 8-bit general purpose CPU. It has the
advantage that it requires only +5V power supply.
In 1977 Intel produced 8085 microprocessor. It was
implemented with 6200 transition on a single chip NMOS
device.

Microprocessor: It is
an electronic device
made up of silicon
technology which can
compute mathematical
and logical operations.


BTE[S.10,W.10]-2M
Describe evolution
of microprocessor
with suitable
examples.
Or
Give evolution of
microprocessor.

In 1978 to 1982 Intel introduced 16-bit microprocessors 8086


microprocessor. 0186/80286 which are used for embedded
control applications. These processors were implemented with
NMOS technology which was more faster than NMOS.
In 1985 to 1989 32-bit microprocessor 80386/80486 were produced. They can directly
access upto 4 GB of memory and had multiuser and multitasking features.
80486 added more parallel execution capability with 5 pipeline stages. It also has built in
math co-processor and 8 kB code and data cache.
Pentium produced in 1993 which has superscalar, super pipelined architecture.
It has 2 pipelines where each one is a 4 stage pipeline.
Then Pentium Pro P-I, P-II, P-III and P-IV are developed. All are 64-bit microprocessor.
It can directly address upto 64 GB memory.
P-II supports multimedia extension instruction.
P-III supports and has been developed by using 0.25 micro technology.

1-4
1.2

Microprocessor & Programming

SALIENT FEATURES OF 8085 MICROPROCESSOR


i.

8085 microprocessor can read or write or perform


arithmetic and logical operations on 8-bit data at time.
Device
ii.
It is a single chip NMOS device implemented with 6200
SOD: Serial Output
transistors.
Device
iii. It requires +5V power supply.
iv. It provides on chip clock generator.
v.
Maximum clock frequency is 3 MHz and minimum clock frequency is 500 kHz.
vi. It provides 74 instructions with five addressing modes.
vii. It provides 5 hardware interrupt and 8 software interrupts.
viii. It has 8 data lines and 16 address lines hence capacity is 216 = 64 kB of memory.
ix. It can generate 8-bit I/O address so 28 = 256 input and 256 output ports can be
accessed.
x.
It provides two serial I/O lines SID and SOD so that serial peripherals can be
interfaced directly with 8085 microprocessor.
SID: Serial Input

1.3

PIN DESCRIPTION
X1
X2

1
2

40
39

VCC

RESET OUT
SOD

3
4

38
37

HLDA
CLK OUT

HOLD

SID

36

RESET IN

TRAP

35

READY

RST 7.5

34

RST 6.5

33

IO / M
S1

RST 5.5

32

RD

31

WR

30
29

ALE
S0

INTR

10

INTA
AD0

11
12

INTEL
IC
8085
P

AD1

13

28

A15

AD2

14

27

A14

AD3

15

26

A13

AD4

16

25

A12

AD5

17

24

A11

AD6

18

23

A10

AD7

19

22

A9

VSS(GND)

20

21

A8

Figure 1.1: Pin diagram of


8085

Basics of Microprocessor

1-5

Pin Description
The microprocessor 8085 is a 40 pin INTEL IC whose internal circuit is made of 6200
transistors. The microprocessor 8085 consists of following pins.

4.

5.

X1

Quartz crystal
X2

to reset microprocessor. When the signal on this pin is


low, the program counter is set to zero. The buses are tri
stated and the microprocessor is reset.
RESETOUT: This is active high output signal generated by microprocessor after
receiving RESET signal and used to reset other devices in the system.
SOD, SID: The SOD stands for Serial Output Data and SID stands for Serial Input
Data. These two pins are used to perform serial communication with
microprocessor. The SID pin is used to receive data serially from external devices
and similarly the SOD pin is used to output data serially by microprocessor for
external devices.
Hardware Interrupt Pin: (TRAP, RST 7.5, RST 6.5, RST
RST: Restart Interrupt
TRAP: Non Maskable
5.5, INTR) microprocessor consists of five different
Interrupt
hardware interrupt pins which are TRAP, RST 7.5, RST
6.5, RST 5.5 and INTR.
The TRAP is the highest priority interrupt followed by RST 7.5, RST 6.5,
RST 5.5 and INTR which is the lowest priority interrupt.
Whenever the microprocessor is interrupted it will branch from the main program
to a sub program called as ISR (Interrupt Service Routine).
(Main Program)
M/P
A
B

ISR
P

es

3.

RESETIN : This is an active low input reset signal used

br
an
ch

2.

X1, X2: A Quartz crystal is connected on pin X1, X2 which


is used to generate the system clock of the frequency
3.14 MHz.

1.

Interrupt

X
P
s
rn
tu
re
ck
ba

HLT

Figure 1.2: ISR

RET

1-6

Microprocessor & Programming

After executing the entire sub program or ISR microprocessor returns back from the
sub program to the main program by executing instruction RET (Return).
6.

INTA (Interrupt Acknowledgement): If microprocessor is interrupted by INTR

signal then it will generate logic 0 on INTA pulse.

The INTA is used to get the sub program address from external devices.

7.

Address Lines (A15-A8 and AD7-AD0): The microprocessor 8085 has 16 bit address
lines from A15-A8 and AD7-AD0. These lines are used to transfer 16 bit address of
memory as well as 8-bit address of I/O ports.
The lower 8 lines (AD7-AD0) are often called as multiplexed data lines.

8.

Status Pins (S1, S0): The microprocessor 8085 has two status pins as S1, S0 which is used to
indicate the status of microprocessor or operation which is performed by microprocessor.
S1
0
0
1
0

S0
0
1
0
1

Operation
HLT state
Writing operation
Reading operation
Opcode fetch operation

9.

ALE (Address Latch Enable): The ALE signal is used to enable or disable the
external latch IC (74373/8212).
The external latch IC is used for the demuiltiplexing of AD7-AD0 lines, i.e., it is
used to separate the address and data from AD7-AD0 lines.
If ALE = 1/0 then external latch IC is enabled / disabled respectively.

10.

RD : Read: This is active low signal which indicates that the selected I/O or
memory device is to be read and also is available on the data bus.

11.

WR : Writing: This is active low signal which indicates that the data on data bus
are to be written into a selected memory location.

12.

13.

14.

IO/ M : (Input / Output / Memory): This is used to select either Input / Output
devices or memory operation. When it is high it indicates an I/O operation and
when it is low, it indicates a memory operation.
Ready: The READY signal is used to introduce wait state in microprocessor if
READY = 0 then microprocessor ethers into wait state and if READY = 1
microprocessor does not enters into wait state.
CLKOUT: The CLK out signal is used to provide system clock to the external
devices.
The frequency of this signal is same as the frequency of crystal present on X1, X2
pins, i.e., 3.14 MHz.

1-7

Basics of Microprocessor
15.

16.

HOLD, HLDA: The HOLD signal is used to transfer


microprocessor in the HOLD state. If HOLD = 1 then
HLDA: Hold
microprocessor enters into HOLD state and it gives logic 1
Acknowledgement
on HLDA pin (HOLD acknowledge).
In HOLD state microprocessor losses the control over address lines, data lines,
control lines and these lines are now used by 8237 DMA controller.
Power Supply Pins (VCC, GND): The microprocessor 8085 has single VCC pin and
single GND pin. The VCC is connected to +5 volt and similarly GND is connected
to system GND.
IO/M
0
0
1
1

1.4

RD
0
1
0
1

WR
1
0
1
0


BTE [S-2010] 6M

Operation
Memory reading
Memory writing
I/O reading
I/O writing

Draw the block


diagram of 8085
microprocessor.
Explain the function
of instruction register,
program counter and
stack pointer.

ARCHITECTURE OF INTEL
8085 OR BLOCK DIAGRAM
RST 7.5
RST 4.5

RST 6.5

SID

RST 5.5
INTR

Interrupt
control

TRAP

SOD

Serial I/O
control

INTA

8 bit data bus


8
Accumulator
(8)

Temporary
(8)

Flag
(8)

IR
(8)
8
8

8
W(8)

Z(8)

B(8)

C(8)

D(8)

E(8)

H(8)
8
8

ALU
(8)

ID
256

L(8)
SP(16)

PC(16)
INC/DEC (16)

256

16
8

X1
X2

Timing and control


unit

Address
buffer
8

Control
signal
ALE RD WR

VCC GND
(+5V) (+5V)

Figure 1.3

A15 - A8

8
Address/
Data buffer
8
AD7 - AD0

1-8

Microprocessor & Programming

The microprocessor (microprocessor) 8085 is 40 pin NMOS family IC whose internal


circuit is made of 6200 transistors. The internal Block diagram of microprocessor 8085 is
known in figure.

1.4.1

Bus

A bus is a collection of conducting path which is used to transfer signal from one
functional unit to another functional unit. The microprocessor 8085 has three types of
buses.
i.
Address bus
ii.
Data bus
iii. Control bus
are only used by microprocessor and user is not allowed to use these register.

1.4.2

ALU (Arithmetic Logical Unit)

ALU stands for arithmetic and logical unit. The ALU of microprocessor 8085 is 8-bit
microprocessor.
The ALU is responsible to perform all arithmetic and logical operation like addition,
subtraction, comparison, ANDING, etc.

BTE [S-2011 1M]
Describe the register
organization of 8085
microprocessor.

1.4.3
a.

Accumulator (ACC): The accumulator is 8-bit register


which contains 8 flip flops. Hence it can store
maximum 8-bit data.
The importance of accumulator is that, whenever
microprocessor performs any arithmetic or logical
operation in ALU then first 8-bit number is always
transferred from accumulator and result is stored back
to the accumulator.

Register organization
i. Accumulator
ii. Temporary register
(W, Z, Temp)
iii. General purpose
Register (B, C, D, E,
H, L)
iv. Stack Pointer (SP)
v. Program Counter
(PC)
vi. Inc/Dec Register
vii. Flag Register

Register Organization

b.

Temporary
Register:
(TEMP,
W,
Z):
The
microprocessor 8085 has three 8-bit temporary registers
as temp W, Z. These registers are only used by
microprocessor and user is not allowed to use these
register.

c.

General Purpose Register: The microprocessor 8085


has six 8-bit general purpose registers as B, C, D, E, H
and L. These registers can be used to store any 8-bit
user data.

Basics of Microprocessor

1-9

For storing a 126 bit number, we have to make pairs of two 8-bit registers like, BC,
DE and HL.
d.

Stack Pointer (SP): The stack pointer is a 16-bit register which is used to store the
16-bit address of stack memory. It is used as a memory pointer. It points to a
memory location in R/W memory called as a stack.
The beginning of the stack is defined by loading a 16-bit address in the stack
pointer. Stack Pointer (SP) points current top of stack.

e.

Program Counter (PC): The program counter is 16 bit register which is used to
store 16 bit address of memory during the execution of program. The function of
program counter is to point to the next byte of instruction is to be fetched. When the
byte is being fetched, the program counter is automatically incremented by one to
point the next memory location.

f.

INC/DEC Register: Increment/Decrement: It is a 16-bit register used to increment


or decrement the contents of program counter and stack pointer.

g.

Flag Register: The flag register of microprocessor 8085 is of 8-bit which contains 8
flip-flop, hence it can store maximum 8-bit data.
D7

D6

D5

D4

D3

D2

D1

D0

SF

ZF

AC

PF

CF

Sign
flag

Zero
flag

Auxillary
carry flag

Parity
flag

Carry
flag

Figure 1.4: Flag register format of 8085 microprocessor

The flag register contains following five different flags.


i.

ii.

iii.

Carry Flag (CF): Whenever microprocessor performs addition of two 8- bit


numbers then the carry generated after the addition of entire 8-bit number is
directly copied into carry flag.
Similarly whenever microprocessor performs the subtraction of two 8-bit
numbers then borrow required for subtraction is directly copied into carry
flag.
Parity Flag (PF): The count of logic 1 in 8-bit result is called a s parity.
If the count of logic 1 in 8-bit result is an even No. i.e. 0/5/2/4/6/8/ then the
parity is even and PF = 1.
Similarly if the count of logic 1 in 8-bit result is an odd number i.e. 1/3/5/7/
then it is an odd parity and PF = 0.
Auxillary Carry Flag (AC): The auxillary carry flag is also known as
intermediate carry or half carry.

1-10

iv.

v.

h.

Microprocessor & Programming


Whenever microprocessor performs addition of two 8-bit numbers then the
carry generated after the addition of four LSBs is directly copied into AC flag.
Similarly whenever microprocessor performs the subtraction of two 8-bit
numbers then borrow required by 5 LSBs is directly copied into AC flag.
Zero Flag (ZF): If the result obtained is completely zero, i.e., all 8-bits of result
is zero then ZF = 1.
But if the result obtained is non-zero then ZF = 0.
Sign Flag (SF): This sign flag is only used for signed binary numbers. If the
result obtained is negative number then SF = 1. But if the result obtained is a
positive number then SF = 0.

Instruction Register (IR)


BTE [S.2010] 6M
Describe function of
8085
i.
ALU
ii.
Timing and
control unit
iii.
Instruction
Register

IR
(8)

ID
86256
256
Timing and
Control
unit

The Instruction Register is an 8-bit register which is used to store 8-bit opcode of
the instruction fetched from memory.
The opcode present in IR is then transferred to instruction decoder.
The instruction decoder has 8 input and 256 output lines. The ID decodes the 8-bit
opcode of 8-bit each instruction so as to general 256 bits micro codes or micro
instruction.

1.4.4

Instruction Decoder (ID)

It accepts an op. code of the instruction from the instruction register decode it and give
information to control logic. The information include what operation is to be performed
who is going to perform, how many operand bytes the instruction has, etc

1.4.5

Timing and Control Unit

The timing and control unit accepts information from the instruction decoder and
generates different control signal. This unit synchronizes all the microprocessor

Basics of Microprocessor

1-11

operation and generates control and status signal necessary for communication between
the microprocessor and peripherals.

1.4.6

Interrupt Control Unit

The 8085 microprocessor includes four maskable interrupts and one non-maskable
interrupt. The microprocessor can ignore or delay a maskable interrupt request if it is
performing some critical task. However it has to respond to a non-maskable request
immediately.
Maskable Interrupts
INTR Interrupt Request- priority 5
RST 7.5
Restart Interrupt priority 2
RST 6.5
Restart Interrupt priority 3
RST 5.5
Restart Interrupt priority 4
Non-Maskable Interrupt TRAP Priority - 1

When microprocessor is executing a program it checks the INTR or any other interrupt
signal during the execution of each instruction.
If any signal is high the microprocessor completes the current instruction or executes the
interrupt service routine.

For INTR interrupt microprocessor sends INTA signal as an acknowledgement to INTR


request. RST are the vectored interrupts. During the execution of these interrupts
program control to automatically transferred to specific location in memory without any
external hardware.
TRAP is non-maskable interrupt known as NMI. It has highest priority. It need not be
enables and it cannot be disabled.

1.4.7

Serial I/O Control Unit

The 8085 microprocessor has two pins specially designed for software controlled serial
I/O data transmission. Data transfer is controlled through two instructions RIM and SIM.
RIM instruction is used to input serial data through SID line whereas SIM instruction is
necessary to output data serially from SOD line.

1.4.8

Address/Data Buffer

Buffers are commonly used to increase the driving capability of dada bus and address
bus.

1-12
1.5

Microprocessor & Programming

8085 SYSTEM BUS

A bus is a collection of conducting path which are used to transfer signal from one
functional unit to another functional unit.
The microprocessor 8085 has following types of buses.
i.

Address Bus: The microprocessor 8085 has 16-bit address bus from A15-A8 and
AD7AD0. The address bus id used to transfer 16 bit address of memory as well as 8bit address of I/O ports.

ii.

Data Bus: The microprocessor 8085 has 8-bit data bus from AD4-AD0. These lines
are often known as well as multiplexed lines and time shared lines.
The AD7-AD0 are used to transform both addresses as well as data. But the address
and data is not transferred simultaneously so these lines are often known as time
shared lines.

iii.


Control Bus: The microprocessor 8085 has 3 control buses as IO/M, RD, WR .

The IO/M is used to define operation either of memory or I/O ports. The RD and

WR is used during reading and writing operation respectively.

1.6

DEMULTIPLEXING OF AD0-AD7 OF 8085

In the 8085 microprocessor the higher address lines, i.e., A8 - A15 are directly available,
but the lower order address lines are multiplexed with data bus in time sharing.
Hence, the de-multiplexing of address/data bus is required, i.e. separation of address
and data bus.
In microprocessor 8085, AD7-AD0 pins are used to transfer 8 LSBs of address as well as 8-bit
data. Practically AD7-AD0 pins are separated or demultiplexed using 8-bit internal latch
(IC 8212).
When microprocessor will transfer 16 bit address on A15- A8 and AD7-AD0 pins, then at
the some time When microprocessor will give ALE = 1 (Address latch enable).
When ALE = 1, then latch IC is enabled. So LSBs of address on AD7-AD0 pins is stored
in this latch. So address is continuously available on A15-A8 and A7-A0.
When microprocessor will transfer 8-bit data on AD7-AD0 pins then When microprocessor
gives ALE = 0. So latch IC is disabled and the 8-bit is not stored in the latch and data is
available on data line D0-D7.

1-13

Basics of Microprocessor
8

A15 - A8

A15 - A8
+5 V

P
8
0
8
5

AD7 - AD0

VCC

ALE
8

A7 - A0

8 bit
latch IC
8212
GND

D7 - D0

Figure 1.5: Demultiplexing of address data pins of 8085

1.7

LIMITATION OF 8085 MICROPROCESSOR

i.

The 8085 is on 8-bit microprocessor hence it can perform operation only on two 8bit numbers.

ii.

The 8085 has 16 bit address lines and 8-bit data lines.

iii.

The 8085 can address maximum memory of 64 kB (216).

iv.

The 8085 cannot perform any operation on ASCII number.

v.

The 8085 cannot perform multiplication and division of numbers.

vi.

The 8085 cannot perform subtraction, multiplication and division of BCD number.

vii.

The 8085 cannot transfer the data directly from one memory to another memory.

viii. The 8085 can only address 256 I/O ports.


ix.

The 8085 cannot perform the pipelining of instruction.

x.

The 8085 microprocessor there is no provision to determine whether the result


obtained is within the limit of 8/16 bit number.

1-14

Microprocessor & Programming

Summary

Microprocessor is an electric device which is made up of silicon technology and can compute
mathematical and logical operations.

8085 microprocessor 8-bit ALU so it is called 8-bit microprocessor and at a time only 8-bit data
processes. It is 40 pin IC.

8085 has 16 bit address lines and 8-bit data lines.

Internal Architecture of 8085 microprocessor includes

ALU (Arithmetic and Logical Unit)

Timing and control unit

Instruction register and instruction decoder (IR and ID)

Register Array
8085 has
a.

6 general purpose register


B, C, D, E, H, L

b.

Accumulator

c.

Program Counter (PC)

d.

Stack Pointer (SP)

e.

Temporary register (W, Z, temp)

Interrupt control unit (Hardware and software interrupt)

Serial I/O control

Address and Data Buffer

Flag Register

ALE is used to demultiplex the address and data signal.

Basics of Microprocessor

1-15

Exercise ____________________________________
1.

State the function of program counter and stack pointer of 8085.

(Refer 1.4) 2M

2.

State the function of following of 8085:

(Refer 1.4) 4M

i.

Accumulator

ii.

Temporary Register

iii.

Flag Register

iv.

ALU

3.

List maskable and non-maskable interrupts of 8085 microprocessor. (Refer 1.3) 2M

4.

Describe the function of following block of 8085.


i.

ALU

ii.

Timing and control unit

iii.

Instruction Decoder

(Refer 1.4) 6M

5.

Explain de-multiplexing of address and data bus in 8085.

(Refer 1.6) 6M

6.

State limitation of 8085 microprocessor.

(Refer 1.7) 2M

7.

Draw neat labeled architecture of 8085 indicating different.

(Refer 1.4) 6M

8.

List all registers of 8085 microprocessor and categorize them into 8 and 16 bit
register.
(Refer 1.4) 4M

1-16

Microprocessor & Programming

BTE Questions________________________________
[S.11 - 8M]

1.

Describe the register organization of 8085 microprocessor.


(Refer 1.4)

[W.10 - 6M]

2.

Describe the function of following block of 8085. (Refer 1.4)


i.

ALU

ii.

Timing and control unit

iii.

Instruction decoder

[S.10, W.10 - 2M]

3.

Describe evolution
example.

of

microprocessor

with

suitable

[S.10 - 6M]

4.

Draw the block diagram of 8085 microprocessor. Explain


the function of instruction register, program counter and
stack pointer. (Refer 1.4)

[SP - 6M]

5.

Explain Flag Register of microprocessor. (Refer 1.4)

[SP - 2M]

6.

Explain system bus of 8085 microprocessor. (Refer 1.5)

[SP - 4M]

7.

Explain De-multiplexing of address and data bus? (1.6)

You might also like