摘要 |
<p>PURPOSE:To reduce the time counting error by interrupting through a timer means, and ending a time counting request at a specified interruption time. CONSTITUTION:When a time counting request is generated with the time width Tr later than the periodical interruption timing by a time lag T1, a CPU 3 divides the sum of the T1 and the Tr by a timing cycle T to obtain the necessary interruption frequency (n) and a corrected time T2 and then sets the division value l to a timer means 2 in response to the T2 when the n-th interruption is processed. Then the means 2 performs the (n + 1)-th interruption in the timing of the T2 and ends the time counting request at the (n + 1)-th interruption time. In other words, the value l is set to the means 2 in response to the T2 and the (n + 1)-th interruption cycle is changed. So that the error produced between a normal interruption cycle the time measuring request end time. Thus the Tr produced at an optional time can be measured with the clock cycle accuracy regardless of a periodical interruption interval T.</p> |