Top Banner
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 are 1.Opcode fetch cycle (4T) 2.Memory read cycle (3 T) 3.Memory write cycle (3 T) 4.I/O read cycle (3 T) 5.I/O write cycle (3 T) Tressa Michael
14

Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

May 14, 2018

Download

Documents

ngolien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

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 are

1.Opcode fetch cycle (4T) 2.Memory read cycle (3 T)

3.Memory write cycle (3 T)

4.I/O read cycle (3 T)

5.I/O write cycle (3 T)

Tressa Michael

Page 2: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

Tressa Michael

Page 3: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

Opcode Fetch Machine Cycle

• The first step of executing any instruction is the Opcode fetch cycle.

– In this cycle, the microprocessor brings in the instruction’s Opcode from memory.

• To differentiate this machine cycle from the very similar “memory read” cycle, the control & status signals are set as follows:

– IO/M=0, s0 and s1 are both 1.

– This machine cycle has four T-states.

• The 8085 uses the first 3 T-states to fetch the opcode.

• T4 is used to decode and execute it.

– It is also possible for an instruction to have 6 T-states in an opcode fetch machine cycle.

Tressa Michael

Page 4: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

Memory Read Machine Cycle

• The memory read machine cycle is exactly

the same as the opcode fetch except:

– It only has 3 T-states

– The s0 signal is set to 0 instead.

Tressa Michael

Page 5: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

The Memory Read Machine Cycle

– To understand the memory read machine cycle, let’s

study the execution of the following instruction:

• MVI A, 32

– In memory, this instruction looks like:

• The first byte 3EH represents the opcode for loading

a byte into the accumulator (MVI A), the second byte

is the data to be loaded.

– The 8085 needs to read these two bytes from memory

before it can execute the instruction. Therefore, it will

need at least two machine cycles.

– The first machine cycle is the opcode fetch

discussed earlier.

– The second machine cycle is the Memory Read

Cycle.

2000H

2001H

3E

32

Tressa Michael

Page 6: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

The Memory Read Machine Cycle

– To understand the memory read machine cycle, let’s

study the execution of the following instruction:

• MVI A, 32

– In memory, this instruction looks like:

• The first byte 3EH represents the opcode for loading

a byte into the accumulator (MVI A), the second byte

is the data to be loaded.

– The 8085 needs to read these two bytes from memory

before it can execute the instruction. Therefore, it will

need at least two machine cycles.

– The first machine cycle is the opcode fetch

discussed earlier.

– The second machine cycle is the Memory Read

Cycle.

2000H

2001H

3E

32

Tressa Michael

Page 7: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

The Memory Write Operation

• In a memory write operation: – The 8085 places the address on the address bus

– Identifies the operation as a ‘memory write’ (IO/M=0, s1=0, s0=1).

– Places the contents of the accumulator on the data bus and asserts the signal WR.

– During the last T-state, the contents of the data bus are saved into the memory location.

Tressa Michael

Page 8: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

MVI B, data

Tressa Michael

Page 9: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

8085 timing diagram for Opcode fetch cycle for MOV C, A .

8085 timing diagram for Opcode fetch cycle for MOV C, A .

Tressa Michael

Page 10: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

INR M

Tressa Michael

Page 11: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

ADD M

Tressa Michael

Page 12: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

STA addr

Tressa Michael

Page 13: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

IN Byte

Tressa Michael

Page 14: Timing Diagram is a graphical representation. It ...libvolume3.xyz/.../8085machinecyclesandbustimingspresentation1.pdfTiming Diagram is a graphical representation. It represents the

Tressa Michael