Quote:
|
Originally Posted by Obi
I don't exactly see the advantage of using interrupts over counting cycles. Care to elaborate?
|
Program cycles will vary as you add and remove code.
The cycles are also variable in general because of other events like interrupts that may be going on asynchronously. So one loop might take 50 clock ticks while the next takes 150 ticks. Over time you can accumulate large variations.
The clock approach always puts you within a few clock ticks of where you expect to be, and errors don't accumulate over time.