Pin Diagram of 8085 Microprocesoor
Pin Diagram of 8085 Microprocesoor
1
Pin Diagram of 8085
2
Clock Signals
Pin 1 and Pin 2 (Input) and Pin 37(output)
X1 and X2 and are clock input pins
also called as Crystal Input Pins.
3
Clock signals
4
RESET IN and RESET OUT
Pin 36 (Input) and Pin 3 (Output)
RESET IN:
5
RESET IN and RESET OUT
Pin 36 (Input) and Pin 3 (Output)
Resetting the microprocessor
means:
6
RESET IN and RESET OUT
Pin 36 (Input) and Pin 3 (Output)
RESET OUT:
◦ It is an output signal.
7
SID and SOD
Pin 4 (Input) and Pin 5 (Output)
SID (Serial Input Data):
8
SID and SOD
Pin 4 (Input) and Pin 5 (Output)
SOD (Serial Output Data):
9
Five Hardware Interrupts in 8085
TRAP
RST 7.5
RST 6.5
RST 5.5
INTR
10
AD0 – AD7
Pin 19-12 (Bidirectional)
• These pins serve the dual purpose of
transmitting lower order address
and data byte.
12
ALE
Pin 30 (Output)
• It is used to enable Address Latch.
• If ALE = 1 then
• Bus functions as address bus.
• If ALE = 0 then
• Bus functions as data bus.
13
S0 and S1
Pin 29 (Output) and Pin 33 (Output)
• S0 and S1 are called Status Pins.
S0 S1 Operation
0 0 Halt
0 1 Write
1 0 Read
1 1 Opcode Fetch
14
IO/M
Pin 34 (Output)
• This pin tells whether I/O or
memory operation is being
performed.
• If IO/M = 1 then
• I/O operation is being performed.
• If IO/M = 0 then
• Memory operation is being performed.
15
IO/M
Pin 34 (Output)
• The operation being performed is indicated by S0 and S1.
• If S0 = 0 and S1 = 1 then
• It indicates WRITE operation.
• If IO/M = 0 then
• It indicates Memory operation.
16
Table Showing IO/M, S0, S1 and
Corresponding Operations
Operations IO/M S0 S1
Opcode Fetch 0 1 1
Memory Read 0 1 0
Memory Write 0 0 1
I/O Read 1 1 0
I/O Write 1 0 1
Interrupt Ack. 1 1 1
Halt High Impedance 0 0
17
RD
Pin 32 (Output)
• RD stands for Read.
18
WR
Pin 31 (Output)
• WR stands for Write.
19
READY
Pin 35 (Input)
• This pin is used to synchronize slower
peripheral devices with fast
microprocessor.
20
HOLD
Pin 38 (Input)
• HOLD pin is used to request the
microprocessor for DMA transfer.
21
HLDA
Pin 39 (Output)
• HLDA stands for Hold Acknowledge.
22
HLDA
Pin 39 (Output)
• The control of these buses goes to
DMA Controller.
23
VSS and VCC
Pin 20 (Input) and Pin 40 (Input)
24
The three cycle instruction execution model
25
Instruction cycle in 8085 microprocessor
26
Fetch Cycle
• The 1st byte of an instruction is its opcode, the other bytes are data
or operand’s address.
• In the beginning of fetch cycle the content of PC to the memory and
memory places the opcode on the data bus so as to transfer it to the
processor.
• The entire operation of fetching the opcode takes three clock cycles:
1. Content of pc transfer to the address bus
2. Content of memory location transfer to the data bus
3. From data bus to the IR
4. 4th cycle is for decoding the opcode
• The time required to fetch an opcode is fixed i.e. of 3 clock cycles,
and in the 4th cycles decodation occurs while the time required to
execute the instruction is depend upon the type of instruction
27
Machine cycle
• The time required by the microprocessor to complete an operation of
accessing memory or input/output devices is called machine cycle.
• The fetching, decoding and execution of a single instruction
constitutes an instruction cycle, which consists of one to five read or
write operations between processor and memory or input/output
devices. Each memory or I/O operation requires a particular time
period, called machine cycle.
• In other words, to move byte of data in or out of the microprocessor,
a machine cycle is required. Each machine cycle consists of 3 to 6
clock periods/cycles, referred to as T-states.
• Therefore we can say that, one instruction cycle consists of one to
five machine cycles and one machine cycle consists of three to six T-
states i.e. three to six clock periods,
28
Machine cycle contd.
30
Timing Diagram of 8085
• It is the graphical representation of process in steps with respect to
time.
• The timing diagram represents the clock cycle and duration, delay,
content of address bus and data bus, type of operation i.e.
Read/write/status signals.
• The execution time is represented in T-states.
• The total amount of time taken to execute an instruction depends
upon the size of instruction and the frequency of the microprocessor.
• For e.g. consider the instruction MVI A, 02H, it is a two byte
instruction , consists of 2 machine cycles, M1 for opcode fetch and
M2 for memory read.
• M1 consists of 4 T-states and M2 consists of 3 T-states so total 7
cycles.
31
Contd.
32
What are the control signals used in timing
diagram of 8085 microprocessor?
1. IO/ M
IO/ M signal indicate whether I/O or memory operation is being carried out. A high on this
signal indicates I/O operation while a low indicates memory operation.
2. S0 and S1
S0 and S1 indicate the type of machine cycle in progress.
3. ALE
ALE is indicates the availability of a valid address on the multiplexed address/data lines.
When it is high act as a address bus and low act as a data bus.
4. Rd
Read is an active low signal that indicates that data is to be read form the selected
memory or i/o device through data bus.
5. WR
Write is an active low signal that indicates that data on the data bus is to be write form the
selected memory or i/o device.
33
Opcode Fetch Cycle
• The first machine cycle of every
instruction is opcode fetch cycle in
which the 8085 finds the nature of
the instruction to be executed.
• In this machine cycle, processor
places the contents of the Program
Counter on the address lines, and
through the read process, reads
the opcode of the instruction.
• The length of this cycle is varies
from 4T states to 6T states as per
the instruction.
34
Opcode Fetch Cycle
• Step 1 : (State T1) In T1 state, the 8085 places the contents of program
counter on the address bus. The high-order byte of the PC is placed on
the A8-A15 lines. The low-order byte of the PC is placed on the AD0 –
AD7 lines which stays on only during T1. Thus microprocessor activates
ALE (Address Latch Enable) which is used to latch the low-order byte of
the address in external latch before it disappears.
• In T1, 8085 also sends status signals IO/M, S1, and S0. IO/M specifies
whether it is a memory or I/O operation, Si status specifies whether it
is read/write operation; S1 and S0 together indicates read, write,
opcode fetch, machine cycle operation, or whether it is in HALT state.
In opcode fetch machine cycle status signals are : IO/M = 0, S1 = 1, S0 =
1.
35
Contd.
• Step 2 : (State T2) In T2, low-order address disappears from the AD0 –
AD7 lines. (However Ao – A7remain available as they were latched
during T1). In T2, 8085 sends RD signal low to enable the addressed
memory location. The memory device then places the contents of
addressed memory location on the data bus (ADo – AD7).
• Step 3 : (State T3) During T3, 8085 loads the data from the data bus in
its Instruction Register and raises RD to high which disables the
memory device.
• Step 4 : (State T4) In T4, microprocessor decodes the opcode, and on
the basis of the instruction received, it decides whether to enter
state T5 or to enter state T1 of the next machine cycle. One byte
instructions those operate on eight bit data (8 bit operand) are
executed in T4.
• For example : MOV A, B, ANA D, ADD B, INR L, DCR C, RAL and many
more.
36
Contd.
• Step 5 : (State T5 and T6) State T5 and T6, when entered, are used for
internal microprocessor operations required by the instruction.
During T5 and T6 8085 performs stack write, internal 16 bit; and
conditional return operations depending upon the type of
instruction. One byte instructions those operate on sixteen bit data
(16 bit operand) are executed in T5 and T6. For example DCX H, PCHL,
SPHL, INX H, etc.
37
The micro RTL flow for 4-states OFMC
38
Timing Diagram of Opcode fetch
39
Memory READ Machine Cycle
40
Micro RTL of MRMC
41
Memory Write Cycle
42
Interrupt Acknowledge cycle for CALL instruction
• For CALL instruction, it is necessary to fetch the two bytes of the CALL
address through two additional interrupt acknowledge machine
cycles (M2 and M3 ).
• The machine cycles M4 and M5 are memory write cycles that store
the contents of the program counter on the stack, and then a new
instruction cycle begins.
43
Timing Waveform for Call Instruction
44
Bus Idle Cycle
• There are few situations where the machine cycles are neither Read
nor Write.
• For execution of DAD instruction (this instruction adds the contents
of a specified register pair to the contents of HL register pair) ten T
states are required.
• This means that after execution of opcode fetch machine cycle, DAD
instruction requires 6 extra T-states to add 16 bit contents of a
specified register pair to the contents of HL register pair.
• These extra T-states which are divided into two machine cycles do
not involve any memory or I/O operation. These machine cycles are
called BUS IDLE machine cycles.
• In the case of DAD, these Bus Idle cycles are similar to memory read
cycles, except RD and ALE signals are not activated.
45
Bus Idle Cycle
46
Concept of Wait States
48
Timing diagram for STA 526AH
50
Timing diagram for IN C0H
51
IN C0H
52