Question

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

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

0 0
Add a comment Improve this question Transcribed image text
Answer #1

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.

Add a comment
Know the answer?
Add Answer to:
Find the time delay for the delay subroutine shown below if the system has an AVR...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Find the time delay for the delay subroutine shown below if the system has an ARM with a core clo...

    Using Assembly language Find the time delay for the delay subroutine shown below if the system has an ARM with a core clock frequency of 80 MHz: MOV R8, #200 BACK LDR R1, 400000000 HERE NOP SUBS BNE SUBS BNE R1,R1, #1 HERE R8,R8, #1 BACK Find the time delay for the delay subroutine shown below if the system has an ARM with a core clock frequency of 80 MHz: MOV R8, #200 BACK LDR R1, 400000000 HERE NOP SUBS...

  • Computer Engineering 33. Find the time delay for the delay subroutine shown to HERE the right,...

    Computer Engineering 33. Find the time delay for the delay subroutine shown to HERE the right, if the system has an 8051 with frequency of 16 MHz. MOV R3 , #200 NOP NOP NOP DJNZ R3, HERE RET 2 34. Find the time delay for the | DELAY: MOV MOV R2 , #200 MOV R3 , #250 NOP NOP DJNZ R3, HERE DJNZ R2, AGAIN DJNZ R5, BACK RET R5, #100 2 delay subroutine shown to BACK: the right, if...

  • This Test: 45 pts pos Find the indicated z-scores shown in the graph Click to view.page...

    This Test: 45 pts pos Find the indicated z-scores shown in the graph Click to view.page 1 of the Standard Normal Table The z-scores are Use a comma to separate answers as needed Round to two decimal places as needed ) Find the indicated probability using the standard normal distribution. P(z > 2.02) Click here to view page 1 of the standard normal table, Click here to view page 2 of the standard normal table P(Z> 2.02)(Round to four decimal...

  • i need help with a mips program to to covert roman numerals to real numbers Lab 4: Roman Numeral Conversion Part A: Due...

    i need help with a mips program to to covert roman numerals to real numbers Lab 4: Roman Numeral Conversion Part A: Due Sunday, 19 May 2019, 11:59 PM Due Friday, 24 May 2019, 11:59 PM Part B: Minimum Submission Requirements Ensure that your Lab4 folder contains the following files (note the capitalization convention): o Diagram.pdf o Lab4. asm O README.txt Commit and push your repository Lab Objective In this lab, you will develop a more detailed understanding of how...

  • This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation...

    This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT