Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Find the time delay for the delay subroutine shown below if the system has an AV

ID: 3607222 • Letter: F

Question

Find the time delay for the delay subroutine shown below if the system has an AVR with a frequency of 10MHz:

If answer is not integer, represent it truncating to 3 digits after the decimal point. Do not use comma separator in big numbers.

LDI R16, 150

BACK:LDI R17, 100

HERE:NOP

DEC R17

BRNE HERE

NOP

NOP

DEC R16

BRNE BACK

Incorrect
The correct answer is: 60750
Mark 0.00 out of 1.00

Correct
The correct answer is: 0.100
Mark 1.00 out of 1.00

Incorrect
The correct answer is: 100
Mark 0.00 out of 1.00

ns

Incorrect
The correct answer is: 6075
Mark 0.00 out of 1.00

Incorrect
The correct answer is: 6.075
Mark 0.00 out of 1.00

ms


Can you saw me how to do this please? Assembly Language

Explanation / Answer

1.                            LDI R16, 150      1 cycle

2.            BACK:    LDI R17, 100      1 cycle

3.            HERE:    NOP                       1 cycle

4.                            DEC R17               1 cycle

5.                            BRNE HERE          2 cycles

6.                            NOP                       1 cycle

7.                            NOP                       1 cycle

8.                            DEC R16               1 cycle

9.                            BRNE BACK         2 cycles

1. Inner loop: The statement from 3-5 executes 100 times which is (1+1+2) 4 * 100 = 400 cycles

Outer loop: statement 2, 3-5, 6, 7, 8, 9 executes 150 times which is 400 + 1+ 1+ 1+ 2 = 405 * 150 = 60750 machine cycles

2.

Given that frequency is 10 Mhz, Time period for each machine cycle is 1 / (10 * 106) = 0.1 micro second, Time period for 60750 cycles is 60750 * 0.1 micro seconds = 6075 micro seconds = 6.075 milli seconds

Please Rate it if you find the answer is helpful….Thanks…:)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote