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

The following apply only to the report for Lab 2 In the testing and verification

ID: 2293737 • Letter: T

Question

The following apply only to the report for Lab 2 In the testing and verification section Include and complete a table similar to the one below. Use the oscilloscope to measure the delay period (not the stowatch tool). Comment on any error between the desired and the measured value for both the software and hardware-assisted delay. Identify potential sources of the error (regardless if there is any significant error) esire ay easure ay (Software easure ay (Hardware ms 0 ms 100 ms 1000 ms In the conclusion of your report: Under what circumstances might you use the software-only delay instead of the hardware-assisted delay? Conversely, when might you use the hardware-assisted delay over the software-only one? -What are the advantages and disadvantages with both types of delays -Address the limitations of cach delay: What is the smallest length of time you can delay with the two types of delays? What is the longest length of time you can delay for both types? Describe potential method(s) that could be used to increase the maximum delay period for both the software-only and the hardware-assisted delay methods

Explanation / Answer

a) ,b)

Hardware delay are timers.The advantage of using timers to realize a delay is that they provide a way to allow async counting. Using a "Software delay" you force the controller to put all its resources into processing some kind of loop (incrementing a variable until a given value) and thus blocking the rest of the code execution path.

A software delay is easier to implement and may be sufficient if its just a very short delay which is not significantly interrupting any other task in the main sequential code processing path. Furthermore, the timers may be in use for some other hardware related tasks like PWM generation and may not be "free" to be configured according to your delay requirements.

c) We have to make sure you put the software timing loop in one place like this instead of having lots of small in-line timing loops all over the place. It is hard enough to get one timing loop right.The variable "counter" should be defined as "volatile" to make sure it is actually decremented each time through the loop. Otherwise the optimizer might decide to just eliminate the entire while loop.

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