Abstract:
In this paper, the time constant of the embedded system timing calculation formula are analyzed, it is found that there are three factors of inaccurate timing timer. By selecting the STC15F2K60S2 controller can solve the third factor, the synchronous clock system design by the clock source and the calibrated clock can avoid the influence of the second factor. Based on the introduction of synchronous correction, the algorithm of the time is deduced. The necessity of the pulse delay, the freezing operation delay and the time constant of the correction are analyzed. Through the experiment verified the correctness of timing algorithm, realized the synchronization and timing error of 3 minutes within 10 microseconds, and achieved the purpose of the research.