Professional Documents
Culture Documents
To execute a program, the 8085 performs various operations such as opcode fetch,
operand fetch, and memory read/write or /O read/write. The microprocessor's
external communication function can be divided into three categories:
(i) Memory read/write (ii) I/O read/write
(ii) Interrupt request acknowledge
Table 3.14 gives the various possible states of the processor based on the
control signals 1O/M, s0, and S1.
52 MICROPROCESSORS AND MICROCONTROLLERS
Z Halt
(high impedance) Memory write
0 0
VO write
0
Memory read
0
VO read
Opcode fetch
0 Interrupt acknowledge
fetch machine
T-states to execute the opcode
The 8085 microprocessor takes four
execute the memory
and I/O read/write cycles. The
cycle and three T-states to fetch cycle and is explained
acknowledge cycle is similar to the opcode
interrupt number of machine
8085 requires a definite
in Chapter 5. Every instruction of the instructions, dividing
the execution of some
cycles. Sections 3.5.1-3.5.5 explain
and further into many T-states.
them into the corresponding machine cycles
c o m m o n waveform
of the clock signal used in
Figure 3.6 shows the
is a square waveform of high frequency
microprocessor systems. The clock signal
of the clock signal can be clearly
in the range of MHz. The rising and falling edge low.
and time period is correspondingly very
seen, as its frequency is very high
11-state
SIGNAL T3 T4
CLOCK
Lower-order
AD0-AD7 Opcode (D7-D0)
memory address
ALE
RD
The following points explain the various operations that take place and the
signals that are changed during the execution of the opcode fetch machine cycle:
During Tl clock cycle
) The content of the program counter is placed in the address bus. The lower
order address is placed in the ADO-AD7 lines and the higher-order address
is placed in the A8-A15 lines. The change of binary levels on these lines is
shown in the timing diagram by a cross.
i) 1OM signal goes low to indicate that a memory location is being accessed.
This signal is used by external devices to identify memory and I/O device
accesses for interfacing. The signals on the status lines SO and S1 are also
changed to the levels indicated in Table 3.14.
(1i) ALE signal becomes active high to indicate that the multiplexed AD0-AD7
lines are acting as the lower-order address bus.
3.
CLOCK The
por
A8-A15 Higher-order memoryladdress
Lower-order
Data(07-D0)
****
ADO-AD7 ***"*****
nemory address
ALE
OM=0, $1 1S00
OM, S1, S0
RD
NSTRUCTION SET AND EXECUTION IN 8085 55
SIGNAL T1 T2
CLOCK
ADO-AD7 Lower-order
Data|(D7-D0)
********
nemory address
ALE
WR
SIGNAL T1 T2 T3
CLOCK
ALE
RD
port addresses. So the port address is placed in the lower-order address bus. At the
he
same time, the port address is also placed in the higher-order address bus. Thie
facilitates easy design of hardware for address decoding. The processor takes three
T-states to execute this machine cycle. The IN instruction uses this machine cycle
CLOCK
ADO-AD7
Port address Datal(D7-D0) **
LE
WR
CLK
ALE
RD
WR
T9 T10
1 12 T3 T4 5 T
CLK
80H 80H
A8-A15 80H
ALE
RD
WR
alaced in the address bus, the memory content is brought to the processor,
and its value is incremented.
During the third machine cycle, the incremented data is again written back
into the same address, as shown in the timing diagram given in Fig. 3.14.
CLK
ALE
RD
T1 2 3 T4 I1 2
CLK
RO
DO-D7
Latch
AD0-AD7 74LS373
A0-A7
ALE
8085
AB-A15
Fig. 3.16 Hardware interfacing for de-multiplexing lower-order address bus and data bus
During the first T-state in all the machine cycles, the ADO-AD7 lines act
on these lines. The
as address bus and the lower-order address is available
ADO-AD7 lines are converted into the data bus during the second T-state.
the
However, the memory devices require the lower-order address lines during
entire machine cycle. So, during the first T-state, the lower-order address lines sent
out by the microprocessor is stored into a separate latch or register. The common
this
74LS373 latch, which has inputs and outputs of 8 bits each, can be used for
address lines available in
purpose. The ALE control signal is used for latching the