Professional Documents
Culture Documents
Chapter 3
Chapter 3
Chapter 3
Microprocessor 8085
Architecture
Outline
Pin out diagrams and pin detail
Internal architecture of 8085
Timing and control unit
Instruction registers and decoder
IO/M(output):
This signal specifies whether the operation
is a memory operation (IO/M=0) or an I/O operation
(IO/M=1).
when it goes high, the address on the bus is for I/O device –thus
it indicates an I/O operation
when it goes low, the address on the bus is for the memory
location-thus it indicates a memory operation
S1 and S0(output) : Status signals to specify the kind of
operation being performed. Usually not used in small
systems
The Control and Status Signals Cont…
CLK (OUT): An output clock pin to drive the clock of the rest
of the system(to other digital Ics).
VCC: +5Vdc, Vss: GND
Externally generated signals
READY (input): used to synchronize slower
peripherals with the MP.
That is it is used by the MP to sense whether a
peripheral is ready to transfer data or not.
If high- ready, else MP get into wait state
Serial I/O
Interrupt Control Control
MUX
IR (8)
W (8) Z (8)
IO/M
AB(8) ADB (8)
WR ALE HOLD HLDA RESET OUT
CLK OUT READY RD S0 S1 RESET IN
A15-A8 AD7-AD0
Fig. The 8085A MP functional block diagram
Timing & Control Unit
This unit synchronizes all the MP operations with
the clock and generates the control signals
necessary for communication between the MP &
peripherals
it generates timing and control signals which are necessary
for the execution of instructions.
it provides status, control and timing signals which are
required for the operation of memory and I/O devices
it controls the entire operations of the MP and
peripherals connected to it
CU acts as the brain of the computer system
Instruction Register & Decoder
High-order
8085 Address Bus
MP
A8 A8
ALE
G
CLK
AD7 D Q A7
74LS373
Low-order
Octal Latch
Address Bus
AD0 OC A0
D7
8-bit
Data Bus
D0
Timing Diagrams
It is a representation of Various Control signals generated during Execution
of an Instruction
Instruction Cycle : the necessary steps that a CPU carries out to fetch an
opcode from memory and decode it and read necessary data from
memory and execute it and store the result back to memory (if any)
constitute an instruction cycle.
- an instruction cycle consists of a fetch cycle and execute cycle. Thus
the total time required to execute an instruction is given by
IC = FC + EC
Fetch cycle:- constitute the necessary steps which are carried out to
fetch an opcode from the memory
Execute cycle:- constitute the necessary steps which are carried out to
get (read) data, if any, from the memory and to perform the specific
operation(s) specified in the instruction and stored the result, if any.
After the instruction is decoded , execution begins.
- In the execute operation: after the instruction is decoded (during fetch cycle)
execution begins.
• If the operand is in GPRs, execution is immediately performed---the time
taken in decoding and executing is one clock cycle.
• If an instruction contains data or operand or address which are still in
memory, the CPU has to perform memory read operations to get the
desired data. After receiving the data it performs execute operation. i.e., in
some instructions an execute cycle may involve one or more Read or Write
cycles or both.
Wait Cycle:- clock cycle(s) for which the MP waits till, incase, a slow memory sends the
opcode. Most of the CPUs have been designed to introduce WAIT cycles to cope with
slow memories.
Machine cycle: constitute necessary steps carried out to perform an operation such as
fetch operation, memory read/write, I/O read/write operations.
- an instruction cycle may consist 1 to 5 machine cycles.
T-sate: one clock cycle of the system clock. One m/c may consist 3 to 6 T-states.
• Most fetch cycles have 4 T-states. Some can be 5 or 6 T-
states.
Opcode Fetch (M1)
• IO/M goes low indicating that the address is for memory
CLK
T1 T2 T3 T4 • S1=1, S0=1 for fetch operation.
• A8-A15 transmits the 8-MSBs of the memory address of
opcode.
A8-A15 PCH unspecified
• During T1, the 8-LSB of address are sent on AD0-AD7
OUT IN and are latched during T2, thus AD0-AD7 are made
AD0-AD7 PCL Opcode free for opcode fetching during T2 & T3.
D0-D7 • RD is asserted low during T2, to enable the memory for
IO/M fetch operation. Now opcode is placed on AD-bus.
Memory operation
• During T3 the opcode is placed in IR , RD goes High and
Fetch
disables the memory.
S1,S0 • The fetch cycle is completed during T3.
• The opcode is decoded during T4.
ALE Note: The MP examines READY signal in T2, and if it is
high, the MP enters into T3, otherwise if it is low the
RD MP enters a WAIT state between T2 and T3.
Note: if the operands are in GPRs, the decoding of the
opcode and its execution takes only one machine cycle
and 4 T-states. Examples of such instructions include:
Fig. Timing diagram for memory fetch operation MOV r1, r2 ADD r SUB r RAL
etc.
Memory Write . Memory write cycle has 3 T-states.
T1 T2 T3 . IO/M goes low indicating that the
CLK
address is for memory.
.S1=0, S0=1 for write operation.
A8-A15 High-order address
OUT
. A8-A15 transmits the 8-MSBs of the
OUT
AD0-AD7 A0-A7 Data
memory address of data.
D0-D7 . During T1, the 8-LSB of address are sent
IO/M
Memory operation on AD0-AD7 and are latched during T2
thus AD0-AD7 are made free for data
S1
Write transfer.
S0
. Data is placed on AD0-AD7 bus during
T2 by the CPU.
ALE
. WR is asserted low during T2, to enable
WR the memory for Write operation.
. During T3 the data enters into memory,
WR goes High and terminates the write
Fig. Timing diagram for memory Write operation
operation
Memory Read . Memory read cycle has 3 T-states.
T1 T2 T3 . IO/M goes low indicating that the address is for
CLK memory.
. S1=1, S0=0 for read operation.
A8-A15 High-order address . A8-A15 transmits the 8-MSBs of the memory
OUT IN address of data.
AD0-AD7 A0-A7 Data
. During T1, the 8-LSB of address are sent on AD0-
D0-D7
IO/M AD7 and are latched during T2 thus AD0-AD7
Memory operation are made free for data transfer.
S0 . RD is asserted low during T2, to enable the
Read
S1 memory for read operation. Now data is
placed on data bus.
. During T3 the data enters into CPU, RD goes High
ALE
and disables the memory.
RD
CLK
T1 T2 T3 T4 T1 T2 T3
D0-D7 D0-D7
Fetch M. Read
IO/M
Status IO/M=0, S1=1,S0=1 IO/M = 0, S1=1,S0=0
S1,S0
ALE
RD
• The following fig. shows how memory and I/O control signals are generated using
RD, WR, and IO/M and logic gates.
IOW
WR
Fig. Schematic to generate Read/Write Control Signals for memory and I/O
74LS04
Hex converter
- Memory read operation takes place when IO/M and RD both are LOW.
- Memory Write operation takes place when IO/M and WR both are LOW.
- I/O read operation takes place when IO/M is HIGH and RD is LOW.
- I/O write Takes place when IO/M is HIGH and WR is LOW.