Timing Diagram PDF
Timing Diagram PDF
Timing Diagram is a graphical representation. It represents the execution time taken by each instruction in
a graphical format. The execution time is represented in T-states.
Instruction Cycle: The time required to execute an instruction is called instruction cycle.
Machine Cycle: The time required to access the memory or input/output devices is called machine cycle.
T-State:
• The machine cycle and instruction cycle takes multiple clock periods.
• A portion of an operation carried out in one system clock period is called as T-state.
A
D B
The memory read machine cycle is executed by the processor to read a data byte from memory.
The processor takes 3T states to execute this cycle.
The instructions which have more than one byte word size will use the machine cycle after the
opcode fetch machine cycle. Otherwise for 1B instructions the number of machine cycles will be
equals to the number instruction byte because these instructions do not involve memory for
operand fetching only opcode fetch cycle takes place.
Ex: ADD R, CMP R, INR R, MOV A, B and so on all are 1B instructions and do not involve any
memory access for operand fetch since R (register) is the part of processor and no need to
access memory for operand reading.
3. MEMORY WRITE CYCLE (3T)
T1 State:
During this state ALE goes high and 16-bit address is available on address and
multiplexed AD bus so that memory location is selected.
T2 State:
During this state signal goes low and the content is placed on D0-D7 bus for data
writing on selected memory.
T3 State:
The data loaded on previous state is transferred to the memory and at the middle of this
state signal goes high and disables the memory. The data is then decoded and ready
for execution.
The memory write machine cycle is executed by the processor to write a data byte in a memory
location.
The processor takes, 3T states to execute memory write machine cycle.
00H
2500 25H
The I/O Read cycle is executed by the processor to read a data byte from I/O port or from the
peripheral.
The processor takes 3T states to execute this machine cycle.
The IN instruction uses this machine cycle during the execution.
IN PORT#: The current 8-bit content of the PORT# will be made available on to the Accumulator. Let us
suppose with the PORT#, 8 DIP switches are connected. And their states are ON-ON-OFF-ON-ON-ON-
OFF-ON. So after execution of the instruction IN PORT#, the Accumulator content will be 1101 1101.
5. I/O WRITE CYCLE (3T)
The I/O write machine cycle is executed by the processor to write a data byte in the I/O port or
to a peripheral, which is I/O, mapped in the system.
The processor takes 3T states to execute this machine cycle.
The OUT instruction uses this machine cycle during the execution.
OUT PORT#: The current 8-bit content of the Accumulator will be copied on to the PORT#. Let us
suppose that Accumulator’s initial content is 0101 0101. And with the 8-bit port 8 LEDs are connected.
So after execution of the instruction OUT PORT#, LEDs will have the OF-OFF states as shown below –