Mpi Assignment Solution3
Mpi Assignment Solution3
Alkesh M Khatri
MPI Sem- IV
Solution of Assignment 3
Q.1.
Draw and Explain Timing Diagram of Op-Code Fetch Machine
Cycle.
Answer:
MPI Sem- IV
line of
the system bus indicating a memory operation the 8085 sets S 1=1 and
S0= 1 on the system bus, indication the memory fetch operation this
status information remains constant for the duration of the m/c cycle.
During T1state, the 16 bit address A 15 - A0, of the memory location
containing the op code is obtained from the program counter pc and
placed in the address and address data latches the higher order 8 bits of
the address appears on the address bus A15 - A0, remains constants until
the end of the state T3 during T4 state the data on the address bus is
unspecified.
The low order 8 bits of the address is placed on the address/data
bus, AD7 - AD0 at the beginning of T1 this data however remains valid only
until the beginning of T2 at which time the addr/data bus is floated (3
states) because this is time multiplexed bus and used on the data bus
during T2 and T3 state. Therefore addr latch enable (ALE) signal issued by
the microprocessor during T1 is used to latch this lower order addr in same
external hardware 8212 on its falling edge the 16 bit addr select a
particular memory location.
RD
During state T2, at the beginning. The
signal goes low
indicating read operation and the opcode to be fetched is placed on the
data bus, AD7 - AD0, by the addressed memory location. The contents of
MPI Sem- IV
RD
output its data before
goes high slower memories can gain more
time by pulling
the READY signal of 8085 LOW this will introduce an integral no of T wait
state between T2 and T3 as long as READY is low on the ring edge of the
RD
control signal in T3, the opcode obtaining from memory is transferred
to the micro process instruction register.
During data T4, the 8085 decodes the instruction and determines
whether to enter state T5 or to enter T1 state of the next m/c cycle from
the operation code the microprocessor determines what other m/c cycles
if any must be execute to complete the instruction cycle state T5 & T6,
when entered, are used for internal microprocessor operation necessitated
by the instruction.
The micro RTL flow for 4 data OFMC is shown below.
MPI Sem- IV
The IO/ M signal made low to indicate the external world that a
memory reference is required. Then microprocessor made S1=1, S0=0
indicating that memory READ operation is to be performed. During the
8085 places the contents of high byte of the memory address register,
such as that contents of the (PCH) or (H) register on lines A15 - A8 and
the contents of the low byte of the memory address register such as
contents of the (PCL) or (L) reg. On lines AD7 - AD0. The 8085 sets ALE to
HIGH, indicating the beginning of MC-2 AS soon as ALE goes to low, the
8085 latches the low byte of the address lines, since the same lines as
going to be used as data lines.
MPI Sem- IV
T1
T2
T3
The 8085
made IO/
M
=0
in
of
the
beginning
T1state to
indicate
MPI Sem- IV
P (Internal Register)
T2: MR = 0, AD7- AD0
IO/ M signal is high for I/O read and I/O write machine cycles.
MPI Sem- IV
MPI Sem- IV
of
IN
C0H
MPI Sem- IV
MPI Sem- IV
MPI Sem- IV
MPI Sem- IV
2. ADD M
3. ANA M
4. CMP M
MPI Sem- IV
5. MOV R, M
6. MOV M, R
MPI Sem- IV
7. SBB M
8. STAX Rp
MPI Sem- IV
9. SUB M
10.
XRA M
MPI Sem- IV
MPI Sem- IV
2. ADI data
3. ANI data
4. CPI data
MPI Sem- IV
5. MVI R, data
6. ORI, data
MPI Sem- IV
7. SUI data
8. XRI data
MPI Sem- IV
MPI Sem- IV
MPI Sem- IV
for the specified logic levels on these higher order address line; no
other logic levels can select the chip.
Figure shows the memory interface with absolute decoding. This
addressing technique is normally used in large memory systems.
Memory Map:
Memor A1 A1 A1 A1 A1 A1
Addre
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
5
4
3
2
1
0
ss
y ICs
Starti
ng
addre
0000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ss of
H
EPRO
M
End
addre
03FF
ss of
0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1
H
EPRO
M
Starti
ng
2000
Addre 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
H
ss of
RAM
End
addre
23FF
0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1
ss of
H
RAM
MPI Sem- IV
Memor A1 A1 A1 A1 A1 A1
Addre
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
5
4
3
2
1
0
ss
y ICs
Starti
ng
addre
0000
0 X X X X X 0 0 0 0 0 0 0 0 0 0
ss of
H
EPRO
M
End
addre
ss of
EPRO
M
Starti
ng
Addre
ss of
RAM
End
addre
ss of
RAM
MPI Sem- IV
03FF
H
8000
H
83FF
H
IO is treated as memory.
IO is treated IO.
MPI Sem- IV
5
6
9
10
Q.15.
Interface 16k x 8 EPROM memory to 8085. The
available memory chip is 4k x 4. The address should start
from 0000H onwards. Give the details interfacing schematic
and address range for each chip used.
Answer:
Q.16.
Show with the help of Circuit Diagram how to connect one i/p
port and one O/P Port on same address.
Q.17.
What is an O/P port? Explain the design of output port with
example.