PadhaikoAll subjects

Past exam question: 2082 Chaitra (Regular), Q3(a)

Microprocessors · 5 marks

Open in the Padhaiko app

Topic: Instruction, Machine & T-Cycles; Timing Diagrams

Question

Draw and explain the timing diagram of MVI M.

Solution

Instruction Structure & Machine Cycle Breakdown: MVI M, data (Opcode: 36H) is a 2-byte instruction that transfers an immediate 8-bit data byte into the memory location addressed by the HL register pair.

Execution requires 3 machine cycles and a total of 10 T-states:

  1. M1 (Opcode Fetch - OF): 4 T-states (T1–T4) — fetches the opcode 36H from memory address in PC.
  2. M2 (Memory Read - MR): 3 T-states (T5–T7) — reads the immediate 8-bit operand byte from memory address PC+1 into internal temporary register.
  3. M3 (Memory Write - MW): 3 T-states (T8–T10) — writes the immediate data byte into the memory location pointed to by HL.

Signal Activities Across Machine Cycles:

Timing Diagram Visualization:

MVI M, data CLK A15–A8 AD7–AD0 ALE IO/M̅ S1 S0 RD̅ WR̅ OF T1 T2 T3 T4 20H Unspecified 00H 36H High-Z MR T1 T2 T3 20H 01H 45H MW T1 T2 T3 30H 50H 45H
MVI M, data · OF + MR + MW · 10 T-states

The diagram visualizes the three consecutive machine cycles showing clock oscillations, address demultiplexing via ALE, status lines (IO/M\_bar, S1, S0), active-low RD\_bar during OF/MR, and active-low WR\_bar during MW.

Answer:

The timing diagram of MVI M comprises 3 machine cycles: Opcode Fetch (4 T-states), Memory Read (3 T-states), and Memory Write (3 T-states), totaling 10 T-states to fetch opcode 36H, read the immediate data byte, and write it to location (HL).

All past exam questions for Microprocessors