0% found this document useful (0 votes)
14 views8 pages

Ex 1

Uploaded by

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

Ex 1

Uploaded by

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

Experiment No.

-1

Aim:-
To study the microprocessor 8085 kit.

Objectives:-
1. To explain the architecture of the 8085.
2. To explain the classification of the instructions of the 8085.
3. To define the various addressing mode in the 8085 instruction set.

Theory:-

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


device that fetches binary instructions from a storage device called memory, accepts binary data
as input and processes data according to those instructions and executes results as output. The
first microprocessor to be released was INTEL 4004 in 1971 by Intel. It was a 4 bit
microprocessor and was designed with LSI technology. It had 2300 transistors, 640 bytes of
memory-addressing capacity, and a 108 kHz clock speed. This processor was quickly replaced
by the 8-bit microprocessor 8008, which was superseded by the INTEL 8080. In 1976 INTEL
8085 was developed as improvements over the 8080.

Architecture:-

A microprocessor system consists of three components:-


i) The microprocessor
ii) Memory
iii) I/O (Input/Output)
The internal logic design of the microprocessor is called its architecture and it determines how
and when various operations are performed by the microprocessor.

Fig (i)- Block diagram of microprocessor 8085


The various functions performed by the microprocessor can be classified in three general
categories:-
i) Microprocessor initiated operations
ii) Internal operations
iii) Peripheral (or externally initiated) operations
The term microprocessing unit (MPU) is defined as here as a group of devices that can perform
these functions with the necessary set of control signals. To communicate with a peripheral (and
memory), the MPU identifies the peripheral or the memory location by its address, transfers data,
and provides timing signals.

The MPU performs primarily four operations:-


i) Memory Read: Reads data ( or instructions ) from memory.
ii) Memory Write: Writes data ( or instructions) into memory.
iii) I/O Read: Accepts data from input devices.
iv) I/O Write: Sends data to output devices.

To perform these operations the MPU needs to:


 Identify the peripheral or the memory locations
 Transfer binary information
 Provide timing or synchronization signals.

The 8085 uses three sets of communication lines to perform these functions called Buses:
 The Address Bus
 The Data Bus
 The Control Bus

The Address Bus:- It is a group of 16 lines generally identified as A0 to A15. The address bus is
unidirectional: bits flow in one direction i.e., from the MPU to peripheral devices. The address
bus is used to identify a peripheral or a memory location. The memory location is identified by
its address and the address bus is used to carry this 16 bit address. The total number of memory
locations in 8085 is 216 = 65,536 bits which when converted to kilobytes is 64 kb.
The Data Bus:-It is a group of eight lines used for data flow. These lines are bidirectional i.e.,
data flow in both directions between the MPU and memory and peripheral devices. The MPU
uses the data bus for transferring binary informations. The 8 bit data ranges from 00 to FF. The
8085 microprocessor is known as 8 bit microprocessor because it has 8 lines in data bus.
Control Bus:- The control bus is comprised of various single lines that carry synchronization
signals. The MPU uses such lines for providing timing signals. These are not group of lines like
address or data buses, but individual lines that provide a pulse to indicate an MPU operation. The
MPU generates specific control signals for every operation it performs.
Registers:-The 8085 has six general purpose 8-bit registers are B, C, D, E, H, and L to store data
and an accumulator to perform arithmetic and logical operations. They are combined as BC, DE,
HL to perform 16 bit operations. In addition to this Register array, two 16 bit registers viz. stack
register and program counter are provided.
Accumulator:-The accumulator is an 8-bit register (can store 8 bit data) that is a part of
arithmetic/logic unit (ALU). In general after performing logical or arithmetical operations, result
is stored in accumulator. Accumulator is also identified as Register A.
Flag Register:-ALU of 8085 have five flip flops whose states (set/reset) are determined by the
result data of other registers and accumulator. They are called as Zero, Carry, Sign, Parity and
Auxiliary-Carry flags.

 Zero Flag (Z): When an arithmetic operation results in zero , the flip-flop called the Zero
flag - which is set to one.

 Carry flag (CY): After an addition of two numbers, if the sum in the accumulator is larger
than eight bits, then the flip-flop uses to indicate a carry called the Carry flag – which is
set to one.

 S-Sign (S): It is set to 1, if most significant bit of the result = 1; otherwise reset.

 P-Parity (P): If the result has an even number of 1s, the flag is set to 1; for an odd number
of 1s the flag is reset.

 AC-Auxiliary Carry (AC): In an arithmetic operation, when a carry is generated by lower


nibble, the AC flag is set. Generally this flag is used internally for Binary Coded
Decimals (BCD).

Instruction registers/decoders:- Before execution of an instruction, it is sent to the Instruction


Register. Instruction register stores current instruction of any program. Decoder takes the
instruction from memory, decodes it and then passes it to the next stage.

Control Generator:- In microprocessor, the Control Generator generates a signal that executes
the operations in accordance to the decoded instructions. In fact it creates a signal (information)
which have details about connections between different blocks of the microprocessor so that data
reaches to the respective place.

Register selector:- Register selector is basically a logical controller which directs switching
between different registers of microprocessor.

Program Counter:-A program counter (PC) is a CPU register in the computer processor which
has the address of the next instruction to be executed from memory. It is a digital counter needed
for faster execution of tasks as well as for tracking the current execution point.A program
counter is also known as an instruction counter, instruction pointer, instruction address register
or sequence control register.
Stack Pointer:- It is a 16 bit register which holds the address of the top of the current stack
before the program counter goes to the interrupt service routine.
Fig(ii) PIN diagram of 8085 microprocessor

Pin Description:-The pins on the chip can be grouped into 6 groups:


 Address Bus.
 Data Bus.
 Control and Status Signals.
 Power supply and frequency.
 Externally Initiated Signals.
 Serial I/O ports.

Higher Order Address pins-A15 – A8


The address bus has 8 signal lines A8 – A15 which are unidirectional.

Lower Order Address/ Data Pins- AD7-AD0


These are time multiplexed pins and are de-multiplexed using the pin ALE. So, the bits
AD0 – AD7 are bi-directional and serve as A0 – A7 and D0 – D7 at the same time.During the
execution of the instruction, these lines carry the address bits during the early part, then during
the late parts of the execution, they carry the 8 data bits.In order to separate the address from the
data, we can use a latch to save the value before the function of the bits changes.

Control Pins – RD, WR


These are active low Read & Write pins

Status Pins – ALE, IO/M (active low), S1, S0


 ALE (Address Latch Enable)-Used to de-multiplex AD7-AD0
 IO/M – Used to select I/O or Memory operation
 S1,S0 – Denote the status of data on data bus
Ready
This is an active high input control signal. It is used bymicroprocessor to detect whether
a peripheral has completed (or is Ready for) the data transfer or not. The main function
of thispin is to synchronize slower peripheral to faster microprocessor.

Serial I/O pins – SID (Serial Input Data), SOD (Serial Output Data)
These pins are used to interface 8085 with a serial device.

Clock Pins- X1, X2, CLK(OUT)


 X1, X2– These are clock input pins. A crystal is connected between these pins
such that fcrystal= 2f8085 where fcrystal= crystal frequency & f8085 = operating frequency
of 8085
 CLK(OUT) – This is an auxiliary clock output source

Reset Pins – Reset In (active low), Reset Out


Reset In is used to reset 8085 whereas Reset Out can be used to reset other devices in the
system

DMA (Direct Memory Access) pins – HOLD, HLDA


These pins are used when data transfer is to be performed directly between an external device
and the main memory of the system.

Power Supply Pins – +VCC, VSS

Interrupt Pins –TRAP, RST7.5, RST 6.5, RST 5.5, INTR, INTA

Hardware and Software Interrupts –

When microprocessors receive interrupt signals through pins (hardware) of microprocessor,


they are known as Hardware Interrupts. There are 5 Hardware Interrupts in 8085
microprocessor. They are – INTR, RST 7.5, RST 6.5, RST 5.5, TRAP
Software Interrupts are those which are inserted in between the program which means these
are mnemonics of microprocessor. There are 8 software interrupts in 8085 microprocessor.
They are – RST 0, RST 1, RST 2, RST 3, RST 4, RST 5, RST 6, RST 7.

Vectored and Non-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
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 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.

Maskable and Non-MaskableInterrupts –


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.
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.

TRAP Highest
RST 7.5
RST 6.5
RST 5.5
INTR Lowest
Instruction Classification:-
The function of a microprocessor system is implemented by a sequence of data transfers
between memory, processor and I/O devices and data transformations that occur in the registers
within the microprocessor, manipulating a register under program control addressing it and using
it for data transfer and transformation requires a set of binary codes which comprise the
INSTRUCTION SET OF A MICROPROCESSOR.
The 8085 instructions can be classified into the following five functional categories.
i) Data transfer (copy) operations.
ii) Arithmetic operations.
iii) Logical operations.
iv) Branching operations and
v) Machine-control operations.
Since data and instructions may reside anywhere in internal registers, external registers or
memory, locating them requires a particular addressing. The instructions in these five functional
groups can be categorized according to their method of addressing the hardware registers and
memory. This method is called the ADDRESSING MODE and six modes are available with
8085 which are explained in detail here,
i) Implied addressing
ii) Register addressing
iii) Immediate addressing
iv) Direct addressing
v) Register indirect addressing
vi) Combined addressing.

i. Implied Addressing:-

The instructions using this mode have no explicit operands. Examples include

STC (Set Carry Flag)


DAA (Decimal Adjust Accumulator)

ii. Register Addressing

This mode specifies the register or register pair that contains data. Both the source and
the destination operand are registers.

For example,

MOV B,C
Moves the contents of register C to register B.

iii. Immediate Addressing

For and 8-bit data, this mode uses 2 bytes, with the first byte as the OP code, followed by
1 byte of data. On the other hand, for 16-bit data, this instruction contain 3 bytes, with the
first byte as the OP code followed by 2 bytes of data. For example,

MVI B,05
Loads register B with the value 5 and

LXI H,2050
Loads H with 20 and L with 50.

iv. Direct Addressing


Instructions using this mode specify the effective address as a part of the instruction.
These instructions contain 3 bytes, with the first byte as the OP code followed by 2 bytes
of address of data ( the low-order byte of the address in byte 2, the higher-order byte of
the address in byte 3). Consider

LDA 2035.

This instruction loads accumulator with the contents of memory locations 2035. This
mode is also called the absolute mode.

v. Register indirect Addressing

This mode contains a register pair which stores the address of data( the higher-order byte
of the address in the first register of the pair, and low-order byte in the second). As an
example,

LDAX B

Loads the accumulator with the contents of a memory location addressed by B and C
register pair.

vi. Combined Addressing Modes

Some instructions use a combination of addressing modes. A CALL instruction, for


example, combines direct addressing and register indirect addressing. The direct address
in a CALL instruction specifies the address of the desired subroutines; the register
indirect address is that of stack pointer. The CALL instruction pushes the current
contents of the program counter into the memory location specified by the stack pointer.
The address that follows the CALL instruction is copied to PC and hence execution starts
at the address of the subroutines.
Conclusion:-
Thus the architecture of microprocessor 8085 kit along withclassification of the
instructions and various addressing mode is studied.

You might also like