On Wed, Oct 26, 2011 at 09:32, Dave Hart <h...@ntp.org> wrote: > On Wed, Oct 26, 2011 at 04:07, Doug Calvert > <dfc-l...@douglasfcalvert.net> wrote: >> Hello, >> >> Why do the nmea and pps drivers differ regarding the default for flag2? How >> would a user know which is appropriate? >> >>> PPS(22): >>> flag2 0 | 1 >>> Specifies PPS capture on the rising (assert) pulse edge if 0; falling >>> (clear) >>> edge if 1. (default), 1 for clear. >> >>> NMEA(20): >>> flag2 0 | 1 >>> If PPS signal processing is enabled, capture the pulse on the rising edge >>> if 0 >>> (default); capture on the falling edge if 1. > > This appears to be a documentation error in driver22.html -- from > looking at the code, it appears to me both drivers default to flag2 0. > This is just speculation, but it may be an older implementation of > the PPS driver defaulted to using the clear edge, or that may have > been a documented intention never realized in code. > > As to knowing which one is appropriate, it depends on the polarity of > your PPS signal. With the GPS 18x LVC's PPS output wired to the DCD > pin, capturing the assert edge is correct in my experience. The pulse > defaults to 100 msec long, so if the wrong edge were selected, the 100 > msec error would be relatively obvious. Also note the GPS 18x LVC, > like some other inexpensive GPS sensors provides nonstandard RS-232 > signalling. Standard 232 uses +/- 12V signals, which supports long > cables. The 18x LVC's 232 output is so-called TTL-level 232, using 0V > and 3-5V rather than -/+ 12V respectively. If you're a stickler for > standards, or find your system's serial port is, you might use a > "gadget box" to convert from TTL to proper 232 voltages. If that > gadget box inverts the DCD signal in the process, it's handy to be > able to select the "clear" edge as the on-time event.
To follow up, this was a documentation error, the default for the PPS driver's flag2 was in fact 0, and the documentation has been corrected, as this excerpt of http://www.eecis.udel.edu/~mills/ntp/html/drivers/driver22.html shows: flag2 0 | 1 Specifies PPS capture on the rising (assert) pulse edge if 0 (default) or falling (clear) pulse edge if 1. ntp-dev also has this updated html/drivers/driver22.html. Thanks for raising the issue. Cheers, Dave Hart _______________________________________________ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions