180 likes | 548 Views
Fetch Execute Cycle – loop. Fetch Execute Cycle . Start PC = 20 MOVLW to I.R. MOVLW to Decode and Control. 2 0. MOVLW. MOVLW. Fetch Execute Cycle . 2 PC = PC + 1 = 21 O3 to I.R. 03 to W register. 21. 03. MOVLW. 03. Fetch Execute Cycle . 3 PC = PC + 1 = 22 MOVWF to I.R.
E N D
Fetch Execute Cycle Start PC = 20 MOVLW to I.R. MOVLW to Decode and Control 20 MOVLW MOVLW
Fetch Execute Cycle 2 PC = PC + 1 = 21 O3 to I.R. 03 to W register 21 03 MOVLW 03
Fetch Execute Cycle 3 PC = PC + 1 = 22 MOVWF to I.R. MOVWF to Instruction Decode and Control 22 MOVWF MOVWF 03
Fetch Execute Cycle 4 PC = PC + 1 = 23 70 to I.R. 70 to ADDR MUX 03 from W register to Address 70 23 70 70 03 MOVWF 03
Fetch Execute Cycle 5 PC = PC + 1 = 24 DECFSZ to I.R. DECFSZ to Instruction Decode and Control 24 DECFSZ 03 DECFSZ 03
Fetch Execute Cycle 6 PC = PC + 1 = 25 70 to I.R. 70 to ADDR MUX 1 subtracted from contents of 70 Check to see if answer is Zero – NOT ZERO 25 70 70 02 DECFSZ 03
Fetch Execute Cycle 7 PC = 27 GOTO to I.R. GOTO to Instruction Decode and Control 27 70 GOTO 02 GOTO 03
Fetch Execute Cycle 7 PC = PC +1 = 28 24 to I.R. 28 24 02 GOTO 03
Fetch Execute Cycle 8 PC = 24 DECFSZ to I.R. DECFSZ to Instruction Decode and Control 24 DECFSZ 02 DECFSZ 03
Fetch Execute Cycle 9 PC = PC + 1 = 25 70 to I.R. 70 to ADDR MUX 1 subtracted from contents of 70 Check to see if answer is Zero – NOT ZERO 25 70 70 01 DECFSZ 03
Fetch Execute Cycle 10 PC = 27 GOTO to I.R. GOTO to Instruction Decode and Control 27 GOTO 01 GOTO 03
Fetch Execute Cycle 11 PC = PC +1 = 28 24 to I.R. 28 24 01 GOTO 03
Fetch Execute Cycle 12 PC = 24 DECFSZ to I.R. DECFSZ to Instruction Decode and Control 24 DECFSZ 01 DECFSZ 03
Fetch Execute Cycle 13 PC = PC + 1 = 25 70 to I.R. 70 to ADDR MUX 1 subtracted from contents of 70 Check to see if answer is Zero – Answer ZERO 25 70 70 00 DECFSZ 03
Fetch Execute Cycle 14 PC = PC + 1 = 26 SLEEP to I.R. SLEEP to Instruction Decode and Control Program halts 26 SLEEP 00 SLEEP 03