0% found this document useful (0 votes)
42 views36 pages

8085 Arch Pin Diag AM

This document provides information about a course on microprocessors and peripherals. It discusses the components of a microprocessor including the ALU, control unit, and register array. It also describes how a basic microcomputer system works by fetching, decoding, and executing instructions from memory. As an example, it explains how an 8085 microprocessor adds two numbers by walking through the steps and providing an example assembly language code.

Uploaded by

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

8085 Arch Pin Diag AM

This document provides information about a course on microprocessors and peripherals. It discusses the components of a microprocessor including the ALU, control unit, and register array. It also describes how a basic microcomputer system works by fetching, decoding, and executing instructions from memory. As an example, it explains how an 8085 microprocessor adds two numbers by walking through the steps and providing an example assembly language code.

Uploaded by

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

A course on

Microprocessor and Peripherals

Course code: Course coordinator: EC-402


Saurav Mehta,
ABVGIET, Pragatinagar
Introduction
• A Microprocessor is a multipurpose, programmable, clock
driven register based electronic device that reads binary
instruction from storage device(memory) accepts binary data
as input and processes data according to those instructions
and provides results as output.
• Microprocessor is also referred as MPU or microprocessor
unit
• Initially CPU used to comprise of discrete components, hence
new term for small looking processor which contained all
components on single chip was coined as MP
• These days MP and CPU terms are used alternatively.

Saurav Mehta, ABVGIET Pragatinagar


Components
• ALU: ALU (arithmetic logic unit) performs both arithmetic and
logical operations. Arithmetic operations such as addition,
subtraction, multiplications, divisions, and logical operations such
as NOR, AND, NAND, OR, XOR, NOT, XNOR, etc
• The control unit is used to control the instructions and it generates
the signals to operate the other components.
•  The register array consists of registers. Registers that are used by
the programmer to store arbitrary data are known as general-
purpose registers and the registers which are not used by a
programmer to store the data are known as the reserved registers.
The length of the register is known as the word length of the
computer.

Saurav Mehta, ABVGIET Pragatinagar


Basic microcomputer system
• As

Saurav Mehta, ABVGIET Pragatinagar


How microprocessor system works?
• 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.
Saurav Mehta, ABVGIET Pragatinagar
8085 Processor
 8085 is pronounced as "eighty-eighty-five" microprocessor.
 It is an 8-bit general purpose microprocessor designed by Intel
in 1976 using NMOS technology.
 It is a 40 pin IC.
 It has 8-bit bidirectional data bus and 8 bit ALU.
 It has 16-bit unidirectional address bus, which can address up
to 64K different memory locations.
 There are six 8-bit registers B, C, D, E, H and L which are
arranged in pairs: BC, DE, HL
 Requires +5V supply to operate at 3 MHz single phase clock

Saurav Mehta, ABVGIET Pragatinagar


Lets understand how 8085 works
• Suppose we want to add two numbers; 45 and 24

• Then we have to write a code/program for it in programming


language that 8085 can understand

• 8085 generally works on assembly language

• An assembly language is low level language; written on paper in


English so as to make user friendly, otherwise fed in machine
language to processor

• Its code is as shown in next slide

Saurav Mehta, ABVGIET Pragatinagar


M/m Address Instructions

1100H MVI A, 45H


1102H MVI B,24H
1104H ADD B
1105H OUT 22H

• Now this program is fed input to microprocessor system

• This code goes into memory, at the locations specified

• Now we have to remember three basic things which


microprocessor follows , i.e.; Fetch->Decode->Execute

Saurav Mehta, ABVGIET Pragatinagar


• Firstly, PC is filled with address of first instruction(1100H) to be executed

• Then, instruction in that address is fetched inside the processor

• As, instruction is fetched count of PC increases by 1 (1101)

• Inside the processor, it goes to instruction register

• From there it is sent to instruction decoder block, which decodes it

• It decodes the instruction, and asks the control unit to execute the
instruction

• Here, this instruction commands to move data(45 stored at 1101 address)


immediately to the accumulator

Saurav Mehta, ABVGIET Pragatinagar


• Now the same process is repeated with next instruction kept at
1102H

• It asks processor to move data 24H to move to register B

• Next instruction asks to add data in register A and register B

• Result of this operation is stored in A

• The last instruction outputs the result in some o/p port

Saurav Mehta, ABVGIET Pragatinagar


Step 1

Memory
m/m address code
1100 MVI A
1101 45
1102 MVI B
1103 24
1104 ADD B
1100
1105 OUT
1106 22
1107
1108
1109
Saurav Mehta, ABVGIET Pragatinagar
Step 2

Memory
m/m address code
MVI A
1100 MVI A
MVI A 1101 45
1102 MVI B
1103 24
MVI A 1104 ADD B
1105 OUT
1101 1106 22
1107
1108
1109
Saurav Mehta, ABVGIET Pragatinagar
Step 3

Memory
m/m address code
45 1100 MVI A
45 1101 45
1102 MVI B
1103 24
1104 ADD B
1105 OUT
1102 1106 22
1107
1108
1109
Saurav Mehta, ABVGIET Pragatinagar
Detailed 8085 Microprocessor Architecture

Saurav Mehta, ABVGIET Pragatinagar


Explanation of each block
• Arithmetic Logic Unit
The ALU performs the arithmetic and logic operation such as
‘add’, ‘subtract’, ‘AND’, ‘OR’, etc. Uses data from memory and
from Accumulator to perform arithmetic. Always stores result of
operation in Accumulator.
• Accumulator
The accumulator is an 8-bit register that is a part of
arithmetic/logic unit (ALU). This register is used to store 8-bit
data and to perform arithmetic and logical operations. The result
of an operation is stored in the accumulator. The accumulator is
also identified as register A.

Saurav Mehta, ABVGIET Pragatinagar


• Temporary register
It is used to hold data during any arithmetic and logic operation.
• Flag register
It is an 8-bit register having five 1-bit flip-flops, which holds either 1 or 0 (set
or reset) depending upon the result stored in the accumulator.
These are the set of 5 flip-flops named as:
 Sign flag (S): If MSB of result is 1, then this flag is set and otherwise not
set.
 Zero flag (Z): If result is zero, this flag is set and otherwise not set.
 Auxiliary Carry flag (AC): If carry is generated by D3 and passed on D4
then it is set. It is used for BCD operations internally.
 Parity flag (P): If result has even no. of 1’s then it is set, and if result has
odd no. of 1’s then it is reset.
 Carry flag (C): If arithmetic operation results in carry, then it is set.
Their bit positions are as shown:

Saurav Mehta, ABVGIET Pragatinagar


• Instruction register and decoder
Instruction register is an 8-bit register. When an instruction is fetched
from memory then it is stored in the Instruction register. Instruction
decoder decodes the information present in the Instruction register.
Instruction register is not programmable and can not be accessed by
programmer.

• General Purpose Registers


The 8085 has six general-purpose registers to store 8-bit data; these are
identified as B, C, D, E, H, and L as shown in the figure. They can be
combined as register pairs - BC, DE, and HL - to perform some 16-bit
operations. The programmer can use these registers to store or copy
data into the registers by using data copy instructions.

• Temporary Registers W and Z


These registers are used to hold 8 bit data internally for some
instructions and are not accessible to programmer.
Saurav Mehta, ABVGIET Pragatinagar
• Program counter
It is a 16-bit register used to store the memory address location of the
next instruction to be executed. Microprocessor increments the program
whenever an instruction is being executed, so that the program counter
points to the memory address of the next instruction that is going to be
executed. This register is a memory pointer. Memory locations have 16-
bit addresses, and that is why this is a 16-bit register.

• Stack Pointer
The stack pointer is also a 16-bit register used as a memory pointer. It
points to a memory location in R/W memory, called the stack. The
beginning of the stack is defined by loading 16-bit address in the stack
pointer.

• Timing and control unit


It provides timing to synchronize all operations with clock and generates
control signal necessary for communication b/w microprocessor and
peripherals. Saurav Mehta, ABVGIET Pragatinagar
• Interrupt control
It controls the interrupts during a process. When a microprocessor is executing a
main program and whenever an interrupt occurs, the microprocessor shifts the
control from the main program to process the incoming request. After the request
is completed, the control goes back to the main program. There are 5 interrupt
signals in 8085 microprocessor: INTR, RST 7.5, RST 6.5, RST 5.5, TRAP.
• Serial Input/output control
It controls the serial data communication by using these two instructions: SID
(Serial input data) and SOD (Serial output data).
• Address buffer and address-data buffer
The content stored in the stack pointer and program counter is loaded into the
address buffer and address-data buffer to communicate with the CPU. The
memory and I/O chips are connected to these buses; the CPU can exchange the
desired data with the memory and I/O chips.
• Address bus and data bus
Data bus carries the data to be stored. It is bidirectional, whereas address bus
carries the location to where it should be stored and it is unidirectional. It is used
to transfer the data & Address I/O devices.

Saurav Mehta, ABVGIET Pragatinagar


8085 Pin Diagram

Saurav Mehta, ABVGIET Pragatinagar


Classification
 Signals are classified as:
 Address bus
 Data bus
 Power and frequency signals
 Control and status signals
 Externally initiated signals
 Serial I/O ports

Saurav Mehta, ABVGIET Pragatinagar


Description
 Higher Order Address Bus
These are eight pins from A15 – A8 which are unidirectional and
used for MSBs, called higher order address of 16 bit address.

 Multiplexed Address/Data Bus


These are eight signal lines from AD7 –AD0 are which are
bidirectional and serve dual purpose. They are used as low order
address bus as well as data bus. The lower order address can be
latched from multiplexed bus by using ALE signal.

Saurav Mehta, ABVGIET Pragatinagar


 Control and status signals

• : It is a control signal used for Read operation either from


memory or from Input device. It is an active low signal.
• : It is a control signal used for Write operation either into
memory or into output device. It is an active low signal.
• ALE: It is used to enable Address Latch. It indicates whether
Multiplexed Address/Data 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.
• : This is a status signal. This pin tells whether IO or memory
operation is being performed. If = 1 then IO operation is
being performed. If = 0 then memory operation is being
performed.

Saurav Mehta, ABVGIET Pragatinagar


 S1 and S0
These are status signals similar to signal, can identify
various operations. Their operations are listed in table
below.

Operations S1 S0
Opcode fetch 0 1 1
M/m read 0 1 0
M/m write 0 0 1
I/O read 1 1 0
I/O write 1 0 1
Interrupt Acknowledge 1 1 1

Saurav Mehta, ABVGIET Pragatinagar


 Power Supply And Clock Frequency

• VCC : It is 5V power supply signal.


• VSS : It is ground reference signal.
• X1,X2 : A crystal (or RC, LC N/W) is connected at
these two pins and is used to set frequency of the
internal clock generator. This frequency is internally
divided by two. So to have 3MHz frequency crystal
should have a frequency of 6MHz.
• CLK OUT: This signal is used as the system clock
for devices connected with the microprocessor.

Saurav Mehta, ABVGIET Pragatinagar


 Externally Initiated Signals

These include five interrupt signals, DMA signals, reset signals


and a READY signal.
• TRAP: It is an non-maskable interrupt and cannot be
disabled. It has the highest priority. TRAP is usually used for
power failure and emergency shutoff. Microprocessor starts
execution from 0024H Vector address.
• RST 7.5: It is a maskable interrupt. It has the second
highest priority. Microprocessor starts execution from
003CH Vector address.
• RST 6.5: It is a maskable interrupt. It has the third highest
priority. Microprocessor starts execution from 0034H Vector
address.
Saurav Mehta, ABVGIET Pragatinagar
• RST 5.5: It is a maskable interrupt. It has the fourth
highest priority. Microprocessor starts execution from
002CH vector address.

• INTR: It is a maskable interrupt. It has the last


priority. It is non – vectored interrupt.

• : It is an interrupt acknowledgment signal. It is active


low signal. Low output on this pin indicates that
microprocessor has acknowledged the INTR
request.

Saurav Mehta, ABVGIET Pragatinagar


• HOLD: HOLD pin is used to request the
microprocessor for DMA transfer. A high signal on
this pin is a request to microprocessor to release the
hold on buses. This request is sent by DMA
controller. Intel 8257 and Intel 8237 are two DMA
controllers.

• HLDA: HLDA stands for Hold Acknowledge. The


microprocessor uses this pin to acknowledge the
receipt of HOLD signal. When HOLD goes low,
HLDA also goes low and the microprocessor
takes control of the buses.

Saurav Mehta, ABVGIET Pragatinagar


• : 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.
• RESET OUT: It is used to reset the peripheral devices and
other ICs on the circuit. It is an output signal. 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.
• 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.

Saurav Mehta, ABVGIET Pragatinagar


 Serial I/O Ports

• SID: It takes 1 bit input from serial port of 8085 to


the accumulator. RIM (Read Interrupt Mask)
instruction is used to transfer the bit.

• SOD: It takes 1 bit from Accumulator to serial port


of 8085 to the accumulator. SIM (Set Interrupt Mask)
instruction is used to transfer the bit.

Saurav Mehta, ABVGIET Pragatinagar


Addressing Modes of 8085
• Various formats in which processor specify the
address of data which is to be accessed.
• For 8085, they are:
i. Immediate addressing mode.
ii. Register addressing mode.
iii. Direct addressing mode.
iv. Indirect addressing mode.

Saurav Mehta, ABVGIET Pragatinagar


• Immediate Addressing
Data is present in the instruction. Load the immediate
data to the destination provided. 8 or 16 bit data can be
specified as a part of instruction. The instruction having
‘I’ (Immediate) letter at the end fall under this category.
Examples:
MVI C,25H
MVI M,7CH
LXI D,245EH
ADI 87H

Saurav Mehta, ABVGIET Pragatinagar


• Register Addressing
Data transfer between Registers. Specifies the Source ,
Destination or Both Operand in 8085 registers. Faster
Execution (it is not necessary to access memory
locations )
Examples :
MOV A,B
ADD E
SPHL
XCHG
INR L

Saurav Mehta, ABVGIET Pragatinagar


• Direct Addressing
Data is directly transferred from the specified address to
destination specified in instruction itself.
Examples :
LDA 2000H
LHLD 1111H
IN 75H

Saurav Mehta, ABVGIET Pragatinagar


• Indirect Addressing
The address of data is not specified directly. The
memory address where the data is located is specified
by the contents of a register pair.
Examples :
LDAX B
MOV M,D
MVI M,55H

Saurav Mehta, ABVGIET Pragatinagar


• Implicit/Implied Addressing
There is no operand in the instruction. Operand is
implicit in the instruction itself.
Examples :
CMA
RAL
HLT

Saurav Mehta, ABVGIET Pragatinagar

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy