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

Delays

How can one generate a precise time delay wihtout using the timers and using only the software loops.

Parents
  • I make delays (usually) by having (or sacraficing) a timer that generates a mili second interupt. Most of my programs have a mili-second timer (really a counter) in maintained software. Sometimes I create a variable and increment it in the ISR, poll it in the main loop, and clear it when it reaches the target value. This works well enough for my apps where +- 1mS (or even more) is trivial. How precise you need to be for you app?

    Andy

Reply
  • I make delays (usually) by having (or sacraficing) a timer that generates a mili second interupt. Most of my programs have a mili-second timer (really a counter) in maintained software. Sometimes I create a variable and increment it in the ISR, poll it in the main loop, and clear it when it reaches the target value. This works well enough for my apps where +- 1mS (or even more) is trivial. How precise you need to be for you app?

    Andy

Children