You are on page 1of 6

MODULE 4 MICROPROCESSOR 8085

MICROPROCESSOR 8085 8088, 8086, 80186, 80286,


Microprocessor INTEL PENTIUM
 32-bit processor
 Microprocessor is a multipurpose programmable
INTEL 80386, 80387, 80486
clock driven register based device. That reads
binary instruction from a storage device called  64-bit processor
memory. That accepts binary data as input and INTEL CORE 2, CORE I3, CORE I5,
processes data according to instructions and CORE I7, etc
provides result as output.  By increasing no. of bits, processor speed
 A microprocessor is an integrated circuit designed increases. Because it takes more bits at a time.
to function as the CPU of a microcomputer.
 The main function of processor is to execute
program Features of 8085 microprocessor:
 Program is stored in memory. Program is a set of
instructions 1. it is an 8 bit microprocessor
2. it is a single chip with 6200 transistors
Functions of a microprocessor: 3. it requires a single +5V DC power supply.
 The processor execute program in an 4. It has 40 pins arranged as dual in line package
instruction cycle. It include 3 steps fetch- (DIP)
decode- execute. 5. It provides on chip clock generator, therefore there
1. The processor first takes or reads instruction is no need of external clock generator
from memory. This process is called 6. The maximum clock frequency is 3MHz
fetching. 7. It has16 address lines, 256 input ports and 256
2. The instruction is then decoded to determine output ports.
what action is required to be done. 8. It has five hardware interrupts: TRAP, RST 5.5,
3. Based on instruction the processor fetches RST 6.5, RST 7.5, INTR
data from main memory or I/O module if 9. It provides one accumulator, one flag register, 6
required general purpose registers and two special purpose
4. The instruction is then executed which may registers.
require performing arithmetic or logical Pin diagram and its functions:
operations on data.
5. In addition to execution, CPU also supervises  The pin details of 8085 is shown in figure.
and controls/I/O devices. The pins on the chip can be grouped into 6 groups:
If there is any request from I/O devices, called  Address Bus.
interrupt, the CPU suspends execution of the  Data Bus.
current programs and transfers control to an  Control and Status Signals.
interrupt handling program.  Power supply and frequency.
Evolution of microprocessor  Externally Initiated Signals.
 Serial I/O ports.
 1st generation (1939-1954)>> the design of
computer is based on vacuum tubes.
 2nd generation (1954-1959)>>the design is
computer is based on transistor.
 3rd generation (1959-1971)>> the design of
computer is based on IC.
 4th generation (1971-present)>> the design of
computer is based on microprocessor.

 µp is identified with word size of data i.e.,


how much of data it is accessing at a time.
 If an ALU can perform 4 bit data operation at a
time, then that µp is called 4-bit µp.
 Examples:
 4-bit processor
INTEL 4004, INTEL 4040
 8-bit processor
8008, 8080, 8085, MOTOROLA 6800
 16-bit processor

EEE EEE
MODULE 4 MICROPROCESSOR 8085

 RST 7.5, RST 6.5, RST 5.5 ( Restart interrupts)


:These interrupts will tranfer the program control
Address Bus: - to the specific memory locations.Their priority
(Bus is a group of wires) order is 7.5,6.5,5.5
 TRAP: It is a non maskable interrupt and has the
 Address bus is used to transfer information (not highest priority
data) of 16 bit.  DMA (Direct Memory Access) pins – HOLD,
 16 pins are used as address bus (0-15), they split HLDA
into two segments. A15-A8 and AD7- AD0.The  These pins are used when data transfer is to be
A15-A8 are unidirectional and are used as higher performed directly between an external device and
order address bus. the main memory of the system.
Address/Data bus: - AD7- AD0 are bidirectional  HOLD: This indicates a controller is requesting the
pins. They can be used as lower order address bus as use of address and data buses
well as data bus.  HLDA:-Hold acknowledge.This signal
acknowledges the HOLD request
Data bus – it is used to transfer 8 bit data.  READY:-This signal is used to delay the
Control and status signals:- microprocessor READ or WRITE cycles until a
slow responding peripheral is ready to send or
1. ALE (Address latch enable): if this pin is high it accept data
indicates that the bits on AD7-AD0 are address
bits. If this pin is low, it indicates bits on AD7-  RESET IN :-When the signal on this pin goes
AD0 are data low, the program counter is set to zero i.e., resets
the processor
2. RD (Read): It is active low signal. it indicates the  RESET OUT:-This pin is used to. This can be used
selected I/O or memory device is ready to read and to reset other devices.
the data are available on the data bus.
Serial i/o ports
 It has two pins SID and SOD which are used for
3. WR (Write): It is active low signal. It indicates serial communication
the data on the data bus are to be written into a
 SOD (serial output data line) : The output
selected memory or I/O location.
SOD is set/reset as specified by the SIM
4. Io/M:- It is used to differentiate between memory instruction.
and I/O operations.
 SID (Serial input data line) − The data on this
 When it is high it indicates an I/O operation. When
it is low it indicates memory operations line is loaded into accumulator whenever a
RIM instruction is executed.
5. S0 and S1:-These are status signals

Power supply and clock frequency:- CPU architecture and its functional blocks:-

 VCC:+5V power supply


 Vss:- ground
 X1,X2:- These are crystals. The oscillator provides
frequency of 6MHz and is divided into two to
operate the system at 3MHz
 CLK out (clock out) : it is used as system clock for
other devices.

Externally initiated signals including interrupts:-

(INTERRUPT is an event which requires attention of


processor to perform a specified task)
 INTR (Interrupt request):- This is used as general
purpose interrupt

 INTA ( Interrupt acknowledge): This is used to


acknowledge an interrupt

EEE EEE
MODULE 4 MICROPROCESSOR 8085

2.Zero flag(Z) -If the result stored in an accumulator


 ACCUMULATOR:-It is a 8-bit register which is is zero then this flip flop is set otherwise it is reset.
used to perform airthmetical and logical operation.
It stores the output of any operation. It also works 3. Auxiliary carry flag(AC)-If any carry goes from
as registers for i/o accesses. D3 to D4 in the output then it is set otherwise it is
reset.
 TEMPORARY REGISTER:-It is a 8-bit register
which is used to hold the data temporarily on 4. Parity flag(P) -If the no of 1's is even in the output
which the accumulator is computing operation. stored in the accumulator then it is set otherwise it is
 It is also called as operand register because it reset for the odd.
provides operands to ALU.
5. Carry flag(C) -If the result stored in an
 REGISTERS:-These are general purposes accumulator generates a carry in its final output then it
registers. Microprocessor consists 6 general is set otherwise it is reset.
purpose registers of 8-bit each named as
B,C,D,E,H and L. INSTRUCTION REGISTERS(IR):-It is a 8-bit
 Generally theses registers are not used for storing register. When an instruction is fetched from memory
the data permanently. then it is stored in this register.
 It carries the 8-bits data. These are used only INSTRUCTION DECODER:- Instruction decoder
during the execution of the instructions. identifies the instructions. It takes the informations
 These registers can also be used to carry the 16 from instruction register and decodes the instruction to
bits data by making the pair of 2 registers. be performed.
 The valid register pairs available are BC,DE HL. PROGRAM COUNTER:-It is a 16 bit register used
We can not use other pairs except BC,DEand HL. as memory pointer. It stores the memory address of the
 These registers are programmed by user. next instruction to be executed.
STACK POINTER:-It is also a 16 bit register used
as memory pointer. It points to the memory location
called stack which is the last memory location used
TIMING AND CONTROL UNIT:-It provides
timing and control signal to the microprocessor to
perform the various operation.It has three control
signal. It controls all external and internal circuits. It
operates with reference to clock signal. There are three
control signal:
1.ALE-Airthmetic Latch Enable, It provides control
signal to synchronize the components of
ALU:-ALU performs the arithmetic operations and
microprocessor.
logical operation.

FLAG REGISTER:-It consists of 5 flip flops which 2.RD- This is active low used for reading operation.
changes its status according to the result stored in an
accumulator. It is also known as status register. It is 3.WR-This is active low used for writing operation.
connected to the ALU. There are three status signal used in microprocessor
S0, S1 and IO/M. It changes its status according the
provided input to these pins.

1.Sign flag(S) - If D7 bit of the result is 1 then sign


flag is set otherwise reset.
if D7 is 1: the number is negative.
if D7 is 0: the number is positive.
SERIAL INPUT OUTPUT CONTROL-There are
two pins in this unit and are used for serial data
communication (SID & SOD)

EEE EEE
MODULE 4 MICROPROCESSOR 8085

INTERRUPT UNIT- Interrupts are the signals 1.13 XTHL the content of SP is exchanged
generated by external devices which requires attention with HL pair
of processor.
1.14 PUSH rp PUSH B the content of
 When a processor executing a main program some register pair BC is pushed to stack)
interrupts may arises, so processor stops the
current program and shifts the control to interrupt 1.15 POP rp POP D the content in
program. stack is popped to register pair DE
 After completing that program, processor comes
back to main program. There are 6 interrupt pins
in this unit.
 Generally an external hardware is connected to
these pins.
 These pins provide interrupt signal sent by
external hardware to microprocessor and
microprocessor sends acknowledgement for
receiving the interrupt signal. Generally INTA is
used for acknowledgement

Instruction sets of 8085


1. Data transfer instructions
2. Arithmetic instructions
3. Logical instructions
4. Branching instructions
5. Machine control instructions

Instruction classifications of 8085:

1.1

1.10 LHLD 16 bit LHLD 1050 load HL pair


with contents of location 1050

1.11 SPHL the content of HL pair is moved to


stack pointer

1.12 XCHG the content of HL pair is 3.12 CMA CMA complement the
exchanged with DE pair content in accumulator

EEE EEE
MODULE 4 MICROPROCESSOR 8085

MOV A, C (the content of C is copied into the register


A).

3. Direct Addressing Mode: - in this addressing


mode, the address of data is specified in the instruction

Eg: - LDA 3000H (it indicates load the data available


in the location 3000H to register A).

3. Indirect Addressing Mode: - in this addressing


mode, the instruction specifies the name of a
register in which the address of data is available.
Here the data is in memory and its address is in
a register pair.

Eg: - MOV A, M (data is transferred from the memory


location pointed by the register to the accumulator).

5.Implied Addressing Mode: - This mode doesn't


4.8 JP 16 Bit JP 2050 jump on plus (D7=0 &
require any operand. The data is specified by opcode
S=0)
itself.
4.9 JM 16 bit JM 2051 jump on minus (if
Eg: - RRC (rotate accumulator A right by one bit)
D7=1&S=1)
RLC (rotate accumulator A left by one bit)
4.10 JPE 16 bit JPE 2055 jump on even
parity (if P=1) to 2055

4.11 JPO 16 bit JPO 2058 jump on odd


parity (if P=0) to 2058

Simple assembly language programs:

1. Write a program to Add 49H and 56H

LXI H,2501H ;Get address of 1st no.: in HL


pair
MOV A,M ; move the 1st no. to accumulator
Addressing Modes in 8085 INX H ; increment content of HL pair
ADD M ; Add 1st and 2nd NO:
There are five addressing modes in 8085. STA 2503 ; Store sum in 2503H
HLT ; Stop
1. Immediate Addressing Mode: - In this addressing
mode, the data is specified in the instruction itself. The
2. Write a program to Subtract 32H from 49H
data is a part of instruction

Eg: - MVI A, 30H (30H is copied into the register A) LXI H,2501H ;Get address of 1st no. in HL pair
MOV A,M ; move 1st no. to accumulator
MVI B,40H (40H is copied into the register B). INX H ; increment content of HL pair
SUB M ;Subtract 1st and 2nd no.
2. Register Addressing Mode: - in this addressing INX H ;increment content of HL pair
mode, the instruction specifies the name of register MOV M,A ;Move result to the incremented
in which the data is available. HL pair
Eg: - MOV B, A (the content of A is copied into the HLT ; Stop
register B) 3. Write a program to Multiply 05H and 02H

LXI H,2501H ;Get address of 1st no. in HL pair

EEE EEE
MODULE 4 MICROPROCESSOR 8085

MOV A,M ; move 1st no. to accumulator


INX H ; increment content of HL pair
MUL M ; Multiply 1st and 2nd no.
STA 2503 ;Store sum in 2503H
HLT ; Stop
4. Write a program to find one’s complement of 96H

LDA 2501H ;load number from 2501H to


accumulator
CMA ; complement the content of
accumulator
STA 2502H ;Stores the result at 2502
HLT ;program ends

5. Write a program to find two’s complement of 96H

LDA 2501H ;load number from 2501H to


accumulator
CMA ;complement the content of
accumulator
INR A ;takes 2’s complement
STA 2502 ;Stores the result
HLT ;program ends

EEE EEE

You might also like