基于晶振频率补偿的高精度数字时钟设计

2014-10-17 18:15:02李二鹏文开章王煜
现代电子技术 2014年19期

李二鹏 文开章 王煜

摘 要: 为解决普通晶振频率长期漂移量较大的问题,提出了一种用GPS秒脉冲对晶振脉冲在线自动测量及修正,从而产生本地高精度时钟的方法,据此设计了一种基于单片机和CPLD的智能自校准数字时钟系统。介绍了时钟产生及校准模块、鉴相及相差测量模块等硬件电路组成和数据采集、晶振误差补偿算法实现等软件设计。该系统在需要较高精度时间显示的场所具有实际应用价值。

关键词: GPS; 晶振时钟; 回归分析; CPLD

中图分类号: TN78?34; TP202 文献标识码: A 文章编号: 1004?373X(2014)19?0102?03

Design of high precision digital clock based on crystal oscillator compensation

LI Er?peng, WEN Kai?zhang, WANG Yu

(Northwest Institute of Nuclear Technology, Xian 710024, China)

Abstract: To resolve the long term existing problem of long drift distance of crystal oscillator frequency, a method of producing local high?accuracy clock by automatically detecting and correcting the crystal oscillator pulse by means of GPS second pulse on line is put forward. According to this means, a CPLD and MCU based digital clock system with intelligent auto?calibration was designed. The composition of the hardware circuits of clock production and emendation module, and phase discrimination and phase difference measurement module, as well as design realization of the software for data acquisition and the crystal oscillator error compensation are introduced. The system has the actual application value in the site of needing high?accuracy time display.

Keywords: GPS; crystal oscillator clock; regression analysis; CPLD

0 引 言

随着电子技术的飞速发展,国内外已大量地把FPGA/CPLD器件、微处理器、GPS定时校频等技术应用于高精度时钟的研究与设计[1?2]。一个时钟的准确与否主要取决产生秒脉冲的频率源准确度。高稳晶振和铷原子频标等设备产生的秒脉冲具有很高的频率准确度,但其造价昂贵;普通晶振的准确度虽然只有10-5左右,但因其累积误差具有良好的一致性[3],通过定时校频设备(长、短波接收机和GPS接收机)对其进行比对校准后,准确度会得到显著提高[4?5]。GPS高精度授时技术因其技术指标较高和造价较低被广泛应用。本文以GPS秒脉冲作为标准频率源,对晶振产生的秒脉冲进行比对测量,采用回归分析法对晶振累积误差数据进行数理统计[6],并对其秒脉冲在线自动修正,设计了一种易于实现、成本低廉且具有自校准功能的数字时钟系统。

1 数字时钟组成原理

基于频率补偿的高精度数字时钟由GPS定时接收机、普通晶振、鉴相及相差测量电路、时钟产生及校准电路、单片机数据算法处理模块等组成。……

登录APP查看全文