pps.html   [plain text]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<meta name="generator" content="HTML Tidy, see www.w3.org">
		<title>Pulse-per-second (PPS) Signal Interfacing</title>
		<link href="scripts/style.css" type="text/css" rel="stylesheet">

		<h3>Pulse-per-second (PPS) Signal Interfacing</h3>
		<img src="pic/alice32.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
		<p>Alice is trying to find the PPS signal connector.</p>
		<p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">22:01</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="308">Wednesday, January 02, 2008</csobj></p>
		<br clear="left">
		<h4>Related Links</h4>
		<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
		<h4>Table of Contents</h4>
			<li class="inline"><a href="#intro">Introduction</a></li>
			<li class="inline"><a href="#gadget">Gadget Box</a></li>
			<li class="inline"><a href="#opsys">Operating System Support</a></li>
			<li class="inline"><a href="#use">Using the Pulse-per-Second (PPS) Signal</a></li>
		<h4 id="intro">Introduction</h4>
			<p>Most radio clocks are connected using a serial port operating at speeds of 9600 bps. The accuracy using typical timecode formats, where the on-time epoch is indicated by a designated ASCII character like carriage-return <tt>&lt;cr&gt;</tt>, is normally limited to a hundred microseconds. Using carefuly crafted averaging techniques, the NTP&nbsp;algorithms can whittle this down to a few tens of microseconds. However, some radios produce a PPS signal which can be used to improve the accuracy to few microseconds. This page describes the hardware and software necessar for NTP to use the PPS signal.</p>
			<div align="center">
		<img src="pic/gadget.jpg" alt="gif"><br>
		A Gadget Box built by Chuck Hanavin
			<h4 id="gadget">Gadget Box</h4>
			<p>The PPS signal can be connected in either of two ways: via the DCD data carrier detect pin of a serial port or via the ACK&nbsp;acknowledge pin of a parallel port, depending on the hardware and operating system. Note that NTP no longer supports connection via the RD&nbsp;data pin of a serial port.</p>
			<p>However, the PPS signal levels are usually incompatible with serial port levels. The gadget box consists of a handful of electronic components assembled in a small aluminum box. It includes level converters and a optional modem designed to decode the radio timecode signals transmitted by Canadian time and frequency station CHU. This can be used with the <a href="drivers/driver7.html">Radio CHU Audio Demodulator/Decoder</a>. A complete set of schematics, PCB artwork and drill templates can be obrtained via the web at <a href="ftp://ftp.udel.edu/pub/ntp/hardware/gadget.tar.Z">gadget.tar.Z</a>.</p>
			<h4 id="opsys">Operating System Support</h4>
			<p>Both the serial and parallel port connection require operating system support, which is available in only a few operating systems, including FreeBSD, Linux (with PPSkit patch) and Solaris. Support on an experimental basis is available for several other systems, including SunOS and HP/Compaq/Digital Tru64. The kernel interface described on the <a href="kernpps.html">PPSAPI Interface for Precision Time Signals</a> page is the only interface currently supported. Older PPS interfaces based on the <tt>ppsclock</tt> and <tt>tty_clk</tt> streams modules are no longer supported.</p>
			<h4>PPS Driver</h4>
			<p>PPS support requires the PPS driver (described on the <a href="drivers/driver22.html">Type 22 PPS Clock Discipline</a> page. The driver operates in conjunction with a prefer peer, as described in the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The prefer peer is ordinarily the radio clock that provides the PPS signal, but in principle another radio clock or remote Internet server could be designated prerred. A source is desgnated prefer using the <tt>prefer</tt> keyword, as described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> keyword</a> page. Only one source can be designated preferred. PPS signals are processed by the PPS&nbsp;driver and other clock drivers which might be involved need not know or care about PPS&nbsp;capability. Note that the <tt>pps</tt> configuration command has been obsoleted by this driver.</p>
			<h4 id="pps">Using the Pulse-per-Second (PPS) Signal</h4>
			<p>The PPS signal  can be used in two ways, one using the NTP grooming and mitigations algorithms and the other using PPS signal support in the kernel, as described in the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page. In either case, the PPS&nbsp;signal must be present and within nominal jitter and wander tolerances. In addition, the PPS&nbsp;driver and prefer peer must survive the sanity checks and intersection algorithms. Finally, the offset of the system clock relative to the prefer peer must be less than 128 ms, or well within the 0.5-s unambiguous range. The PPS peer remains active as long as these conditions are met.</p>
			<p>The presence of PPS&nbsp;kernel support is automatically detected during the NTP configuration process and supporting code automatically compiled. When kernel PPS&nbsp;support is enabled, the PPS driver can direct the signal directly to the kernel. Note that the PPS driver does not normally enable the PPS kernel, since performance is generally better with older systems. However, the kernel can be enabled by a driver fudge flag if necessary. This is advised for newer machines in the Pentium class.</p>
			<p>The kernel maintains a watchdog timer for the PPS signal; if the signal has not been heard or is out of tolerance for more than some interval, currently two minutes, the kernel discipline is disabled and operation continues as if it were not present.  </p>
			<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>