Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

timers or frequancy (stepper motors)

ianbassonianbasson Member Posts: 1
Hi programmers

I

Comments

  • LundinLundin Member Posts: 3,711
    The reason for this is called Windows.

    Windows is no real-time operative system. It cannot deliver high-precision timers. Windows timers are notorious for their poor performance. The definition of a Windows timer is one using the WM_TIMER event, and the timer in Borland Builder does this.

    There are tricks to make Windows behave better, for example you can use a high-priority thread instead of a Windows timer and get somewhat better resolution, but still, you can never count on any real-time performance.

    The serious approach is to use a real-time system instead of a PC. You can get a slow, dull little 8-bit microcontroller made in the 70s, running at 1MHz, to completely embarress the performance of a brand new dual-core-gigahertz-mumbo-jumbo processor excuting Windows at any time.
  • LobotomizerLobotomizer Member Posts: 5
    You could try using a multimedia timer. It will give you a resolution of 1 ms:

    http://www.bcbjournal.com/articles/vol4/0011/Using_timers.htm?PHPSESSID=511e1300820f644e571a8980cdf12921


Sign In or Register to comment.