Skip to main content

Machine cycle, T-states, ANI 55H timing

Short answer

A machine cycle is the time for one memory or I/O operation (3–6 T-states); a T-state is one clock period. ANI 55H requires opcode fetch (4T) and memory read (3T) = 7 T-states. At 2 MHz, T = 0.5 µs, so execution time = 3.5 µs.

What do you mean by Machine cycle and T-states? Draw a bus timing diagram for an instruction ANI 55H of 8085 microprocessor. Calculate the time required to execute such instruction, if microprocessor is operating at 2 MHz clock frequency.

Machine cycle

A machine cycle is the time needed to complete one basic memory or I/O operation: opcode fetch, memory read, memory write, I/O read or I/O write. It consists of 3 to 6 T-states.

T-state

A T-state is one clock period of the processor clock; it is the smallest unit of time (T = 1 / f). An instruction cycle is made of several machine cycles, and each machine cycle of several T-states.

Timing diagram of ANI 55H

ANI 55H (opcode E6H, data 55H) is a 2-byte instruction: M1 opcode fetch (4T) and M2 memory read (3T) = 7 T-states. Assume it is stored at 2000H.

M-cycleTA15-A8AD7-AD0ALEControlIO/M S1 S0
M1 (opcode fetch, 4T)T120H00H (PCL)1-0 1 1
T220HHi-Z (bus floats)0RD low0 1 1
T320HE6H (opcode in)0RD low, rises at end0 1 1
T4--0none (decode)0 1 1
M2 (memory read, 3T)T120H01H1-0 1 0
T220HHi-Z (bus floats)0RD low0 1 0
T320H55H (data in)0RD low, rises at end0 1 0
      |  M1 (OF)  | M2 (MR) |
      |T1 T2 T3 T4|T1 T2 T3 |
 ALE  |HI lo lo lo|HI lo lo |
 RD   |hi LO LO hi|hi LO LO |
 WR   |hi hi hi hi|hi hi hi |

M1 reads E6H from 2000H, M2 reads 55H from 2001H. The AND operation is done after the data byte is received.

Execution time

Clock frequency f = 2 MHz, so T = 1 / 2 MHz = 0.5 microsecond.

Time = 7 x 0.5 microsecond = 3.5 microseconds.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Microprocessor chapter 2 questions →