RET instruction needs 3 machine cycles. One to fetch and decode the instruction(4 T states), and two more machine cycles(i.e. 2*3=6 T states) to read two bytes from the stack(stack is exterior to microprocessor, stack is in R/W memory, so to exchange data with stack needs machine cycles). Thus, RET instruction needs total 3 machine cycles and 10 T-states.
when conditional jump instruction is executed it has 10 m/c cycles bt when nt executed it has 7 m/c cycles....while unconditional jump instruction has 10 m/c cycles...
Depending on the particular microprocessor, a machine cycle is the fetch or store of one (typically, one byte) native word. In the 8085, this is a byte fetch or store, plus the overhead in decoding and processing the instruction. In this case, the first machine cycle is four clock cycles, or T states, and subsequent machine cycles are three clock cycles, although certain instruction sequences, such as DAD, require two extra clock cycles.
The NOP instruction is a no-operation instruction. It does nothing to the state of the machine, except to use some time. In the case of the 8085, it uses four clock cycles plus however many wait states are need to access the NOP instruction from memory.
an instruction cycle may consist of a number of machine cycles.
1 machine cycle for opcode fetch 2nd n 3rd are idle machine cycles as microprocessor is 8 bit therefore it cant perform 16 bit additon in one cycle !!
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.MACHINE CYCLES OF 8085:The 8085 microprocessor has 5 (seven) basic machine cycles. They areOpcode fetch cycle (4T)Memory read cycle (3 T)Memory write cycle (3 T)I/O read cycle (3 T)I/O write cycle (3 T)Each instruction of the 8085 processor consists of one to five machine cycles, i.e., when the 8085 processor executes an instruction, it will execute some of the machine cycles in a specific order.The processor takes a definite time to execute the machine cycles. The time taken by the processor to execute a machine cycle is expressed in T-states.One T-state is equal to the time period of the internal clock signal of the processor.The T-state starts at the falling edge of a clock.
There are binary patterns which when present on a microprocessor's input register, cause a fixed set of switching to occur within the processor, across a defined number of clock cycles. They comprise the instructions which cause the microprocessor to do things.
For calculating the T states of the any instruction ,you should know how many machine cycles does the instruction contains and the number of T states in each of the machine cyclesfor example,In a 8085 microprocessor set ,the instr. JMP contains three machine cyclesopcode fetch which is of 4T or 6T statesmemory read which is of 3T statesanother memory read which is again of 3T statesTherefore , the instr. JMP has a total of 10T states
Summary − So this instruction XCHG requires 1-Byte, 4-Machine Cycles (Opcode Fetch) and 4 T-States for execution as shown in the timing diagram.
The 8085 instruction MOV M,A requires two machine cycles and 7 T states. Cycle one is 3 T states for opcode fetch, plus 1 T state for opcode decode. Cycle two is 3 T state for operand store. These numbers do not include WAIT states. WAIT states are interposed between T2 and T3 of any memory access cycle, and the total number of WAIT states depends on the READY line.
There are no instructions in the 8085 that execute in only one clock pulse. The minimum number of clock cycles is four; three for instruction fetch and one for instruction decode/execute.
4. 3 to fetch, and 1 to decode/process.