0% found this document useful (0 votes)
5 views

Lect 5 Introduction of Microprocessors and Organization of 8085

The document provides an overview of microprocessors, detailing their functions, evolution across five generations, and specific features of the Intel 8085 microprocessor. It explains the architecture of a microcomputer system, including the roles of its components such as the CPU, memory, and input/output devices. Additionally, it describes various pins and their functions in the 8085 microprocessor, highlighting their significance in data transfer and control operations.

Uploaded by

hunterabc213
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lect 5 Introduction of Microprocessors and Organization of 8085

The document provides an overview of microprocessors, detailing their functions, evolution across five generations, and specific features of the Intel 8085 microprocessor. It explains the architecture of a microcomputer system, including the roles of its components such as the CPU, memory, and input/output devices. Additionally, it describes various pins and their functions in the 8085 microprocessor, highlighting their significance in data transfer and control operations.

Uploaded by

hunterabc213
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

Operating System CHAPTER - 04

By- Ram Rai Sir


Q.1 What is microprocessor? List its functions.
Ans.:
1) Microprocessor is a semiconductor, multipurpose, programmable
logic device that reads binary instructions from a storage device
called memory, accepts binary data as input and processes data
according to the instructions and provides result as output.
2) The electronic logic circuits in microprocessor are capable of
performing various computing functions and making decisions to
change the sequence of program execution.
3) Microprocessor can also be viewed as an integrated circuit, that
contains processing capabilities of large computers.
4) A microprocessor can be roughly divided into three parts:
1. Arithmetic and logic unit (ALU)
ALU Register
2. Registers

3. Control Unit
Control Unit

A.L.U is arithmetic and logic unit, where arithmetical and logical


operations are carried out. Registers are primarily used to store data
temporarily during execution of program. Control unit provides timing
and control signals to the whole system. It also controls flow of data.
5) The functions of microprocessor are given below :
a) To fetch, decode and execute instructions.
b) To transfer data from one block to another block or from one
block to I/O lines.
c) To give proper response to different externally produced
interrupts according to their priority.
d) To provide control and timing signals to the whole system
according to the instructions.
Q.2 Write a short note on evolution of microprocessor giving one
example of each generation.

Ans.: The evolution of microprocessor can be explained by following five


generations :
(i) First generation:
(a) Intel's 4004 was the first microprocessor available in the
market. It was a four bit pmos microprocessor introduced in 1971,
designed to be used in calculators.
(b) In 1972, Intel introduced first general purpose 8-bit
microprocessor Intel 8008.
(c) It was followed by Intel's 8080 in 1973 and Motorola's 6800 in
the same year.
e.g. Intel's 4004 (4-bit), 8008 (8-bit)
Motorola's 6800 (8-bit)
(ii) Second generation :
(a) In 1974, Intel's 8080, Zilog's Z-80, Motorola's M6800 were
introduced. All these were 8-bit microprocessors.
(b) During second generation, the development of microprocessor
has been in a direction to complete microprocessor system
(microcontroller) i.e. CPU, ROM, RAM, clock, I/O ports all in single
package.
(c) In 1976, INTEL's 8085, 8-bit microprocessor was introduced.
(d) In 1977, 12-bit microprocessor Intersil's IM6100 and Toshiba's
T8190 developed.
eg. INTEL's 8085 (8-bit)
Zilog's Z80 (8-bit)
(iii) Third generation:
(a) Intel introduced first 16-bit microprocessor 8086 in 1978.
(b) It was followed by Zilog's Z-8000 in 1979 and Motorala's
68000 in 1980.
(c) In third generation, memory space was 64 KB. The other
features were full arithmetic execution and efficient higher level
language addressing.
e.g. Intel's 8086 (16-bit), Zilog's Z-8000 (16-bit)
(iv) Fourth generation :
(a) In 1981, Intel introduced first 32-bit microprocessor 80386. It
can address physical memory of 4 GB.
(b) Other 32-bit microprocessor Hewlett Packard's HP-32
announced in 1982.
(c) In 1987, Motorola's 68020, a 32-bit microprocessor introduced.
e.g. INTEL 80386 (32-bit) , INTEL 80486 (32-bit)
(v) Fifth generation:
(a) Intel made improvement in microprocessor design to provide
greatest speed.
(b) Also system can run on new OS like UNIX, LINUX etc.
(c) The processor in this generation is called Pentium. It is 64-bit
microprocessor. e.g. Intel 80586, Intel Pentium IV.
Q.3 Draw a neat block diagram of microcomputer system? Explain
each block function in brief.

Ans.: Block Diagram of Microcomputer :


Microcomputer mainly contains following blocks:
1) Input device (keyboard)
2) Microprocessor Unit (MPU)
3) Program memory (ROM)
4) Data memory (RAM)
5) Output device (7-segment display)
Fig. shows detail architecture of a microcomputer with all essential
bus and control signal lines.
1) Input Device (Keyboard):
The instructions as well as data prepared for particular program
are entered through input device like keyboard.
2) Keyboard Interface:
Due to following reasons it is necessary to connect keyboard to
keyboard interface:
i) When instruction and data is entered through keyboard, it is not
possible to feed the instruction directly to MPU because MPU may
be busy in performing previous instruction or other task. So it is
stored in a special chip called keyboard interface.
ii) The speed of input device and MPU may not be equal.

3) Microprocessor Unit (MPU):


i) MPU processed system data and required control signals are
generated to control the system.
ii) All processing and data flow is done in the system with MPU
chip.
4) ROM (Read Only Memory):
i) It contains permanently stored program known as monitor
program.
ii) It has address bus, chip select and read signal line.
It allows only to read stored information.
5) RAM (Random Access Memory):
i) It is used to store data, it is a temporary storage device.
ii) Reading and writing of data into memory, so bidirectional data
bus is required.
6) Output Device (7 Segment Display):
Output of the system i.e. stored data in display interface are
displayed on seven segment display.
7) Display Interface:
A special display interface circuit or IC is used to store data and
drive the display.
8) Address Decoder:
It decodes the address and selects the proper chip (device).
9) Clock:
i) Whole circuitry is synchronized with clock.
ii) The speed of the system depends on the clock frequency.
10) Power Supply:
Power supply is necessary to operate the circuit.
Q.4 List any three primary functions of CPU of microcomputer.

Ans.: The primary functions of the CPU of a microcomputer are –


a) To fetch, decode and execute program instructions in the
proper order.
b) Transfer data to and from memory and to and from the
input/output sections.
c) Responds to external interrupts.
d) Provide overall timing and control signals for the entire system.
ii) Several Registers:
a) Accumulator:
a) Accumulator is an 8-bit register used to store 8-bit data.
b) In arithmetic and logic operation, result is stored in
accumulator.
b) Instruction Register:
a) This is an 8-bit register.
b) The first byte of an instruction is stored in this register.
c) Status Register:
a) Status register is called as flags, which consist of flip-flops that
are set or reset according to data conditions in accumulator.
b) The generic MPU has two flags: Zero and carry flag.
d) Program Counter :
a) It is a 16-bit register containing the address of next executable
instruction.
b) It can be incremented or reset by the control section.
e) Stack Pointer
a) It is a 16 –bit register consisting of address of memory location
called stack.
b) Stack is R/W memory used for temporary storage.
iii) Instruction Decoder:
a) This interpretes the content of instruction register and
determines exact steps to be followed in executing the entire
instruction.
b) It directs the control section accordingly.
Q.5 Give the features of microprocessor 8085.
Ans. The main features of microprocessor 8085 are as listed below:
1) Intel's 8085 is an 8-bit microprocessor, 8-bit data bus width
indicates that 1 byte of data can be passed on this bus.
2) 8085 chip is available in 40 pin plastic ceramic DIP package.
3) It has 16 bit address bus that means it can address a physical
memory of 64 kilo bytes.
4) Address bus is divided into two groups. The least significant 8 bits
of address bus are transferred on same eight lines of the data bus.
Such bus is called multiplexed bus. Most significant bits of address
are transmitted on address bus.
5) To select external memory or I/O devices, microprocessor 8085
uses I/O mapped I/O system.
6) To communicate with external devices, microprocessor 8085 used
interrupt method. (Hardware interrupt)
7) The microprocessor requires +5V single power supply and can
operate with 3MHz single phase clock.
Q.6 Explain the purpose of following pins in microprocessor 8085.
Ans.: (i) ALE:
1) Address Latch Enable, one special output signal generated by
microprocessor to indicate beginning of the operation.
2) It is positive going pulse generated during first clock cycle of
machine state and it indicates that the bits on AD, AD, are address
bits.
3) This signal enables the lower 8-bit of the address from the
multiplexed bus to latch into external flip-flop or peripheral device.
After AD, AD, changes over to data bus.
4) ALE is never tristated.
(ii) RD:
1) This is read control signal. This is active low signal.
2) This signal indicates that selected I/O or memory device is to be
read and data is available on data bus.
3) It is tristated during HOLD and HALT.

(iii) WR:
1) This is write control signal. This is also active low signal.
2) This signal indicates that the data on data bus are to be written into
selected memory or I/O locations.
3) It is tristated during HOLD and HALT.
Q.6 Describe in brief functions of following pins in 8085
microprocessor.
(a) HOLD (b) INTR (c) RESET IN
Ans.:
(a) HOLD
1) It indicates that a peripheral such as DMA (Direct Memory Access)
controller is requesting the use of address and data buses.
2) Having received a HOLD request the microprocessor releases the
use of the buses as soon as the current machine cycle is completed.
Internal processing may continue.
3) The processor regains the bus after the removal of the HOLD
signal.
(b) INTR
1) INTR is a level triggered maskable Interrupt Request input signal.
2) This is a general purpose interrupt with lowest priority.
3) When interrupt signal is given on this line, the microprocessor
executes interrupt acknowledge cycle to read interrupt information
from interrupting device.
4) When this arises, program counter does not increment its contents.
5) The INTR is enabled or disabled by software.
Q.7 Describe the functions of following pins in 8085 microprocessor.
1) READY 2) RST 7.5 3) S0S1 4) HLDA
Ans.
1) READY:
a) It is a input signal used by the microprocessor to sense whether
a peripheral is ready to transfer data or not.
b) This signal is used to delay the microprocessor until a slow
responding peripheral is ready to send or accept data.
c) If READY is high, the peripheral is ready. If it is low, the
microprocessor waits for an integral number of clock cycles until it
goes high.
d) It is used to synchronize slower peripheral to faster
microprocessor.
2) RST 7.5:
a) RESTART INTERRUPT: This signal is used to interrupt the
microprocessor.
b) When an interrupt is recognized the next instruction is executed
from a fixed location in the memory i.e. 7.5 × 8 = 003CH
c) It is maskable interrupt.
d) They cause an internal restart to be automatically insert.
3) 𝑆0 𝑆1
a) These are status signals sent by microprocessor to distinguish the
various operations or type of machine cycle in progress.
b) Status code for Intel 8085 is :
𝑺𝟏 𝑺𝟎 Operations
0 0 HALT
0 1 WRITE
1 0 READ
0 1 FETCH

4) HEADL
a) It is signal for HOLD ACKNOWLEDGEMENT.
b) A HLDA output indicates to a peripheral that a HOLD request has
been received and that the microprocessor will relinquish control of
buses in the next clock cycle.
c) After the removal of HOLD request HLDA goes low.
Q.8 Explain following Pins of 8085 Micro – processor.
1) CLK (out) 2) WR 3) RST 5.5
Ans.
RST 5.5 : This signal is used to interrupt the microprocessor. When
an interrupt is recognized the next instruction is executed from a
fixed location in memory i.e. 002C H. it is maskable interrupt. It
cause internal restart to be automatically insert.
Q.9 Describe the functions of following pins of 8085:
(i) SID (ii) READY (iii) ALE

Ans. (i) SID –


1. SID (Serial Input Data). It is a data line for serial input.
2. The 7th bit of the accumulator is inputed on SID line when RIM
instruction is executed.
Q.10 Explain functions of the following pins of 8085 Microprocessor:
(i) Multiplexed address/data bus pin (AD0 - AD7)
(ii) RST 6.5
(iii) CLK (OUT)
Ans.:
(ii) Restart interrupt signal is used to interrupt the microprocessor.
When an interrupt is recognised the next instruction is executed
from a fixed location in memory i. e. 6.5 × 8 = 0034. It is maskable
interrupt. The cause an internal restart to be automatically insert.
Q.11 Explain the functions of the following pins of 8085:
Ans. :
(a) ഥ
IO | M:
(1) It is a status signal indicates whether the address bus is for I/O
device or for memory.
(2) When it goes high, the address on the address bus referring I/O
device and when it goes low, the address on the address bus
referring memory.
(3) It is tristated during HOLD and HALT.
(b) TRAP:
(1) This signal is used to interrupt the microprocessor. It has highest
priority among interrupts.
(2) When an interrupt is recognized the next instruction is executed
from a fixed location in the memory i.e. 0024 Η.
(3) It is nonmaskable interrupt. It is unaffected by any interrupt
enable or mask.
(c) SOD:
(1) Serial Output Data. It is a data line for serial output.
(2) The 7th bit of the accumulator is outputted on SOD line when SIM
instruction is executed.
(3) The SOD line eliminates the need for an output port in the software
controlled serial I/O.
Q.11 Explain the functions of the following pins of 8085:
(1) Reset out (2) INTA (3) CLKOUT

Ans.: (1) RESET OUT:


(1) It indicates that the MPU is being reset.
(2) It is connected to peripherals to reset them when MPU is reset.
(2) INTA
(1) INTA is an Abbrevation for interrupt acknowledgment.
(2) A low an INTAindicates that the processor has acknowledged an
INTR interrupt.
(3) CLKOUT:
(1) The whole circuitry is synchronized with clock
(2) The speed of the system depends on the clock frequency.
Q.12 Describe functions of the following pins of 8085:
Ans:
i) X1, X2
i) The X1 and X2 are connected to an external crystal or an RC or LC
network which drives an internal circuitry of the microprocessor.
ii) It produce a suitable dock for the operation of microprocessor.
iii) The frequency is internally divided by two, therefore the crystal
should operate twice the operating frequency.
iv) The operating frequency range of 8085 is 500 KHz to 3MHz
ii) AD0-AD7
Multiple Address/ Data Bus:
i) The signal lines AD, to AD, are bidirectional They Serve a dual
purpose. They are used as the low - order address bus as well as
the data bus.
ii) In executing an instruction, during the earlier part of the cycle,
these lines are used as the low - order address bus. During later
part of the cycle, these lines are used as the data bus
iii) However, the low-order address bus can be separated from these
signals by using a latch.
iii) A8-A15
i) The 8085 has 16 address lines
ii) The most - significant bits (A8-A15) of address bus are separate.
The least significant bits A0 - A7 are time multiplexed with the bits
of the bidirectional data bus D0 –D7
iii) The eight signal lines (A8-A15) which are unidirectional and used
as the high - order address bus.
Q.13 Explain multiplexed address/ data bus in microprocessor 8085.
Ans:
1) Microprocessor 8085 has 8-bit data bus and 16-bit address bus.
2) The least significant 8-bits of address bus are passed on the same
eight lines as that of data bus i.e. on the signal lines AD7 - AD0
3) These signal lines are bi-directional.
4) They are used for dual purpose for lower order 8-bit of address and as
well as 8-bit of data. This is known as multiplexing and such bus is
known as multiplexed bus.
5) To multiplexed means, first to select one and then other.
6) In executing an instruction, during earlier part of cycle these lines are
used as the lower order address bus. During later part of cycle, these
lines are used as data bus.
7) The 8085 has a special signal called ALE (Address Latch Enable) for
informing the peripheral when the address/data bus is sending
address and when it is functioning as a data bus.
8) If signal of pin ALE is high (i.e. 1), then the bits on AD, - AD, are
address bits else they are data bits.
Q.14 What are I/O mapped I/O and memory mapped I/O schemes ?
Which one 8085 uses? OR Write a note on addressing I/O devices.

Ans: Microprocessor is connected to various other devices such as


memory and I/O devices. There are two schemes by which these
devices can be addressed:
(I) Memory mapped I/O scheme:
1) In memory mapped I/O scheme, whenever an address appearing
on address bus is for an I/O device, then there is no other
information on corresponding memory location.
2) e.g. suppose address 0002 is for output device and whenever this
address appears on address bus and is to be used to select output
device, there is no information on memory location 0002.
3) In other words, when an address is used to select I/O device, then
that address is not used for any memory location.
(II) I/O mapped I/O :
(1) In I/O mapped I/O, same address may be used for I/O device as
well as for memory location.
2) Microprocessor 8085 uses I/O mapped I/O scheme to address I/O
devices.
3) Using status signal, differentiation between I/O operations and
memory operations is done.
4) When the signal is IO/M ഥ high, the address on the address bus is for
an I/O device and when it is low, the address on the address bus is
for a memory location.
5) The instruction IN and OUT are used to address I/O devices.
6) The various operations to be carried out are identified by using
status signals S0 and S1, as follows:
Status Signals
Machine Cycle Status

IO/𝐌 S0 S1
0 0 1 Memory write
0 1 0 Memory read
1 0 1 I/ O write
1 1 0 I/O read
0 1 1 Opcode fetch
1 1 1 Interrupt acknowledge
Floating 0 0 Halt
Floating Unused Unused Hold
Floating Unused Unused Rest
Q.15 What is an interrupt ? Explain in detail.

Ans:
1) An interrupt is a subroutine called, initiated by external device
through hardware (hardware interrupt) or microprocessor itself
(software interrupt).
2) An interrupt can also be viewed as a signal, which suspends the
normal sequence of microprocessor and then microprocessor
gives service to that device which has given the signal. After
completing the service, microprocessor again returns to the main
program.
3) Microprocessor is connected to different peripheral devices. To
communicate with these devices, microprocessor 8085 uses
interrupt method.
4) An interrupt is an input signal, which transfers control to specific
routine known as Interrupt Service Routine (ISR). After executing
ISR, control is again transfer to main program.

5) Microprocessor 8085 has two types of interrupts:


(i) Software interrupt
(ii) Hardware interrupt
4) The software interrupts has more priority than any hardware
interrupt.
6) Software interrupts are not requested by external peripheral
devices. All software interrupts are non-maskable. Some hardware
interrupts are maskable.
Q.16 Give all the hardware interrupts provided by 8085. List them
according to their priority.
Ans:
1) 8085 provides 5 hardware interrupts:
(i) TRAP (ii) RST 7.5
(iii) RST 6.5 (iv) RST 5.5 (v) INTR
2) These interrupts are vectored interrupts. It means that when these
interrupts are given, it is directed (or vectored) to transfer the
control to specific memory location given by –
TRAP = 4.5 x 8 = 0024 H RST 7.5 7.5 x 8 = 003C H
RST 6.5 6.5 x 8 = 0034 Η RST 5.5 5.5 x 8 = 002C H
Among these interrupts, TRAP is non-maskable interrupt which
can not be disabled. But the other four interrupts are maskable
interrupts, which can be disabled.
4) The TRAP has highest priority and the INTR has lowest priority
among the hardware interrupts. The hardware interrupts in
descending order of priority are listed below:
i) TRAP - highest priority ii) RST 7.5
iii) RST 6.5 iv) RST 5.5
v) I NTR - lowest priority.
Q.16 What are software interrupts?
Ans:
1) The normal operation of a microprocessor can be interrupted by
special instruction. Such an interrupt is called as software
interrupt.
2) 8085 provides 8 user defined software interrupts RST 0 to RST 7
where RST means restart.
3) These interrupts are vectored interrupts and when these
interrupts are called the control is transferred to the memory
location as shown below.
4) Software interrupts are not used to handle asynchronous events.
They are used to call software routines like single step, break point
etc.
5) These interrupts are requested by executing interrupt instructions.
They can also be requested due to arithmetic errors.
(6) After execution of these interrupts, program counter is incremented. The
microprocessor does not execute any interrupt acknowledge cycle. The
microprocessor executes normal instruction cycle.
(7) These interrupts cannot be ignored or masked. They have more priority
than any hardware interrupt.
(8) They are not used to interface peripherals. That means they does not
improve throughput of the system. They are used in program debugging.
Interrupt Mnemonics Call Location (Hex)
RST 0 0000
RST 1 0008
RST 2 0010
RST 3 0018
RST 4 0020
RST 5 0028
RST 6 0030
RST 7 0038
Q.17 What are the Hardware interrupts ? Explain vectored and Non-
vectored interrupts of 8085 MPU.
Ans:
• Hardware interrupt are pin of Microprocessor. These are used to
handle asynchronous events. These interrupts are requested by
external device. After execution of these interrupts program
counter is not incremented. These interrupt may be non-maskable
or maskable.
• They have lower priority than any other software interrupt. It
improves throughput of the system. 8085 provides 5 hardware
interrupts. These are TRAP, RST 7.5, RST 6.5, RST 5.5 & INTR
Vectored Interrupt - It means that when these interrupts are given,
it is directed to transfer the control to specific memory location
given by TRAP-0024 H, RST 7.5-003CH, RST 6.5-0034 H & RST 5.5-
002C H
• Among these interrupt TRAP is non-maskable interrupt which
cannot be disabled while other four interrupts are maskable,
which can be disabled.
• Non- Vectored Interrupt - Interrupt which does not transfer to
specific memory location is called Non Vectored Interrupt. INTR is
non vectored interrupt because it is only request taken by other
device & does not transfer control to any memory location. INTR
has lowest Priority.
Q.18 Differentiate between non-maskable and maskable interrupts.
Ans.:
1) Non-maskable interrupts :
i) These interrupts can not be masked or cannot made pending.
ii) Non-maskable interrupt disables all maskable interrupts.
iii) It is used for emergency purpoes like power failure, smoke
detector, parity check error etc.
iv) It has higher priority than maskable interrupts.
v) It is always vectored interrupt.
vi) Response time for non - maskable interrupt is low.
2) Maskable interrupts :
i) These interrupts can be masked or made pending.
ii) A maskable interrupt cannot disable any non-maskable interrupt.
iii) It is used to interface with peripheral devices.
iv) It has lower priority than non-maskable interrupts.
v) It may be vectored or non-vectored interrupt.
vi) Response time for maskable interrupts is high.
Q.19 What are Vectored Interrupts ? What are Maskable and Non-
maskable Interrupts ? State all Hardware Interrupts of 8085
Microprocessor with their priorities and branching or vector
addresses.
Ans.:
(1) Vector Interrupt: When interrupts are directed to transfer the
control to specific memory location then it is called vectored
interrupt.
Ex. - TRAP-0024H, RST7.5-003CH
RST6.5 0034H, RST5.5-002CH
(2) Maskable Interrupt: The interrupt which can be masked or made
pending is known as maskable interrupt. It cannot disable by any
non-maskable interrupt. It has lower priority than non-maskable
interrupt. It may be vector or non Vectored interrupt. Ex. - RST7.5,
RST5.5, RST6.5 and INTR
(3) Non maskable Interrupt: The interrupt which cannot be masked or
do not made pending is known as Non-maskable interrupt. It can
disable all maskable interrupt. It has higher priority than maskable
interrupt. It is also always vectored interrupt. Ex. - TRAP
(4) The TRAP has highest priority and INTR has lowest priority among
the hardware interrupts. The Hardware interrupt with their
priority and vector address are listed below:
Interrupt Priority Vector
Address
TRAP Highest Priority 0024 H
RST7.5 Lower than TRAP 003C H
RST6.5 Lower than RST7.5 0034 H
RST5.5 Lower than RST6.5 002C H
INTR Lower priority -
Q.20 Draw a labelled functional block diagram of microprocessor 8085.
Ans.:
(1) Vector Interrupt: When interrupts are directed to transfer the
control to specific memory location then it is called vectored
interrupt.
Ex. - TRAP-0024H, RST7.5-003CH
RST6.5 0034H, RST5.5-002CH
(2) Maskable Interrupt: The interrupt which can be masked or made
pending is known as maskable interrupt. It cannot disable by any
non-maskable interrupt. It has lower priority than non-maskable
interrupt. It may be vector or non Vectored interrupt. Ex. - RST7.5,
RST5.5, RST6.5 and INTR
Q.21 Explain the function of ALU with simple block diagram.
Or Draw a neat labelled diagram of generic ALU and explain its
working.
Ans.: The organization of arithmetic and logic unit is shown in figure.
1) The arithmetic and logic unit is 8-bit unit.
2) It performs arithmetic, logic and rotate operations.
3) It consists of binary adder to perform addition and subtraction by
2's complement method.
4) The result is typically stored in accumulator.
5) Accumulator, temporary register and flag register are closely
associated with A. L.U.
6) The temporary register is used to hold data during an
arithmetic/logic operation.
7) The flags are set or reset according to the result of operations in
status register.
Q.22 Draw the diagram of CPU registers of Intel 8085 with function of
each register.
Draw and explain programming model of 8085 MPU.
Ans.:

1) The 8085 MPU uses both 8-bit and 16-bit registers.


2) The 8085 has eight addressable 8-bit registers. Six of these can be
used as 8-bit registers or 16- bit register pairs.
3) In addition, the 8085 contains two more 16-bit registers.
4) The 8085 registers are as follows:
(1) The accumulator (A register): It is the focus of all accumulator
operations which include arithmetic, logic, load and store and I/O
instructions. It is an 8-bit register.
(2) The general-purpose registers: BC, DE and HL may be used as
six 8-bit or as three 16-bit registers depending on the instruction
being executed. The HL register pair (call a data pointer by Intel)
can be used for address pointing. A few instructions use the BC and
DE register pairs as address pointers, but normally they are used
as general purpose data registers.
(3) The program counter (PC): It always points to the memory
location of the next instruction to be executed. It always contains a
16-bit address.
(4) The stack pointer (SP): It is a special purpose address pointer
(or data pointer) that always points to the top of the stack in RAM.
It is a 16-bit register.
(5) The flag register: It contains five 1-bit flags containing CPU
status information. These flags are then used by conditional jump,
call and return from subroutine instructions.
Q.23 Explain the function of following registers in 8085.
Ans
(I) Accumulator:
1) Accumulator is 8-bit main register in 8085, used to perform the
arithmetical and logical operations. In such operations, one of the
operand is always stored in accumulator.
2) It can be used as both primary source and destination register.
The final result of operation is also stored in accumulator.
3) All data transfer between the CPU and I/O devices are
performed through accumulator.
4) Many memory reference instructions move data between the
accumulator and memory.
(II) Temporary register :
1) The temporary register is used to store the data during
execution of arithmetic or logic instructions.
2) This register is used internally and are not available to the
programmer.
III) Incrementer/Decrementer :
1) Incrementer/Decrementer is a 16-bit special purpose registers.
2) It is used to add or subtract one from the content of program
counter or stack pointer.
IV) Register B (or C):
1) Register B (or C) is a general purpose 8-bit register along with
register C (or B).
2) It can also be used as a 16-bit register. The most significant 8-bits
are stored in register B and the least significant 8-bits are stored in
register C.
3) These are programmable means programmer can use them to load
or transfer data.
V) Serial I/O control :
1) Most often I/O devices work with serial data in transmission.
2) The 8085 has two pins to implement serial transmission SID
(Serial Input Data) and SOD (Serial Output Data).
3) The 8085 RIM instruction transfers data from SID to bit 7 of
accumulator.
4) A single serial bit may be output via SOD pin of 8085, for this SIM
instruction is used.
Q.24 Explain the function of following units in microprocessor 8085 :
a) ALU b) Stack pointer
c) Instruction register and decoder
d) Program counter.
Ans.:
a) ALU
1) Arithmetical and logical unit is 8-bit unit, where arithmetical and
logical operations are carried out.
2) ALU contains binary adder to perform addition and subtraction by
2's complement method and other logical circuitry.
3) Data is supplied by accumulator, I/O device, memory etc.
4) The result is typically stored in accumulator.
5) According to the result of arithmetic logic operation, ALU either
sets or resets flag.
b) Stack pointer (SP)
1) Stack pointer is a 16-bit register, which contains the address of
stack top. i.e. the memory address of last byte entered in stack.
2) With the help of incrementer/decrementer, the stack pointer is
decremented each time data is pushed onto stack and incremented
each time data is popped off the stack.
c) Instruction register and decoder:
1) During an instruction fetch, the first byte of the instruction i.e. the
opcode is transferred to the 8-bit instruction register.
2) The contents of instruction register are, in turn available to the
instruction decoder.
3) The output of decoder, gated by timing signals, controls the
register, ALU and data/address buffers.
4) The output of decoder and internal clock generator produce the
state and machine cycle timing signals.
d) Program counter (PC) :
1) The program counter is 16-bit register acting as a pointer to next
executable instruction.
2) It always contains the 16-bit address of the memory location
where next executable instruction is stored.
3) The microprocessor uses this register to sequence the execution of
instruction.
4) The PC is autoincremented after a particular instruction has been
fetched by the MPU.
Q.25 Explain the following blocks of 8085 microprocessor:
(i) Serial I/O Control
(ii) Accumulator
(iii) Multiplexed Address/Data Bus Buffer
Ans.:
(iii) Multiplexed Address/Data Bus Buffer :
(i) This is an 8-bit bidirectional buffer.
(ii) It is used to drive multiplexed address /data bus i.e. low-order
address bus (A7 – A0) and data bus (D7 – D0).
(iii) It is also used to tristate the multiplexed address/data bus under
certain conditions such as reset, hold, halt and when the bus is not
in use.
(iv) The address/data buffers are used to drive external address and
data buses respectively. Due to these buffers the address and data
buses can be tri-stated when they are not in use
Q.26 What are flags ? Enlist the different flags provided by 8085
microprocessor. Explain when they are set or reset. OR
Define bit pattern of flag register and explain the significance of
each flag bit.
Ans.:
1) A flag is a single bit status register (flip-flop).
2) Flags are either set or reset by ALU according to the result by ALU.
3) Flags are important because they are the conditions for
conditional branching instructions.
4) 8085 has five flags. Sign flag, Zero flag, Auxiliary carry flag, Parity
flag and Carry flag. A 8-bit register is used to represent five flags as
shown in following figure.
𝐃𝟕 𝐃𝟔 𝐃𝟓 𝐃𝟒 𝐃𝟑 𝐃𝟐 𝐃𝟏 𝐃𝟎 - Bit number

S Z - Ac - P - Cy - Status flags
where, S - Sign flag, Z - Zero flag, Ac - Auxiliary carry flag,
P - Parity flag, Cy - Carry flag.
(i) Sign flag (S): After the execution of arithmetic and logic operation,
if the most significant bit of the result is 1, then the sign flag is set
to 1 otherwise 0. This flag is used with signed number. If MSB is 1,
the number will be negative and if it is 0, the number will be
positive.
(ii) Zero flag (Z): After performing an arithmetic or logic operation, if
the result is zero, then zero flag is set to 1, else it is reset. This flag
is modified by the results in accumulator as well as in other
registers.
(iii) Auxiliary carry flag (Ac): In an arithmetic operation, when carry is
generated from bit D3 to D₁, the auxiliary carry flag is set to 1. This
flag is only available internally and used for B.C.D. operations and
not available for programmer.
(iv) Parity flag (P): Parity flag is set to 1, if the result stored in
accumulator contains even parity i.e. even number of 1's. If
accumulator contains odd number of 1's, the flag is 0.
(v) Carry flag (Cy): This flag sets if carry produced by most significant
bit during the execution of an arithmetic operation.
In subtraction carry flag serve as borrow flag.
Q.27 Flag register contains data D5H. Interprete its meaning.
Ans.:
D5 = 11010101
1 1 0 1 0 1 0 1

S = 1 = set = Accumulator content is negative


Z = 1 = set = Accumulator content means result is zero.
AC = 1 = set = In accumulator content carry is generated from 𝐷3
to 𝐷4 in airmetic operation.
P = 1 = set = means accumulator contain even no. of 1’s
Cy = 1= set = means there is carry or borrow generated from most
significant bit during execution of operation.
Q.28 Define the following terms with suitable diagram:
(a) Instruction cycle, (b) Machine cycle, (c) T-state
Ans.:
a) Instruction cycle: An instruction cycle is defined as the time
required to complete the execution of an instruction. The 8085
instruction cycle consists of one to five machine cycle.
b) Machine cycle: Machine cycle is defined as the time required to
complete any operation of accessing either memory or I/O which
is the subpart of an instruction. In 8085, the machine cycle may
consist of three to six T-states.
c) T-state: The subdivision of an operation, which is performed in
one clock period is called as T-state. Diagrammatic representation
is as follows:
Fig. shows machine cycles, T-states and instruction cycle required for
execution of an instruction. From it is clear that an instruction cycle
consists of number of machine cycles and a machine cycle consists of
number of T-states.
Q.29 Explain the following: FETCH Cycle.
Ans.:
FETCH Cycle
To load an instruction or piece of data from memory into a CPU's register.
All instructions must be fetched before they can be executed. The time it
takes to fetch an item is known as the fetch time or fetch cycle, and is
measured in clock ticks.
Q.30 Select the correct alternative and rewrite the following.
1. Microprocessor 8085 is manufactured by
(i) Motorola (ii) Toshiba
(iii) Intel (iv) Z ilog
Ans.: (iii) Intel

2. 8085 uses V power supply


(i) + 5 (ii)-5
(iii) +12 (iv) - 12
Ans. : (i) +5
3. The flag register of 8085 microprocessor contains _________flags.
(i) 8 (ii) 3
(iii) 7 (iv) 5
Ans.: (iv) 5

4. In CPU, the register which keeps the track of address of next


instruction to be fetched is called
(i) Instruction Register (ii) Program Counter
(iii) Stack Pointer (iv) Accumulator
Ans. (ii) Program Counter

5. Intel 8085 is a/an bit Microprocessor.


(i) 16 (ii) 4
(iii) 8 (iv) 32
Ans.: (iii) 8
6. Stack pointer of 8085 holds
(i) 8 bit address (ii) 16 bit data
(iii) 16 bit address (iv) 8 bit data
Ans. (iii) 16 bit address

7. Microprocessor 8085 is manufactured by___________


(i) Intel (ii) Motorola
(iii) Zilog (iv) Toshiba
Ans.: (i) Intel

8. ________bits of flag register of 8085 Microprocessor are unused.


(i) 1 (ii) 2
(iii) 3 (iv) 4
Ans.: (iii) 3
9. The register in 8085 Microprocessor that keeps the track of the
address of next executable instruction is ___________.
(i) Program Counter (ii) Stack Pointer
(iii) Program Status Word (iv) Instruction Register
Ans.: (i) Program Counter

10. _________is non-maskable interrupt in 8085.


(i) RST 5.5 (ii) RST 6.5
(iii) RST 7.5 (iv) TRAP
Ans.: (iv) TRAP

You might also like