Professional Documents
Culture Documents
Nirmala Shinde
Contents
y Definition of microprocessor y Architecture of 8085 y System Bus, y Pin Configuration 8085 Microprocessor. y Addressing modes.
Definition
microprocessor is responsible for performing all the functions & commands of a computer. y Every s/w program & every h/w component of the computer is dependent upon the microprocessor. y The processor manipulates data through the s/w, and transfers information between the other h/w components of the computer, such as the memory and the keyboard.
y The
Definition
y The microprocessor, also known as the
Introduction to 8085
y Introduced in 1977. y It is 8-bit MP. y It is a 40 pin dual-in-line chip. y It uses a single +5V supplyfor its operations. y Its clock speed is about 3MHz.
Architecture of 8085
Processing Unit
y Arithmetic and Logic Unit y Accumulator y Status Flags y Temporary Register
Instruction Unit
y Instruction Register y Instruction Decoder y Timing and Control Unit
Other Units
y Interrupt Controller y Serial I/O Controller y Power Supply
Accumulator
y It the main register of microprocessor. y It is also called register A. y It is an 8-bit register. y It is used in the arithmetic and logic operations. y It always contains one of the operands on which
Temporary Register
y It is an 8-bit register. y It is used to store temporary 8-bit operand
operations.
y The data is available in accumulator and
y Logic Operations:
y AND, OR, X-OR, Complement etc.
Status Flag
y Status Flags are set of flip-flops which are
Status Flag
Flag S Z AC P CY Meaning Sign Flag Zero Flag Auxiliary Carry Flag Parity Flag Carry Flag
Status Flag
y Sign Flag (S)
y It tells the sign of result stored in Accumulator
Status Flag
y Zero Flag (Z)
y It tells whether the result stored in Accumulator
Status Flag
y Auxiliary Carry Flag (AC)
y It is used in BCD operations. y When there is carry in BCD addition, we add
is set (1).
y If there is no carry, auxiliary carry is reset (0).
Status Flag
y Parity Flag (P)
y It tells the parity of data stored in Accumulator. y If parity is even, parity flag is set (1). y If parity is odd, parity flag is reset (0).
Instruction Register
y It is used to hold the current instruction
Instruction Decoder
y It interprets the instruction stored in
instruction register.
y It generates various machine cycles
D, E, H, L.
y Each of the them is 8-bit register. y They are used to hold data and results. y To hold 16-bit data, combination of two 8-bit
Program Counter
y It is used to hold the address of next
instruction to be executed.
y It is a 16-bit register. y The microprocessor increments the value of
Program Counter after the execution of the current instruction, so that, it always points to the next instruction.
Stack Pointer
y It holds the address of top most item in the
stack.
y It is also 16-bit register. y Any portion of memory can be used as
stack.
Increment/Decrement Register
y This register is used to increment or
Pointer is incremented.
y During POP operation, the value of Stack
Pointer is decremented.
Address Latch
y It is group of 8 buffers. y The upper-byte of 16-bit address is stored in
this latch.
y And then it is made available to the
peripheral devices.
y The lower-byte of address and 8-bit of data
are multiplexed.
Address Latch
y It holds either lower-byte of address or 8-bits of
data.
y This is decided by ALE (Address Latch Enable)
signal.
y If ALE = 1 then
y Address/Data Latch contains lower-byte of address.
y If ALE = 0 then
y It contains 8-bit data.
data.
y Therefore, this unit is the interface between
Interrupt Controller
y It is used to handle the interrupts. y There are 5 interrupt signals in 8085:
y TRAP y RST 7.5 y RST 6.5 y RST 5.5 y INTR
Interrupt Controller
y Interrupt controller receives these interrupts
Power Supply
y This unit provides +5V power supply to the
microprocessor.
y The microprocessor needs +5V power supply
System Bus
y The CPU sends various data values, instructions
and information to all the devices and components inside the computer.
y If you look at the bottom of a motherboard you'll
see a whole network of lines or electronic pathways that join the different components together.
y This network of wires or electronic pathways is
System Bus
y Types of Bus
y Data Bus y Address Bus y Control Bus
Data Bus
y A collection of wires through which data is
Data Bus
y The size (width) of bus determines how
time.
y 32-bit bus can transmit 32 bits at a time.
Address Bus
y A collection of wires used to identify
Address Bus
y The size of address bus determines how many
Bytes of memory.
y A system with 16-bit address bus can address 216 =
64 KB of memory.
y A system with 20-bit address bus can address 220 = 1
MB of memory.
Control Bus
y The connections that carry control information
between the CPU and other devices within the computer is called Control Bus.
y The control bus carries signals that report the
signals internally.
y To generate clock
microprocessor.
y It is active low signal. y When the signal on this
pin is low for at least 3 clocking cycles, it forces the microprocessor to reset itself.
all
interrupts
(except TRAP).
y Disabling the SOD pin. y All the buses (data, address,
OUT pin.
port of 8085.
y Stores the bit at the 8th position
(Read
Interrupt
Mask)
Interrupt Pins
y Interrupt
y It means interrupting the normal execution of the micro-
processor.
y When
microprocessor
receives
interrupt
signal,
it
signal.
y Interrupt
devices.
y After execution of the new program, microprocessor goes
value of stack.
Classification of Interrupts
y Maskable and Non-Maskable y Vectored and Non-Vectored y Edge Triggered and Level Triggered y Priority Based Interrupts
Maskable Interrupts
y Maskable interrupts are those interrupts which can
be enabled or disabled.
y Enabling and Disabling is done by software
instructions.
y List of Maskable Interrupts
y RST 7.5 y RST 6.5 y RST 5.5 y INTR
Non-Maskable Interrupts
y The interrupts which are always in enabled
Vectored Interrupts
y The interrupts which have fixed memory location
location in memory.
y List of vectored interrupts
y RST 7.5 y RST 6.5 y RST 5.5 y TRAP
Vectored Interrupts
y The addresses to which program control
goes:
Name Vectored Address RST 7.5 003C H (7.5 x 0008 H) RST 6.5 0034 H (6.5 x 0008 H) RST 5.5 002C H (5.5 x 0008 H) TRAP 0024 H (4.5 x 0008 H)
Non-Vectored Interrupts
y The interrupts which don't have fixed
edge.
more pins then the pin with higher priority is selected by the microprocessor.
y Priority is considered only when there are simultaneous
requests.
y Priority of interrupts:
Interrupt
TRAP RST 7.5 RST 6.5 RST 5.5 INTR
Priority
1 2 3 4 5
instruction.
y It can be disabled by DI
instruction.
RST 6.5.
it can be used to vector microprocessor to any specific subroutine having any address.
y Data Bus
y It is used to transfer data between microprocessor
and memory.
y Data bus is of 8-bit.
address bus.
y The address is sent from
microprocessor to memory.
y These 8 pins are switched to high
Latch.
y It indicates whether bus
y If ALE = 0 then
y Bus functions as data bus.
S0
0 0 1 1
S1
0 1 0 1
Operation
Halt Write Read Op-code Fetch
performed.
y If IO/M = 0 then
y Memory operation is being
performed.
and S1.
y If S0 = 0 and S1 = 1 then
y It indicates WRITE operation.
y If IO/M = 0 then
y It indicates Memory operation.
Operation.
IO/M
0 0 0 1 1 1 High Impedance
S0
1 1 0 1 0 1 0
S1
1 0 1 0 1 1 0
RD Pin 32 (Output)
y RD stands for Read. y It is an active low signal. y It is a control signal used for Read
the data bus must be placed either from selected memory location or from input device.
WR Pin 31 (Output)
y WR stands for Write. y It is also active low signal. y It is a control signal used for Write
the data bus must be written into selected memory location or into output device.
controller.
y Intel 8257 and Intel 8237 are two
DMA controllers.
address bus, data bus, RD, WR, IO/M pins are tri-stated.
y This means they are cut-off from
external environment.
DMA Controller.
y Control remains at DMA Controller
to VCC.
y Ground signal is connected to
VSS.
3 things:
y Operation to be performed. y Address of source of data. y Address of destination of result.
of data or the address of destination of result is given in the instruction is called Addressing Modes.
y The term addressing mode refers to the way
modes:
y Direct Addressing Mode y Register Addressing Mode y Register Indirect Addressing Mode y Immediate Addressing Mode y Implicit Addressing Mode
y LDA is the operation. y 2500 H is the address of source. y Accumulator is the destination.
purpose register.
MOV A, B Move the contents of register B to A.
y MOV is the operation. y M is the memory location specified by y H-L register pair. y A is the destination.
of destination of result is fixed, then there is no need to give any operand along with the instruction.
CMA Complement accumulator.