Quote:
Originally Posted by Chris_Elston
The timing of this thread is impeccable.
|
Haha... Ether must be an ISR.
Why cant you just thread?:
If you had a timed task that took as long as in scenario 1, you may want to consider making it into a separate thread (using the Task class in C++ or similar). If any task doesn't require much communication with the main control loop, you could put it in a separate Task.
Now, thoughts on Scenario 1:
If you offload these timed actions into ISRs, they would take up as much (or more) CPU time as if they were running in the main process. The main disadvantage to this is if it happens inside a time-critical operation (like sending data to the host), it could cause problems.
Scenario 2:
If the team in question had code that could respond within 1ms, ISRs are a good choice. A hardwired solution would be very difficult to make, debug, and change, compared to an ISR.