[LinuxPPS] (OT) A question about DCD.

Cirilo Bernardo cirilo.bernardo at gmail.com
Wed Jan 28 04:44:47 CET 2009


On 1/28/09, clemens at dwf.com <clemens at dwf.com> wrote:
> This is somewhat off topic.
>  I have one machine, well two that linuxPPS and NTP run on just fine.
>  However, on my 'main-machine' I have problems.
>
>  Back at the end of the summer I noted that I no longer had the PPS signal
>  on the DCD line.  Neither ppstest nor ntpd reported a signal.
>  I have two active GPS receivers, so I could trade them.  Same problem,
>  and the 1st worked just fine on the 2nd machine.
>
>  OK, so its the machine, not the GPS receiver nor the cables.
>
>  After some thought and no obvious conclusions, I did the simple thing
>  and bought a 4port tty card and plugged it into the machine.
>
>  I plugged the GPS card into it, and everything worked again, so
>  it SEEMED that it had to be the actual tty port that was bad.
>
>  But given a month, that stopped working too.
>  I tried a 2nd port on the 4port card, and it worked for a while,
>  then stopped.  Mumph.
>
>  Since then, at one time or another, I have played with the problem,
>  and the port has worked for a short period of time, but then stopped.
>
>  I have NOT pulled out a scope to see the height of the PPS signal, but the
>  fact that it works effortlessly on the 2nd, or 3rd machine makes me think
>  that that experiment isnt work the effort.
>
>  So, what could be going wrong?
>  I can think of no way that the software (linuxPPS) could stop working,
>  but neither can I come up with a reason why both the onboard and a 4port
>  tty card should both stop working.  (this is an Oncore card, so there is
>  plenty of tty chatter in addition to the PPS, so one cant just look
>  at interrupts...)
>
>  On occasion it seemed that moving from one port to another of the 4port
>  card was enough to get things working again,- just doesnt make any sense.
>
>  So, any hardware (or kernel) gurus out there that can make any sense of
>  this???
>  --

You may have a problem with the voltage levels on your interfaces.  If
you are using +/-12VDC on your DCD pin and the serial port circuitry
is meant to use 0to+5VDC, you may be damaging your circuitry.  The
damage will not necessarily be instant (the first time you plug in the
GPS + interface) because the pulse durations may be short, the maximum
current is limited (as per electrical standards of RS232C), and there
may be some internal protection circuitry which survives the abuse for
a few hours/days/weeks.

To check on the voltage issues:
1. read the datasheet for the specific UART you are using
2. check the voltage on the serial port's TxD pin after opening the
serial port via minicom; for an interface which is truly RS232C
compliant, you should have about -12VDC
3. instruct the serial port to set the output on the DTR pin to the
high value.  check the voltages at 'low' and 'high' to see what the
UART is using.  Unfortunately everyone claims that circuitry is to
RS232C spec (which is an electrical specification) but MANY are lying.
I've seen the following:

+/-12V (on spec)
0v,+5V (bad)
+/-5V (bad, but within signal tolerance of spec)
0v,+3.3V (bad)

For example, the laptop I am typing on at the moment uses +/-5V.  The
input in this case is claimed to be protected to about 12V (ideally it
should be protected to at least 18V - no one bothers to read the
electrical specification anymore!) so I can use it to receive from a
device which *does* follow the RS232C.  I can also use it to transmit
to a device which follows RS232C; I think the minimum voltage swing
specified is +/-3V (but don't quote me - I haven't read the spec
recently).


- Cirilo



More information about the LinuxPPS mailing list