0% found this document useful (0 votes)
73 views75 pages

Malp - Notes by Hitesh Momaya

The document outlines the curriculum for a Diploma Engineering course in Microprocessor and Assembly Language Programming at Ganpat University, detailing course objectives, content, practical exercises, and assessment methods. It covers essential topics such as microprocessor architecture, interrupts, instruction sets, and programming techniques, along with practical applications and reference materials. The course aims to equip students with theoretical knowledge and practical skills in microprocessor operations and assembly language programming.

Uploaded by

aaryp2710
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)
73 views75 pages

Malp - Notes by Hitesh Momaya

The document outlines the curriculum for a Diploma Engineering course in Microprocessor and Assembly Language Programming at Ganpat University, detailing course objectives, content, practical exercises, and assessment methods. It covers essential topics such as microprocessor architecture, interrupts, instruction sets, and programming techniques, along with practical applications and reference materials. The course aims to equip students with theoretical knowledge and practical skills in microprocessor operations and assembly language programming.

Uploaded by

aaryp2710
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/ 75

GANPAT UNIVERSITY

FACULTY OF ENGINEERING & TECHNOLOGY


Programme Diploma Engineering Branch Computer Engineering
Semester III Version 1.0.0.0
Effective from Academic Year 2018-19 Effective for the batch Admitted in June 2018
Subject code 1CE2305 Subject Name MICROPROCESSOR & ASSEMBLY LANGUAGE
PROGRAMMING
Teaching scheme Examination scheme (Marks)
(Per week) Lecture(DT) Practical(Lab.) Total CE SEE Total
L TU P TW
Credit 3 0 1 0 4 Theory 40 60 100
Hours 3 0 2 0 5 Practical 30 20 50

Pre-requisites:
Fundamental knowledge of digital electronics.

Course Learning Outcomes:


The course content should be taught and implemented with an aim to develop different skills leading to the
achievement of the following competencies and course learning outcomes:
T1. To learn the concepts of microprocessor
T2. To get knowledge of microprocessor architecture
T3. To familiar with need of interrupts
T4. To understand assembly language instruction set
T5. To develop assembly language programming skill

The practical should be carried out in such a manner that students are able to acquire different learning out
comes in cognitive, psychomotor and affective domain to demonstrate course learning outcomes.

Course Content
Name of UNIT Unit Content Unit Learning Outcomes Marks Hrs
UNIT – 1 1.1 Introduction of Microprocessor 1a. Define types of bus 10 08
1.2 8085 Bus Organisation 1b. Generate Read/Write Signals
BASICS OF 1.3 De-multiplexing of Add/Data Bus 1c. Draw 8085 Architecture
8085 MICRO- 1.4 Generate Control Signals 1c. Use Flag register
PROCESSOR 1.5 8085 Architecture
1.6 Flag Register of 8085
UNIT – 2 2.1 Register Organisation 2a. Select different registers 10 06
2.2 Stack Pointer, Program Counter 2b. Identify timing & control pins
8085 2.3 Timing and Control 2c. List function of serial, Interrupt
ARCHITECTURE 2.4 Serial I/O, Interrupt Control, 2d. Classify pins of 8085
2.5 Instruction Register & Decoder
2.6 Pin Diagram of 8085
UNIT – 3 3.1 Types of Interrupts 3a. Understand need of interrupts 10 07
3.2 Hardware & Software Interrupts 3b. Distinguish interrupts
8085 3.3 Restart Interrupts 3c. Implement ISR with vector
INTERRUPTS 3.4 Interrupt Service Routine (ISR) address and priority level
3.5 Vector locations
3.6 Interrupt Priority

UNIT – 4 4.1 Addressing Mode 4a. Interpret instruction format 15 12


4.2 Classification of Instruction Set 4b. Classify types of instructions
8085 4.3 Data Transfer Instructions 4c. Understand operation of
INSTRUCTION 4.4 Arithmetic Instructions instruction set
SET 4.5 Logic Instructions, Rotate
4.6 Jump, Call and Return Instruction
4.7 Machine Control Instructions
UNIT – 5 5.1 Data Transfer Programs 5a. Develop programs for data 15 12
5.2 Arithmetic Programs Transfer and Branch
PROGRAMING 5.3 Logic Programs 5b. Develop programs for
TECHNIQUES 5.4 Rotate Programs arithmetic, logic operations
5.5 Branch Programs 5c. Calculate delay and implement
5.6 Delay Subroutine Programs subroutines

List of Practical
No. Unit Name of Practical
1 1 Demonstrate of Trainer kit or simulator of 8085
2 4, 5 Implement program to perform addition of two 8 bit numbers
3 4, 5 Implement program to perform BCD addition of two 8 bit numbers
4 4, 5 Implement program to perform subtraction of two 8 bit numbers
5 4, 5 Implement program to perform multiplication of two 8 bit numbers
6 4, 5 Implement program to perform Logical OR operation of two 8 bit numbers
7 4, 5 Implement program to perform Logical AND operation of two 8 bit numbers
8 4, 5 Implement program to perform Logical XOR operation of two 8 bit numbers
9 4, 5 Implement program to perform 2’s Complement 8 bit numbers
10 4, 5 Implement program to convert given decimal digit into its equivalent ASCII
11 4, 5 Implement program to count number of 1’s in 8-bit number
12 4, 5 Implement program to design delay subroutine of 1ms.

List of Instruments / Equipment / Trainer Board


1 8085 microprocessor Trainer Board
2 Computer System
3 Application Boards
4 Multimedia Projector

List of Reference Books


No Title of Reference Books Authors Publication
1 Microprocessor: Architecture, Ramesh Gaonkar Penram
Programming, and Application with
the 8085
2 The 8085 Microprocessor: K. Udaya Kumar, B. S. Umashankar Pearson
Architecture, Programming and
Interfacing
3 8085 Microprocessor Programming N. K. Srinath PHI
and Interfacing

Link of Learning Web Resource


1 http://www.oshonsoft.com/8085.html
2 http://www.eazynotes.com/notes/microprocessor/Slides/instruction-set-of-8085.pdf
3 https://www.technicalsymposium.com/microprocessor_lab.pdf
4 https://lecturenotes.in/u/hiteshmomaya
CHAPTER – 1 BASICS OF 8085 MICRO-PROCESSOR

1. Introduction of Microprocessor
2. 8085 Bus Organisation
3. De-multiplexing of Add/Data Bus
4. Generate Control Signals
5. Assignment – 01

1. INTRODUCTION OF MICROPROCESSOR

Block Diagram of a Basic Microcomputer

Basics of Microprocessor
Microprocessor is a controlling unit of a micro-computer, fabricated on a
small chip capable of performing ALU (Arithmetic Logical Unit) operations
and communicating with the other devices connected to it.

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 1


Microprocessor consists of an ALU, register array, and a control unit. ALU
performs arithmetical and logical operations on the data received from the
memory or an input device.
Register array consists of registers identified by letters like B, C, D, E, H, L
and accumulator. The control unit controls the flow of data and instructions
within the computer.

How does a Microprocessor Work?


The microprocessor follows a sequence: Fetch, Decode, and then Execute.
Initially, the instructions are stored in the memory in a sequential order. The
microprocessor fetches those instructions from the memory, then decodes it
and executes those instructions till STOP instruction is reached. Later, it
sends the result in binary to the output port. Between these processes, the
register stores the temporarily data and ALU performs the computing
functions.

List of Terms Used in a Microprocessor


Here is a list of some of the frequently used terms in a microprocessor −
 Instruction Set − It is the set of instructions that the
microprocessor can understand.
 Bandwidth − It is the number of bits processed in a single
instruction.
 Clock Speed − It determines the number of operations per second
the processor can perform. It is expressed in megahertz (MHz) or
gigahertz (GHz).It is also known as Clock Rate.
 Word Length − It depends upon the width of internal data bus,
registers, ALU, etc. An 8-bit microprocessor can process 8-bit data at
a time. The word length ranges from 4 bits to 64 bits depending upon
the type of the microcomputer.

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 2


 Data Types − The microprocessor has multiple data type formats like
binary, BCD, ASCII, signed and unsigned numbers.

Features of a Microprocessor
Here is a list of some of the most prominent features of any microprocessor
 Cost-effective − The microprocessor chips are available at low prices
and results its low cost.
 Size − The microprocessor is of small size chip, hence is portable.
 Low Power Consumption − Microprocessors are manufactured by
using metal oxide semiconductor technology, which has low power
consumption.
 Versatility − The microprocessors are versatile as we can use the
same chip in a number of applications by configuring the software
program.
 Reliability − The failure rate of an IC in microprocessors is very low,
hence it is reliable.

Basic Definitions

Timing diagram
It is a diagram showing timing of various signals of the microprocessor in
relation to the system clock.

T state
It is defined as one subdivision of the operation performed in one clock
period. T-state is precisely equal to 1 clock period.

Machine Cycle

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 3


It is defined as the time required to complete one operation of accessing
memory IO or an external request.

Instruction Cycle
It is defined as the time required to complete execution of an instruction. It
may consist of 1 to 6 machine cycles.

Program
It is a set of instructions written in a specific sequence for the computer to
accomplish a given task.

Software
It is a group of programs for a particular task.

Bus
It is a group of lines to carry pit between the microprocessor and other
components of the micro computer system.

2. 8085 BUS ORGANISATION

Diagram to represent bus organization system of 8085 Microprocessor

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 4


System Bus
Bus is a group of communication lines to carry information bits. Different
components of a microprocessor system are organised around bus. The
8085 microprocessor has three buses: address bus, data bus and control
bus.

Types of Buses
 Address Bus
 Data Bus
 Control Bus

Address Bus
A collection of wires used to identify location in main memory is called
Address Bus. It is a group of 16 lines generally marked as A0 to A15. It is
unidirectional which flow from microprocessor to Input Output devices. The
address bus carries address bits. It is used to identify IO peripheral or a
memory location.

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 5


Data Bus
A collection of wires through which data is transmitted from one part of a
computer to another is called Data Bus. It is a group of 8 lines used for data
flow generally mark as D0 to D7. These lines are bidirectional. This bus
connects all the computer components to the CPU and main memory. Data
flow in both directions between microprocessor and memory. The data bus is
used to transfer binary information.

Control Bus
The connections that carry control information between the CPU and other
devices within the computer is called Control Bus. This bus provides timing
signals. It is compromised of various single lines that carry synchronisation
signals. There are three control pins: Input Output/Memory (IO/M), Read
(RD) and Write (WR). Using these three pins, four different control signals
can be generated: Memory Read, Memory Write, Input Read, Output Write.

3. DEMULTIPLEXING OF ADDRESS/DATA BUS

Multiplexed AD BUS
The signal lines AD0 to AD7 in 8085 microprocessor used for dual purpose.
They carry address bits as well as data bits. This is called multiplexed
address/data bus. This bus is used as low order address bus and data bus.
The address bus and data bus are multiplexed to reduce number of pins in
the IC package.

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 6


Demultiplexing of Address/Data Bus

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 7


Latch
To avoid mixing up of address and data bits this must be de-multiplexed.
This can be done with the help of a latch (74LS373). This bus is connected
as input to the latch.

Address Latch Enable (ALE)


The Address Latch Enable (ALE) signal is connected to the enable pin (G) of
the latch and output control (OC) pin is grounded.

When ALE goes high, the latch is transparent and it enables lower order
address bits (A0 to A7).

When ALE goes low, the latch enables lower order data bits (D0 to D7)
4. GENERATE CONTROL SIGNALS

Functions of Control Pins:


 IO/M’ – It is a status signal which determines whether the address is
for input-output or memory. When it is high (Logic 1) the address on
the address bus is for input-output devices. When it is low (Logic 0) the
address on the address bus is for the memory.
 RD’ – It is a signal to control READ operation. When it is low the
selected memory or input-output device is read.
 WR’ – It is a signal to control WRITE operation. When it goes low the
data on the data bus is written into the selected memory or I/O
location.

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 8


3:8 Decoder
A 3 to 8 line decoder IC 74138 is used. It has 3-inputs and 8-outputs. Three
signals from the 8085 microprocessor namely read (RD’), write (WR’) and
Input Output/Memory (IO/M’) are connected as input to the decoder. Four
output signals are taken from output pins of decoder.

Control Signals
The table list input conditions required or different inputs.
 S1, S0 – These are status signals. They distinguish the various types
of operations such as halt, reading, instructions fetching or writing.
 RD’, WR’ – Read and write are two basic control signals for reading
and writing operations respectively.

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 9


Functions of the control signals

 MEMR’ – It indicates Memory Read operation


 MEMW’ – It indicates Memory Write operation
 IOR’ – It indicates Input Read operation
 IOW’ – It indicates Output Write operation
IO/M’ RD’ WR’ DATA BUS STATUS
0 0 0 Halt
0 0 1 Memory Read (MEMR)’
0 1 0 Memory Write (MEMW)’
0 1 1 Opcode Fetch
1 0 0 No operation
1 0 1 I/O Read (IOR)’
1 1 0 I/O Write (IOW)’
1 1 1 Interrupt Acknowledge

5. ASSIGNMENT – 01
1. Draw Block Diagram of a Basic Microcomputer. How does a
Microprocessor Work?
2. Draw and Explain Bus Organisation of 8085 Microprocessor.
3. Explain De-multiplexing of Add/Data Bus. Write the function of ALE pin
4. Explain how to Generate Control Signals using functions of control pins.

1CE2305 MALP/CHAPTER – 01 Prof. Hitesh Momaya, Ganpat University Page 10


CHAPTER – 2 8085 ARCHITECTURE

1. 8085 Architecture
2. Register Organisation
3. Flag Register of 8085
4. Program Counter, Stack Pointer
5. Timing and Control
6. Serial I/O, Interrupt Control
7. Instruction Register & Decoder
8. Pin Diagram of 8085
9. Exercise

1. 8085 ARCHITECTURE

The 8085 is an 8-bit microprocessor as it operates on 8-bits at a time and is


created with NMOS technology. The size of the data bus of 8085 is 8-bits
and address bus is 16-bits. Therefore, it can address up to 64KB (216)
memory. Also, as it can perform 8-bit operation, thus the size of arithmetic
and logical unit (ALU) is also 8-bit. It also provides operational advantages,
as 8085 needs a single +5V supply with only one clock single of width
320ns.

A microprocessor is a multipurpose, programmable, clock-driven, register-


based electronic device that reads binary instructions from a storage device
called memory; it accepts binary data as input and processes data according
to those instructions and provides result as output.

The architecture of 8085 microprocessor can perform following operations:


1. Operates on and stores 8-bit data.

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 1


2. It executes arithmetic and logic operations.
3. 8085 also sequences the instructions to be executed.
4. Stores data temporarily.

BLOCK DIAGRAM OF 8085 MICROPROCESSOR

Function of Each Blocks:


 Address/Data Bus
 Address Bus : 16-bit, Unidirectional
 Lower Order Address Bus: AD0 to AD7
 Higher Order Address Bus: A8 to AD15
 Data Bus : 8-bit, Bidirectional, Data Bus: D0 to D7

 General Purpose Registers

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 2


 Temporary Registers : W and Z, Not for the programmer
 8-bit Registers: Accumulator, Flag, B, C, D, E, H and L
 16-bit Registers: Register Pairs: BC, DE, and HL
 Stack Pointer (SP) and Program Counter (PC)

 ALU – Arithmetic and Logical Unit


 Arithmetic Operation: Addition, Subtraction, Increment, Decrement
 Logical Operation: AND, OR, XOR, Complement, Compare, Rotate

 Timing and Control


 X1, X2: These are also called Crystal Input Pins, 8085 can generate
clock signals internally.
 CLK OUT: It is used as the system clock for other devices.
 ALE: Address Latch Enable, It is used to de-multiplex lower order
address/data bus
 RD: It is an active low READ signal. It is a control signal used for
Read operation either from memory or from Input device.
 WR: It is also active low WRITE signal. It is a control signal used
for Write operation either into memory or into output device.
 IO/M’: This pin indicates I/O or memory operation.
If IO/M’ = 1, then I/O operation is performed.
If IO/M’ = 0, then Memory operation is performed.
 S1, S0: These are status signals used for Read and Write Operation
 HOLD: This pin is used to request the microprocessor for direct
memory transfer.
 HLDA: It is Hold Acknowledge. The microprocessor uses this pin to
acknowledge the receipt of HOLD signal.
 READY: This pin is used to synchronize slower peripheral devices
with fast microprocessor.

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 3


 Serial I/O
 Serial transmission in 8085 microprocessor is implemented by the
two signals, SID and SOD
 SID – Serial Input Data
 SOD – Serial Output Data

 Interrupt Control
 Interrupts can be used to interrupt a program execution.
 The 8085 has five interrupt signals:
TRAP, RST 7.5, RST 6.5, RST 5.5, INTR and INTA’

 Instruction Register & Decoder


 The function of a microprocessor is to execute instructions by
following operations: Fetch, Decode and Execute

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 4


2. REGISTER ORGANISATION

The 8-bit Registers:


Accumulator (Register A), Flag Register, B, C, D, E, H, and L.
The 16-bit Registers:
Program Counter (PC), Stack Pointer (SP)
Register pairs – BC, DE, and HL
The Temporary Registers:
W and Z (not for programmer)

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 5


Register Array:

Accumulator
The accumulator is an 8-bit register. It can store 8-bit data. This register is
the part of the arithmetic and logical unit (ALU). After performing
arithmetical or logical operations, the result is stored in accumulator.
Accumulator is also defined as register A.

Flag Register
The flag register is a special purpose register. The 8-bit flag register has five
flags which are set or reset according to the result of the operation. The five
flags are: Sign Flag, Zero Flag, Auxillary Flag, Parity Flag and Carry Flag.

General Purpose Registers


The 8085 microprocessor has six general-purpose registers to store 8-bit
data; these are identified as- B, C, D, E, H, and L. These can be combined as
register pairs – BC, DE, and HL, to perform 16-bit operation. These registers
are used to store or copy temporary data, by using instructions, during the
execution of the program.

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 6


Program Counter (PC)
PC is a 16-bit address register. This register is used to sequence the
execution of the instructions. The function of the program counter is to point
to the memory address from which the next byte is to be fetched. When a
byte (machine code) is being fetched, the program counter is incremented
by one to point to the next memory location.

Stack Pointer (SP)


SP is a 16-bit register. It is used as a memory pointer. It points to a memory
location in read/write memory, called the stack. It is always incremented or
decremented by 2 during push and pop operation of stack.

3. FLAG REGISTER OF 8085

The flag register is a special purpose register and it is completely different


from other registers in microprocessor. It consists of 8-bits and only 5 of
them are useful. The other three are left vacant and are used in the future
Intel versions. Depending upon the value of result after any arithmetic and
logical operation, the flag bits become set (Logic 1) or reset (Logic 0).

Types of Flags
S – Sign Flag
Z – Zero Flag
AC – Auxillary Carry Flag
P – Parity Flag
CY – Carry Flag
1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 7
Flag Bits:
Sign Flag (S)
It is 7th bit of the flag register, which is at the most significant bit (MSB). It
helps the programmer to know whether the number stored in the
accumulator is positive or negative.
If S = 1, then the number stored in the accumulator is Negative
If S = 0, then the number stored in the accumulator is Positive

Zero Flag (Z)


It is 6th bit of the flag register. It is set, when the operation performed in the
ALU results in zero (all 8-bits of accumulator are zero), otherwise it is reset.
It helps in determining if two numbers are equal or not.
If Z = 1, then all the number stored in the accumulator is non Zero
If Z = 0, then all the number stored in the accumulator is Zero

Auxillary Carry Flag (AC)


It is 4th bit of the flag register. In an arithmetic operation, when a carry flag
is generated by the 3rd bit and passed on to the 4th bit, then Auxillary Carry
flag is set. If not then flag is reset. This flag is used internally for BCD
(Binary-Coded decimal Number) operations. Note that, this is the only flag
register in 8085 which is not accessible by user.
If AC = 1, then a carry generated from 3rd bit to 4th bit in ALU
If AC = 0, then no carry generated from 3rd bit to 4th bit in ALU

Parity Flag (P)


It is 2nd bit of the flag register. This flag tests for number of 1’s in the
accumulator. If the accumulator holds even number of 1’s, then this flag is

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 8


set and it is said to even parity. On the other hand, if the number of 1’s is
odd, then it is reset and it is said to be odd parity.
If P = 1, then accumulator has even number of bits (even parity)
If P = 0, then accumulator has odd number of bits (odd parity)

Carry Flag (CY)


It is 0th bit of the flag register. If the arithmetic operation results in a carry
(if result is more than 8-bit), then Carry Flag is set; otherwise it is reset.
If CY = 1, then result has a carry bit
If CY = 0, then result has no carry bit

4. PROGRAM COUNTER, STACK POINTER

Program Counter (PC)


PC is a 16-bit address register. This register is used to sequence the
execution of the instructions. The function of the program counter is to point
to the memory address from which the next byte is to be fetched. When a
byte (machine code) is being fetched, the program counter is incremented
by one to point to the next memory location.

Stack Pointer (SP)


SP is a 16-bit register and is a part of memory. It is used as a memory
pointer. It points to a memory location in read/write memory, called the
stack. It is always incremented or decremented by 2 during push and pop
operation of stack.

The data is stored in the stack in serial format and stack pointer generally
stores the address of the last data element stored in the stack. Thus the
stack is based on Last-in First-out (LIFO).

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 9


Whenever a new data is added in the stack, then the stack pointer starts
pointing towards the very next memory location. When a data element is
removed from the stack, then the stack pointer points to previous occupied
memory location.

5. TIMING AND CONTROL

Power Supply
 Vcc : +5v power supply
 Vss : Ground Reference

Clock Frequency
 X1, X2 – A crystal is connected at these two pins. The frequency is
internally divided by 2, therefore, to operate a system at 3MHZ the
crystal should have frequency of 6MHZ.
 CLK (OUT) – This signal can be used as the system clock for other
devices.

Control Signals
 ALE – It is an Address Latch Enable signal. It goes high during first T
state of a machine cycle and enables the lower 8-bits of the address, if
its value is 1 otherwise data bus is activated.
 IO/M’ – It is a status signal which determines whether the address is
for input-output or memory. When it is high (Logic 1) the address on
the address bus is for input-output devices. When it is low (Logic 0) the
address on the address bus is for the memory.

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 10


Status Signals
 S1, S0 – These are status signals. They distinguish the various types
of operations such as halt, reading, instructions fetching or writing.
 RD’ – It is a signal to control READ operation. When it is low the
selected memory or input-output device is read.
 WR’ – It is a signal to control WRITE operation. When it goes low the
data on the data bus is written into the selected memory or I/O
location.

IO/M’ RD’ WR’ DATA BUS STATUS


0 0 0 Halt
0 0 1 Memory Read (MEMR)’
0 1 0 Memory Write (MEMW)’
0 1 1 Opcode Fetch
1 0 0 No operation
1 0 1 I/O Read (IOR)’
1 1 0 I/O Write (IOW)’
1 1 1 Interrupt Acknowledge

DMA Signals
 HOLD – It indicates that another device is requesting the use of the
address and data bus. Having received HOLD request the
microprocessor relinquishes the use of the buses as soon as the current
machine cycle is completed. Internal processing may continue. After the
removal of the HOLD signal the processor regains the bus.
 HLDA – It is a signal which indicates that the hold request has been
received after the removal of a HOLD request, the HLDA goes low.
 READY – It senses whether a peripheral is ready to transfer data or
not. If READY is high (Logic 1) the peripheral is ready. If it is low

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 11


(Logic 0) the microprocessor waits till it goes high. It is useful for
interfacing low speed devices.

Reset Signals
 RESET IN’ – When the signal on this pin is low (Logic 0), the program-
counter is set to zero, the buses are tri-stated and the microprocessor
unit is reset.
 RESET OUT – This signal indicates that the MPU is being reset. The
signal can be used to reset other devices.

6. SERIAL I/O, INTERRUPT CONTROL

Serial I/O Port


Serial transmission in 8085 microprocessor is implemented by the two
signals, SID and SOD
SID – Serial Input Data
SOD – Serial Output Data

Interrupts
The 8085 has five interrupt signals that can be used to interrupt a program
execution.
TRAP
RST 7.5
RST 6.5
RST 5.5
INTR

The microprocessor acknowledges Interrupt Request by INTA’ signal. In


addition to Interrupts, there are three externally initiated signals namely

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 12


RESET, HOLD and READY. To respond to HOLD request, it has one signal
called Hold Acknowledge (HLDA).
 INTR – It is an interrupt request signal.
 INTA’ – It is an interrupt acknowledgment sent by the microprocessor
after INTR is received.

7. INSTRUCTION REGISTER & DECODER

The instruction register (IR) and decoder are part of ALU. When an
instruction is fetched from memory, it is loaded in the instruction register.
The decoder decodes the instruction and establishes the sequence of events
to follow. The IR is not programmable and cannot be accessed through any
instruction.

The function of a microprocessor is to execute instructions. It first needs to


be fetched then decoded and then executed. And in order to fetch an
instruction, firstly the address of the instruction must be known. The address
of the instruction is present in the program counter. This address is then
placed on the 16-bit address bus and is then forwarded towards the
memory. From the memory, the instruction present at that particular
memory location is fetched through the 8-bit data bus.

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 13


Further when the instruction is fetched from the memory, then through
internal buses the instruction is provided to the instruction register. At this
particular point of time fetching the instruction from the memory is over.

Now, it’s time for the processor to decode the instruction. So, it is then fed
to the instruction decoder. We already have the idea that both data and
instruction in the memory is stored in the form of an opcode. So, the
fetched opcode is analyzed by the instruction decoder present inside the
processor in order to execute the instruction.

When an instruction is fetched from the memory, then PC increments itself


thereby provides the address location of the next instruction. As PC does not
play any role in decoding and executing. However, after execution of first
instruction, the next is fetched form the memory.

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 14


8. PIN DIAGRAM OF 8085 MICROPROCESSOR

Pin Function
1, 2 X1, X2
 These are also called Crystal Input Pins.
 8085 can generate clock signals internally.
 To generate clock signals internally, 8085 requires external inputs
from X1 and X2.
3 RESET OUT
 It is used to reset the peripheral devices and other ICs on the
circuit.
 It is an output signal.

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 15


 It is an active high signal.
 The output on this pin goes high whenever RESET IN is given low
signal.
 The output remains high as long as RESET IN is kept low.
4 SOD (Serial Output Data)
 It takes 1 bit from Accumulator to serial port of 8085.
 Takes the bit from the 8th position (MSB) of the Accumulator.
 SIM (Set Interrupt Mask) instruction is used to transfer the bit.
5 SID (Serial Input Data)
 It takes 1 bit input from serial port of 8085.
 Stores the bit at the 8th position (MSB) of the Accumulator.
 RIM (Read Interrupt Mask) instruction is used to transfer the bit.
6 TRAP
 It is a non-maskable interrupt.
 It has the highest priority.
 It cannot be disabled.
 It is both edge and level triggered.
 It means TRAP signal must go from low to high.
 And must remain high for a certain period of time
 TRAP is usually used for power failure and emergency shutoff.
7 RST 7.5
 It is a maskable interrupt.
 It has the second highest priority.
 It is positive edge triggered only.
 The internal flip-flop is triggered by the rising edge.
 The flip-flop remains high until it is cleared by RESET IN
8 RST 6.5
 It is a maskable interrupt.
 It has the third highest priority.

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 16


 It is level triggered only.
 The pin has to be held high for a specific period of time.
 RST 6.5 can be enabled by EI instruction.
 It can be disabled by DI instruction.
9 RST 5.5
 It is a maskable interrupt.
 It has the fourth highest priority.
 It is also level triggered.
 The pin has to be held high for a specific period of time.
 This interrupt is very similar to RST 6.5.
10 INTR
 It is a maskable interrupt.
 It has the lowest priority.
 It is also level triggered.
 It is a general purpose interrupt.
 By general purpose we mean that it can be used to vector
microprocessor to any specific subroutine having any address.
11 INTA
 It stands for interrupt acknowledge.
 It is an out-going signal.
 It is an active low signal.
 Low output on this pin indicates that microprocessor has
acknowledged the INTR request.
12- AD0–AD7
19  These pins serve the dual purpose of transmitting lower order
address and data byte.
 During 1st clock cycle, these pins act as lower half of address.
 In remaining clock cycles, these pins act as data bus.
 The separation of lower order address and data is done by address

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 17


latch.
20 VSS
 Ground signal is connected to VSS.
21 - A8–A15
28  These pins carry the higher order of address bus.
 The address is sent from microprocessor to memory.
 These 8 pins are switched to high impedance state during HOLD
and RESET mode.
29, S0 and S1
33  S0 and S1 are called Status Pins.
 They tell the current operation which is in progress in 8085.
30 ALE
 It is used to enable Address Latch.
 It indicates whether bus functions as address bus or data bus.
 If ALE = 1, then Bus functions as address bus.
 If ALE = 0, then Bus functions as data bus.
31 WR
 WR stands for Write.
 It is also active low signal.
 It is a control signal used for Write operation either into memory or
into output device.
 A low signal indicates that data on the data bus must be written
into selected memory location or into output device.
32 RD
 RD stands for Read.
 It is an active low signal.
 It is a control signal used for Read operation either from memory
or from Input device.
 A low signal indicates that data on the data bus must be placed

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 18


either from selected memory location or from input device.
34 IO/M’
 This pin indicates I/O or memory operation is being performed.
 If IO/M’ = 1 then I/O operation is being performed.
 If IO/M’ = 0 then Memory operation is being performed.
 The operation being performed is indicated by S0 and S1.
 If S0 = 0 and S1 = 1 then It indicates WRITE operation.
 If S0 = 1 and S1 = 0 then It indicates READ operation.
35 READY
 This pin is used to synchronize slower peripheral devices with fast
microprocessor.
 A low value causes the microprocessor to enter into wait state.
 The microprocessor remains in wait state until the input at this pin
goes high.
36 RESET IN’
 It is used to reset the microprocessor.
 It is active low signal.
 When the signal on this pin is low for at least 3 clocking cycles, it
forces the microprocessor to reset itself.
37 CLK OUT
 It is used as the system clock for other devices.
38 HOLD
 HOLD pin is used to request the microprocessor for DMA transfer.
 A high signal on this pin is a request to microprocessor to
relinquish the hold on buses.
 This request is sent by DMA controller.
39 HLDA
 HLDA stands for Hold Acknowledge.
 The microprocessor uses this pin to acknowledge the receipt of

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 19


HOLD signal.
 When HLDA signal goes high, address bus, data bus, RD, WR, IO/M
pins are tri-stated.
 This means they are cut-off from external environment.
 The control of these buses goes to DMA Controller.
 Control remains at DMA Controller until HOLD is held high.
 When HOLD goes low, HLDA also goes low and the microprocessor
takes control of the buses.
40 VCC
 +5V power supply is connected to VCC.

9. ASSIGNMENT - 02

1. Draw and Explain 8085 Architecture


2. Explain Register Organisation of 8085
3. Draw and Explain Flag Register of 8085
4. Draw Pin Diagram of 8085. Explain function of each pin

***

1CE2305 MALP/CHAPTER – 02 Prof. Hitesh Momaya, Ganpat University Page 20


CHAPTER – 3 THE 8085 INTERRUPTS

1. Types of Interrupts
2. Function of Interrupts
3. Vector Locations
4. Interrupt Priority
5. Instruction for Interrupts
6. Exercise

1. TYPES OF INTERRUPTS

Interrupts can be used to interrupt a program execution. The 8085


microprocessor has five interrupt signals that can be used to interrupt a
program execution.

Interrupt Execution
When microprocessor receives any interrupt signal from peripherals which
are requesting its services, it stops its current execution and program
control is transferred to a sub-routine by generating CALL signal and after
executing sub-routine by generating RET signal again program control is
transferred to main program from where it had stopped.

Interrupts can be classified as Hardware Interrupts and Software Interrupts:


Hardware Interrupts –
When microprocessors receive interrupt signals through pins (hardware) of
microprocessor, they are known as Hardware Interrupts. There are FIVE
Hardware Interrupts in 8085 microprocessor. They are –
TRAP
RST 7.5

1CE2305 MALP/CHAPTER – 03 Prof. Hitesh Momaya, Ganpat University Page 1


RST 6.5
RST 5.5
INTR

Software Interrupts –
Software Interrupts are also called as Restart Interrupts. Those which are
inserted in between the program which means these are mnemonics of
microprocessor. There are EIGHT software interrupts in 8085
microprocessor. They are –
RST 0
RST 1
RST 2
RST 3
RST 4
RST 5
RST 6
RST 7

2. FUNCTION OF INTERRUPTS

TRAP

 It is a non-maskable interrupt.
 It has the highest priority.
 It cannot be disabled.
 It is both edge and level triggered.
 It means TRAP signal must go from low to high.
 It must remain high for a certain period of time
 TRAP is usually used for power failure and emergency shutoff.

1CE2305 MALP/CHAPTER – 03 Prof. Hitesh Momaya, Ganpat University Page 2


RST 7.5

 It is a maskable interrupt.
 It has the second highest priority.
 It is positive edge triggered only.
 The internal flip-flop is triggered by the rising edge.
 The flip-flop remains high until it is cleared by RESET IN

RST 6.5

 It is a maskable interrupt.
 It has the third highest priority.
 It is level triggered only.
 The pin has to be held high for a specific period of time.
 RST 6.5 can be enabled by EI instruction.
 It can be disabled by DI instruction.

RST 5.5

 It is a maskable interrupt.
 It has the fourth highest priority.
 It is also level triggered.
 The pin has to be held high for a specific period of time.
 This interrupt is very similar to RST 6.5.

INTR

 It is a maskable interrupt.
 It has the lowest priority.
 It is also level triggered.
 It is a general purpose interrupt.

1CE2305 MALP/CHAPTER – 03 Prof. Hitesh Momaya, Ganpat University Page 3


 It can be used to vector microprocessor to any specific subroutine having
any address.

INTA’

 It stands for interrupt acknowledge.


 It is an out-going signal.
 It is an active low signal.
 Low output on this pin indicates that microprocessor has acknowledged the
INTR request.

3. VECTOR LOCATIONS

Vectored Interrupts
Vectored Interrupts are those which have fixed vector address (starting
address of sub-routine) and after executing these, program control is
transferred to that address.

Vector Addresses are calculated by the formula 8 * TYPE

INTERRUPT VECTOR ADDRESS

TRAP (RST 4.5) 24 H

RST 5.5 2C H

RST 6.5 34 H

RST 7.5 3C H

1CE2305 MALP/CHAPTER – 03 Prof. Hitesh Momaya, Ganpat University Page 4


For Software interrupts vector addresses are given by:

INTERRUPT VECTOR ADDRESS

RST 0 00 H

RST 1 08 H

RST 2 10 H

RST 3 18 H

RST 4 20 H

RST 5 28 H

RST 6 30 H

RST 7 38 H

Non-Vectored Interrupts –
Non-vectored Interrupts are those in which vector address is not predefined.
The interrupting device gives the address of sub-routine for these
interrupts. INTR is the only non-vectored interrupt in 8085 microprocessor.

4. INTERRUPT PRIORITY

Maskable Interrupts –
Maskable Interrupts are those which can be disabled or ignored by the
microprocessor. These interrupts are either edge-triggered or level-
triggered, so they can be disabled. INTR, RST 7.5, RST 6.5, RST 5.5 are
maskable interrupts in 8085 microprocessor.

1CE2305 MALP/CHAPTER – 03 Prof. Hitesh Momaya, Ganpat University Page 5


Non-Maskable Interrupts –
Non-Maskable Interrupts are those which cannot be disabled or ignored by
microprocessor. TRAP is a non-maskable interrupt. It consists of both level
as well as edge triggering and is used in critical power failure conditions.

Priority of Interrupts –
When microprocessor receives multiple interrupt requests simultaneously, it
will execute the interrupt service request (ISR) according to the priority of
the interrupts.

5. INSTRUCTION FOR INTERRUPTS

Enable Interrupt (EI) –


The interrupt enable flip-flop is set and all interrupts are enabled following
the execution of next instruction followed by EI. No flags are affected. After
a system reset, the interrupt enable flip-flop is reset, thus disabling the
interrupts. This instruction is necessary to enable the interrupts again
(except TRAP).

Disable Interrupt (DI) –

1CE2305 MALP/CHAPTER – 03 Prof. Hitesh Momaya, Ganpat University Page 6


This instruction is used to reset the value of enable flip-flop hence disabling
all the interrupts. No flags are affected by this instruction.
Set Interrupt Mask (SIM) –
It is used to implement the hardware interrupts (RST 7.5, RST 6.5, RST 5.5)
by setting various bits to form masks or generate output data via the Serial
Output Data (SOD) line. First the required value is loaded in accumulator
then SIM will take the bit pattern from it.

Read Interrupt Mask (RIM) –


This instruction is used to read the status of the hardware interrupts (RST
7.5, RST 6.5, RST 5.5) by loading into the A register a byte which defines
the condition of the mask bits for the interrupts. It also reads the condition
of SID (Serial Input Data) bit on the microprocessor.

1CE2305 MALP/CHAPTER – 03 Prof. Hitesh Momaya, Ganpat University Page 7


ASSIGNMENT – 03

1. Explain types of Interrupts


2. Write the Function of Interrupts
3. Explain Vector Locations of Interrupts. Write Interrupt Priority
4. Explain RIM and SIM Instruction formats for Interrupts

1CE2305 MALP/CHAPTER – 03 Prof. Hitesh Momaya, Ganpat University Page 8


Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
A = 1100 0111

A = C7H

Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
CHAPTER – 5 PROGRAMING TECHNIQUES

1. Programs – Data Transfer Instructions


2. Programs – Addition Instructions
3. Programs – Subtraction Instructions
4. Programs – Logical Instructions
5. Programs – Complement Instructions
6. Programs – Compare Instructions
7. Programs – Rotate Instructions
8. Programs – Stack Instructions

1. PROGRAMS – DATA TRANSFER INSTRUCTIONS

1. Transfer data 44H from Accumulator to Register B


2. Transfer Data 55H from Memory Location 2000H to Register B
3. Transfer Data 55H from Memory Location 2000H to Register B Indirectly
4. Transfer data 05H from Accumulator to Memory Location 3000H
5. Transfer data 55H from Memory Location 2000H to Memory Location
3000H
6. Exchange value between HL pair and DE pair. Suppose HL = 2000H and
DE = 3000H.

2. PROGRAMS – ADDITION INSTRUCTIONS

1. To perform addition between two 8-bit numbers 11H and 22H. Store the
result at register C.
2. To perform addition between two 8-bit numbers 0FH and 15H. Store the
result at memory location 3000H.

1CE2305 MALP/CHAPTER – 05 Prof. Hitesh Momaya, Ganpat University Page 1


3. To perform addition between two 8-bit numbers stored at memory
location 2000H and 2001H. Store the result at memory location 2002H.
4. To perform addition between two 16-bit numbers 1234H and 7654H.
5. To perform addition between two 8-bit decimal numbers 06 and 04. Store
the result at memory location 3000H.
6. Multiply 05H by 05H. Store the result at register C.

3. PROGRAMS – SUBTRACT INSTRUCTIONS

1. To perform subtraction between two 8-bit numbers 11H from 22H. Store
the result at register C.
2. To perform subtraction between two 8-bit numbers 0FH from 15H. Store
the result at memory location 3000H.
3. To perform subtraction between two 8-bit numbers stored at memory
location 2000H from 2001H. Store the result at memory location 2002H.
4. To perform subtraction between two 8-bit decimal numbers 05 from 15.
Store the result at memory location 3000H.
5. To perform subtraction between two 8-bit numbers stored at register B
from register C. Store the result at register D.

4. PROGRAMS – LOGICAL INSTRUCTIONS

1. To perform AND logic between two 8-bit numbers 77H and 22H. Store the
result at register C.
2. To perform OR logic between two 8-bit numbers 77H and 22H. Store the
result at register C.
3. To perform EXOR logic between two 8-bit numbers 77H and 22H. Store
the result at register C.

1CE2305 MALP/CHAPTER – 05 Prof. Hitesh Momaya, Ganpat University Page 2


4. To perform EXOR logic between two 8-bit numbers stored at memory
location 2000H and 2001H. Store the result at memory location 2002H.

5. PROGRAMS – COMPLEMENT INSTRUCTIONS

1. To perform complement of 55H. Store the result at register C.


2. To perform 1’s Complement value of Register B. Store the result at
register C.
3. To perform 2’s Complement of register B. Store the result in register C.
4. Set the Carry Flag. Complement the Carry Flag.

6. PROGRAMS – COMPARE INSTRUCTIONS

1. To perform comparison between A and B register (A > B).


2. To perform comparison between A and B register (A = B).
3. To perform comparison between A and B register (A < B).

7. PROGRAMS – ROTATE INSTRUCTIONS

1. To perform rotate accumulator 1-bit left without carry flag.


2. To perform rotate accumulator 1-bit left with carry flag.
3. To perform rotate accumulator 1-bit right without carry flag.
4. To perform rotate accumulator 1-bit right with carry flag.

8. PROGRAMS – STACK INSTRUCTIONS

1. To transfer value of BC pair to the memory location 2050H pointed by the


stack pointer. (Perform use of PUSH instruction)

1CE2305 MALP/CHAPTER – 05 Prof. Hitesh Momaya, Ganpat University Page 3


2. To transfer value of memory location 2050H pointed by the stack pointer
to the register pair DE. (Perform use of POP instruction)
3. To transfer value of HL pair to Program Counter. (Perform use of PCHL
instruction)
4. To transfer value of HL pair to Stack Pointer. (Perform use of SPHL
instruction)
5. To exchange the value of HL pair to memory location pointer by Stack
Pointer. (Perform use of XTHL instruction)

***

1CE2305 MALP/CHAPTER – 05 Prof. Hitesh Momaya, Ganpat University Page 4


Programme Diploma Branch Computer Engineering
Engineering
Semester III Branch Information Technology
Subject code 1CE2305 Subject MICROPROCESSOR & ASSEMBLY
Name LANGUAGE PROGRAMMING

PRACTICAL LIST

1. Study Block diagram of 8085 Architecture and Flag Register


2. Perform Data Transfer Instructions
3. Perform Programs Based on Data Transfer Instructions
4. Perform Arithmetic Instructions
5. Perform Programs Based on Addition Instructions
6. Perform Programs Based on Subtract Instructions
7. Perform Logical Instructions
8. Perform Programs Based on Logical Instructions
9. Perform Compare and Rotate Instructions
10. Perform Programs Based on Compare and Rotate Instructions
11. Perform Jump Instructions
12. Perform Call and Return Instructions

Reference Guideline:
1. Study Block diagram of 8085 Architecture and Flag Register
(Refer MALP_Notes_Chapter – 02)

2. Perform Data Transfer Instructions


(Refer MALP_Notes_Chapter – 04)

3. Perform Programs Based on Data Transfer Instructions


a. Transfer data 44H from Accumulator to Register B
b. Transfer Data 55H from Memory Location 2000H to Register B
c. Transfer Data 55H from Memory Location 2000H to Register B Indirectly
d. Transfer data 05H from Accumulator to Memory Location 2001H
e. Transfer data 55H from Memory Location 2000H to Memory Location
3000H
f. Suppose HL = 2000H and DE = 3000H. Exchange value between HL pair
and DE pair.

4. Perform Arithmetic Instructions


(Refer MALP_Notes_Chapter – 04)

5. Perform Programs Based on Addition Instructions


a. To perform addition between two 8-bit numbers 11H and 22H. Store the
result at register C.
b. To perform addition between two 8-bit numbers 0FH and 15H. Store the
result at memory location 3000H.
c. To perform addition between two 8-bit numbers stored at memory
location 2000H and 2001H. Store the result at memory location 2002H.
d. To perform addition between two 16-bit numbers 1234H and 7654H.
e. To perform addition between two 8-bit decimal numbers 06 and 04. Store
the result at memory location 3000H.

6. Perform Programs Based on Subtract Instructions


a. To perform subtraction between two 8-bit numbers 11H from 22H. Store
the result at register C.
b. To perform subtraction between two 8-bit numbers 0FH from 15H. Store
the result at memory location 3000H.
c. To perform subtraction between two 8-bit numbers stored at memory
location 2000H and 2001H. Store the result at memory location 2002H.
d. To perform subtraction between two 8-bit numbers stored at register B
and C. Store the result at register D.

7. Perform Logical Instructions


(Refer MALP_Notes_Chapter – 04)
8. Perform Programs Based on Logical Instructions
a. To perform AND logic between two 8-bit numbers 77H from 22H. Store
the result at register C.
b. To perform OR logic between two 8-bit numbers 77H from 22H. Store the
result at register C.
c. To perform EX-OR logic between two 8-bit numbers 77H from 22H. Store
the result at register C.
d. To perform complement of 55H. Store the result at register C.
e. Set the Carry Flag. Complement the Carry Flag.
f. Complement value of Register B.

9. Perform Compare and Rotate Instructions


(Refer MALP_Notes_Chapter – 04)

10.Perform Programs Based on Compare and Rotate Instructions


a. Compare value of Register A=20H and B=10H (A>B). Note status of
Carry flag and Zero flag.
b. Compare value of Register A=10H and B=10H (A=B). Note status of
Carry flag and Zero flag.
c. Compare value of Register A=10H and B=20H (A<B). Note status of
Carry flag and Zero flag.
d. Rotate accumulator (A = 8FH) 1-bit Left without carry.
e. Rotate accumulator (A = 8FH) 1-bit Right without carry.
f. Rotate accumulator (A = 8FH) 1-bit Left with carry.
g. Rotate accumulator (A = 8FH) 1-bit Right with carry.

11.Perform Jump Instructions


(Refer MALP_Notes_Chapter – 04)

12.Perform Call and Return Instructions


(Refer MALP_Notes_Chapter – 04)
Subject : 1CE2305: MALP/ QUESTION BANK By: Prof. Hitesh Momaya, Ganpat University

Subjective Questions:

1. Explain Block Diagram of Microcomputer. How Microprocessor works?


2. Explain Bus Organization of 8085 microprocessor.
3. Explain Demultiplexing of Address/Data Bus.
4. Generate Control Signals using pins: IO/M’, RD’ and WR’
5. Explain Register Organization of 8085 microprocessor.
6. Explain Flag registers of 8085 microprocessor.
7. Draw Block Diagram of 8085 microprocessor.
8. Explain the function of 8085 microprocessor pins:
IO/M’, RD’ and WR’, ALE, X1 and X2, SID and SOD
9. Give the full forms of ALU, ALE, PSW, PC, SP
10. Give the full forms of EI, DI, ISR, SIM, RIM
11. Explain types of interrupts of 8085 microprocessor.
12. Explain Vector Location and Priority of Interrupts
13. Explain operation of following instructions of 8085 microprocessor
(i) MOV A,B (ii) MVI A,05H (iii) LDA 2000H (iv) STA 3000H (v) LXI H,2000H
14. Explain operation of following instructions of 8085 microprocessor with example
(i) XCHG (iv) DAD B (v) DAA (vi) CMA (vii) INR H
15. Explain types of instructions for Addition and Subtraction with operation.
16. Explain increment and decrement instruction
17. Explain Logical AND, OR and XOR instructions with operation.
18. Explain different types of Rotate instructions with example.
19. Explain types of Jump instructions.
20. Explain types of CALL and RET instructions.

Programs:

1. To perform addition between two 8-bit numbers 11H and 22H. Store the result at register C.
2. To perform addition between two 8-bit numbers stored at memory location 2000H and 2001H.
Store the result at memory location 2002H.
3. To perform addition between two 16-bit numbers 1234H and 7654H.
4. To perform subtraction between two 8-bit numbers 11H from 22H. Store the result at register C.
5. To perform subtraction between two 8-bit numbers stored at memory location 2000H and 2001H.
Store the result at memory location 2002H.
6. To perform AND logic between two 8-bit numbers 11H and 22H. Store the result at Reg C.
7. To perform OR logic between two 8-bit numbers 11H and 22H. Store the result at Reg C.
8. To perform XOR logic between two 8-bit numbers 11H and 22H. Store the result at Memory
Location 3000H.
9. To perform 1’s Complement of register B. Store the result in register C.
10. To perform 2’s Complement of register B. Store the result in register C.
Short Questions (ASSIGNMENT NO – 04)
1. Name the types of bus in 8085 microprocessor
2. How many bits of data bus?
3. How many bits of address bus?
4. What is the function of ALE pin?
5. What is the function of IO/M’ pin?
6. If IO/M’=0, RD’=0, WR’=1 then name the control signal.
7. If IO/M’=1, RD’=0, WR’=1 then name the control signal.
8. The 8085 is ____ bit microprocessor.
9. 8085 microprocessor IC operates on ____ Volt?
10. 8085 microprocessor is ____ pin IC.
11. How much external memory can be interfaced with 8085 Microprocessor?
12. Name the types of hardware interrupts
13. Name the types of software interrupts
14. Name the pins used for serial data communication
15. List 8-bit registers
16. List 16-bit registers
17. How many flag bits used in flag register?
18. What is the function of stack pointer?
19. What is the function of X1 and X2 pins?
20. How to demultiplex Address/Data bus?
21. Name the non-maskable interrupt
22. Name the highest priority interrupt
23. Name the lowest priority interrupt
24. Which interrupt is used for power failure?
25. Name the non-vectored interrupt
26. Write the vector address of TRAP
27. Write the vector address of RST 7.5
28. Write the output of following instruction: MVI C,32H
29. Write the output of following instruction: STC
30. Write the output of following instruction: CMA
Full Forms (ASSIGNMENT NO – 05)
IO/M’ – Input Output/Memory’
RD’ – Read’
WR’ – Write’
MEMR’ – Memory Read’
MEMW’ – Memory Write’
IOR’ – Input Output Read’
IOW’ – Input Output Write’
ALE – Address Latch Enable
SID – Serial Input Data
SOD – Serial Output Data
ALU – Arithmetic Logical Unit
PSW – Program Status Word
SP – Stack Pointer
PC – Program Counter
INTR – Interrupt
INTA’ – Interrupt Acknowledge
HLDA – Hold Acknowledge
X1, X2 – Crystal Input Pins
S – Sign Flag
Z – Zero Flag
AC – Auxiliary Carry Flag
P – Parity Flag
CY – Carry Flag
ISR – Interrupt Service Routine
RST – Restart Interrupts
EI – Enable Interrupt
DI – Disable Interrupt
SIM – Set Interrupt Mask
RIM – Read Interrupt Mask
1CE2305 MALP

ASSIGNMENT – 01

1. Draw Block Diagram of a Basic Microcomputer. How does a Microprocessor Work?


2. Draw and Explain Bus Organisation of 8085 Microprocessor.
3. Explain De-multiplexing of Add/Data Bus. Write the function of ALE pin
4. Explain how to Generate Control Signals using functions of control pins.

ASSIGNMENT - 02

1. Draw and Explain 8085 Architecture


2. Explain Register Organisation of 8085
3. Draw and Explain Flag Register of 8085
4. Draw Pin Diagram of 8085. Explain function of each pin

ASSIGNMENT – 03

1. Explain types of Interrupts


2. Write the Function of Interrupts
3. Explain Vector Locations of Interrupts. Write Interrupt Priority
4. Explain RIM and SIM Instruction formats for Interrupts

ASSIGNMENT – 04

1CE2305 MALP Prof. Hitesh Momaya, Ganpat University Page 1


1. Name the types of bus in 8085 microprocessor
2. How many bits of data bus?
3. How many bits of address bus?
4. What is the function of ALE pin?
5. What is the function of IO/M’ pin?
6. If IO/M’=0, RD’=0, WR’=1 then name the control signal.
7. If IO/M’=1, RD’=0, WR’=1 then name the control signal.
8. The 8085 is ____ bit microprocessor.
9. 8085 microprocessor IC operates on ____ Volt?
10. 8085 microprocessor is ____ pin IC.
11. How much external memory can be interfaced with 8085 Microprocessor?
12. Name the types of hardware interrupts
13. Name the types of software interrupts
14. Name the pins used for serial data communication
15. List 8-bit registers
16. List 16-bit registers
17. How many flag bits used in flag register?
18. What is the function of stack pointer?
19. What is the function of X1 and X2 pins?
20. How to demultiplex Address/Data bus?
21. Name the non-maskable interrupt
22. Name the highest priority interrupt
23. Name the lowest priority interrupt
24. Which interrupt is used for power failure?
25. Name the non-vectored interrupt
26. Write the vector address of TRAP
27. Write the vector address of RST 7.5
28. Write the output of following instruction: MVI C,32H
29. Write the output of following instruction: STC
30. Write the output of following instruction: CMA
ASSIGNMENT – 05

Full Forms
IO/M’ – Input Output/Memory’

1CE2305 MALP Prof. Hitesh Momaya, Ganpat University Page 2


RD’ – Read’
WR’ – Write’
MEMR’ – Memory Read’
MEMW’ – Memory Write’
IOR’ – Input Output Read’
IOW’ – Input Output Write’
ALE – Address Latch Enable
SID – Serial Input Data
SOD – Serial Output Data
ALU – Arithmetic Logical Unit
PSW – Program Status Word
SP – Stack Pointer
PC – Program Counter
INTR – Interrupt
INTA’ – Interrupt Acknowledge
HLDA – Hold Acknowledge
X1, X2 – Crystal Input Pins
S – Sign Flag
Z – Zero Flag
AC – Auxiliary Carry Flag
P – Parity Flag
CY – Carry Flag
ISR – Interrupt Service Routine
RST – Restart Interrupts
EI – Enable Interrupt
DI – Disable Interrupt
SIM – Set Interrupt Mask
RIM – Read Interrupt Mask

1CE2305 MALP Prof. Hitesh Momaya, Ganpat University Page 3

You might also like