This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C delay routine

I need to write a delay routine in C for a 80C251 . The delay has got to be about 30 seconds . Any ideas welcomed.

Parents
  • you really shouldn't wait 30 seconds and let your processor do nothing else than waiting. That is a no-no for embedded applications.

    Not at all true. In low power applications it is very common to sleep for long periods of time waking up on interrupt to see if there is work to do. Remember, real-time only means you meet all your deadlines. It does not imply fast.

    If you truly need to do other processing while the ISR counts down a variable then you should use a task scheduler. Polling is usually a hack in this sort of situation.

    - Mark

Reply
  • you really shouldn't wait 30 seconds and let your processor do nothing else than waiting. That is a no-no for embedded applications.

    Not at all true. In low power applications it is very common to sleep for long periods of time waking up on interrupt to see if there is work to do. Remember, real-time only means you meet all your deadlines. It does not imply fast.

    If you truly need to do other processing while the ISR counts down a variable then you should use a task scheduler. Polling is usually a hack in this sort of situation.

    - Mark

Children
No data