On Wed, Oct 26, 2011 at 04:07, Doug Calvert <[email protected]> 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. Cheers, Dave Hart _______________________________________________ questions mailing list [email protected] http://lists.ntp.org/listinfo/questions
