摘要
讲述了时钟同步协议的原理,分析了影响同步精度的因素。首先借鉴广泛使用的IEEE1588同步协议结并合分布式数据采集系统的结构特点,利用微控制器的内置计数器实现了对数据通信协议包的收发时刻的准确计时,实现了高精度的硬件时间打戳,使时钟的同步精度达到了1μs。在此基础上又进一步将跟随的从设备的时钟源由传统的固定频率的晶体改成可以进行精细时钟频率调节的压控振荡器(VCXO),保持了分布式时钟在频率上的一致性,减小了时钟的漂移,从而实现了更高精度的时钟同步。实验表明在24MHz时钟频率情况下,通过此方法可使系统的同步精度达到10ns量级,远高于常用软件时钟同步方法能达到的微秒量级精度。
In this paper, the principle of the synchronous protocol of the IEEE1588 is analyzed, and the factors that affect the accuracy of synchronization is summarized. Through the hardware timer in a microcontroller, we give the exactly the time when a package is sent or received. So synchronization of the distributed clocks can reach 1 μs in this way. Another method to improve precision of the synchronization is to replace the traditional fixed frequency crystal of the slave device, which needs to follow up the master clock, by an adjustable VCXO. So it is possible to fine tune the frequency of the distributed clocks, and reduce the drift of clock, which shows great benefit for the clock synchronization. A test measurement shows the synchronization of distribute clocks can be better than 10 ns using this method, which is more accurate than the method realized by software.
出处
《核技术》
CAS
CSCD
北大核心
2011年第3期232-236,共5页
Nuclear Techniques
基金
国家科技重大专项(2008ZX05008-005-004)资助