Skip to content
Advanced Microprocessor

Timing Diagrams, Machine Cycles & T-States

Clock cycles, Opcode Fetch (4T), Memory Read/Write (3T), I/O Read/Write, and bus timing waveform synchronization.

Knova editors11 min readQuick checkSources

Timing Diagrams and Machine Cycles of 8085

To understand how hardware responds to assembly code, operations are analyzed across three nested temporal layers:

  1. Instruction Cycle (ICIC): The total time required by the microprocessor to fetch and execute a complete instruction. An instruction cycle consists of 11 to 55 machine cycles.
  2. Machine Cycle (MCMC): The time required by the MPU to perform an elementary bus transaction with external memory or an I/O peripheral (e.g., fetching an opcode, reading data, writing data). A machine cycle consists of 33 to 66 clock states.
  3. Clock Cycle or T-State (TT): One individual period of the internal system clock. It represents the smallest fundamental quantum of processor time:
    Tstate=1foperatingT_{\text{state}} = \frac{1}{f_{\text{operating}}}

    If an 8085 operates with a 6.144 MHz6.144\text{ MHz} crystal, the internal frequency is 3.072 MHz3.072\text{ MHz}, giving Tstate≈325.5 nsT_{\text{state}} \approx 325.5\text{ ns}.

The Seven Machine Cycles of 8085

The 8085 executes seven distinct machine cycles, identified externally by status signals IO/M‾,S1,IO/\overline{M}, S_1, and S0S_0:

Machine CycleIO/M‾IO/\overline{M}S1S_1S0S_0Control StrobeT-States Required
Opcode Fetch (OF)011RD‾\overline{RD}4 or 64\text{ or } 6
Memory Read (MR)010RD‾\overline{RD}3
Memory Write (MW)001WR‾\overline{WR}3
I/O Read (IOR)110RD‾\overline{RD}3
I/O Write (IOW)101WR‾\overline{WR}3
Interrupt Acknowledge (INA)111INTA‾\overline{INTA}6 or 126\text{ or } 12
Bus Idle (BI)010None3

Phase Breakdown of the Opcode Fetch Machine Cycle

The Opcode Fetch cycle is the first machine cycle of every instruction. It requires 4 clock states (T1−T4T_1-T_4):

  • State T1T_1 (Address Placement & Latch):
    • The 8085 places the higher-order 8 bits of the Program Counter (PCHPC_H) on address lines A15−A8A_{15}-A_8.
    • The lower-order 8 bits (PCLPC_L) are placed on multiplexed lines AD7−AD0AD_7-AD_0.
    • Status signals IO/M‾=0,S1=1,S0=1IO/\overline{M}=0, S_1=1, S_0=1 assert.
    • ALE pulses HIGH. Its falling edge latches A7−A0A_7-A_0 into the external 74LS373 latch.
  • State T2T_2 (Bus Floating & Read Strobe):
    • ALE drops LOW.
    • Lines AD7−AD0AD_7-AD_0 are put into High-Impedance (tri-state) so memory can drive them without bus contention.
    • Control line RD‾\overline{RD} drops LOW, enabling the addressed memory chip output buffer.
  • State T3T_3 (Opcode Transfer & Latch):
    • The memory device puts the opcode byte onto AD7−AD0AD_7-AD_0.
    • The 8085 reads the byte into its internal Instruction Register.
    • RD‾\overline{RD} rises back to HIGH. The Program Counter increments by 11.
  • State T4T_4 (Internal Instruction Decoding):
    • The internal Instruction Decoder translates the opcode into control micro-steps.
    • The external address and data buses remain inactive during this state.
Fig 5.1: Bus Waveforms for Opcode Fetch Machine Cycle Across T1 to T4 States
Fig 5.1: Bus Waveforms for Opcode Fetch Machine Cycle Across T1 to T4 States

Timing Trace of Multi-Byte Instructions

1. Immediate Load: MVI A, 32H

This is a 2-byte instruction requiring 2 machine cycles (7 T-states7\text{ T-states}):

  1. Opcode Fetch (M1M_1, 4T): Fetches the opcode byte 3EH3\text{E}\text{H} from memory location [PC][PC]. Increments PCPC.
  2. Memory Read (M2M_2, 3T): Reads immediate operand 32H32\text{H} from location [PC][PC] into Accumulator. Increments PCPC.
Total Time=4T+3T=7T≈7×325.5 ns=2.278 μs\text{Total Time} = 4T + 3T = 7T \approx 7 \times 325.5\text{ ns} = 2.278\,\mu\text{s}

2. Direct Memory Store: STA 2050H

This is a 3-byte instruction requiring 4 machine cycles (13 T-states13\text{ T-states}):

  1. Opcode Fetch (M1M_1, 4T): Fetches opcode 32H32\text{H}.
  2. Memory Read (M2M_2, 3T): Reads low-order address byte 50H50\text{H} into temporary register ZZ.
  3. Memory Read (M3M_3, 3T): Reads high-order address byte 20H20\text{H} into temporary register WW.
  4. Memory Write (M4M_4, 3T): Places address 2050H2050\text{H} from [WZ][WZ] onto bus, places Accumulator data on AD7−AD0AD_7-AD_0, and asserts WR‾\overline{WR} low to write to RAM.
Total Time=4T+3T+3T+3T=13T\text{Total Time} = 4T + 3T + 3T + 3T = 13T
Hardware Bus Waveform Engine

Intel 8085 Bus Timing Diagram Simulator

Switch between machine cycles and scrub clock states (T1–T4) to inspect synchronized signal transitions on CLK, ALE, Address/Data, and Read/Write strobes.

Current Cycle: Opcode Fetch Cycle (4 T-States)Status: IO/M'=0, S1=1, S0=1
T1T2T3T4CLKALEA15 - A8Higher Address (Valid throughout)AD7 - AD0AddrOpcode ByteRD'IO/M', S1, S0Status stable across cycle
Inspect State:
Silicon Activity in State T1:Clock State 1 of 4

T1: MPU sends out PC high byte on A15-A8 and PC low byte on AD7-AD0. ALE goes HIGH to latch AD7-AD0 into external 74LS373. IO/M'=0, S1=1, S0=1.

Try it
Cycle Count Analysis: How many machine cycles and total T-states are required to execute the instruction MOV M, A?

Sources

  1. 1.Intel 8085 Microprocessor Datasheet · reference · Intel (opens in a new tab)

Was this chapter useful?

Editors read every answer.

Star this chapter

Each star goes once to every reader who improved this chapter.

Finished reading?

Mark it to keep your place in the course.