摘要 |
<p>PURPOSE:To realize the adjustment of the repeating frequency by initializing a loop counter to measure the number of rounds of the loop within a set time and rounding the loop in the frequency accordant with the waiting time of hardware. CONSTITUTION:A loop counter is initialized at 0 and and set so that a clock signal is interrupted after one millisecond, i.e., at a set time point. Then a count-up action is repeated while the count value is increased one by one. Meanwhile an interruption is applied by the timer after one millisecond and the count number of the software loop obtained within one millisecond, i.e., the number of round of the loop is measured by the software itself. In such a way, the waiting time timing can be set in response to the speed change of the software of a CPU, etc.</p> |