Question: Suppose you have a time-critical process that must be updated on a precise interval. Your colleage writes this code in the main loop of the

Suppose you have a time-critical process that must be updated on a precise interval. Your colleage writes this code in the main loop of the microprocessor and makes some adjustments so that it operates properly. Then you add some additional code to the main loop and the process fails because of timing problems. What is the likely cause?

Most microprocessors have access to a timer interrupt service routine (ISR) that immediately executes its section of code whenever the timer expires, interrupting any other ongoing processes. Suppose you set up one of these timers to execute every 2 seconds. You have some code that reads a pushbutton. Should this code go in the 2-second timer? Explain.

Step by Step Solution

3.38 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The likely cause of the timing problem is the addition of code to the main loop that introduces dela... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!