Re: [time-nuts] gpsd 1pps pulse?

2013-05-08 Thread Sarah White
On 5/7/2013 2:00 PM, Sarah White wrote:

If you have problems with PPS, just set the serial port to a higher baud
rate... This is the reason I recommend against using the DCD line on the
same serial port you're using for TSIP

((snip))

On 5/8/2013 6:53 AM, mike cook wrote:

Sara, I'd be interested to know if you ran into the problem and changing
baud rate fixed it. I ask that as my understanding of the most common
UART indicates that the DCD signal line is not managed with the baud
rate clock. At least for the most common 16550x variety, the DCD level
changes are signaled in the MSR and then if interrupts are enabled an
interrupt is queued. However t there is an anti-metastability filter of
2 CLK cycles before pin level changes are reflected in the MSR. So.. if
your UART is on a slow clock,  it could be that a 10us transition will
be  too fast to pass the filter. However, I do agree that trying is the
easiest test.

--- begin reply ---

[CITATION] --> http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm

(section) 6.2.4.6.1. What is the shortest Width for a Pulse
connected to the DCD Pin of an RS-232 Interface?

That depends. The higher the quality your serial port is, the longer
pulses will be needed. This is because of the ESD protection of the chip.

26 usec should be about the bit time for a 38400 serial line, so you
could connect it to the RxD line instead and see if you receive
characters that way when the port is set for 38400 or faster.

Another thing to try is to configure the serial port for 115200, some of
the chips base their deglitching on the baud rate, often requiring a
full symbol before they react.

[END CITATION]

Mike, I think that's basically what you were saying:

(quote of mike cook)

... there is an anti-metastability filter of 2 CLK cycles before pin
level changes are reflected in the MSR. So.. if your UART is on a slow
clock,  it could be that a 10us transition will be too fast to pass the
filter.

(end of last quote)

Or did I misunderstand what you said?

Yes. On principle, for some but not 100% of serial ports, the baud rate
clock won't matter at all, and the hardware interrupts will still happen
with low latency, regardless of the baud rate setting. What will change
however, is filtering which MIGHT be related to the baud rate setting.
(as per the citation I included in this post)

--Sarah

P.S.  I had trouble understanding the quote & reply style / layout...
... refactored the layout by band to look cleaner (my own tastes)
... basically made it easier for me to proofread everything, etc.

Also, seems the person who started this topic is currently silent...
... I think it was: "Chuck Forsberg WA7KGX N2469R" 


___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] gpsd 1pps pulse?

2013-05-08 Thread Chris Albertson
I was going to write the same thing.  That the DCD line has nothing at
all to do with baud rate.  But that applies to a "real" serial port.
If this is being done on a Serial->USB dongle that all bets are off
and you'll never get really good result as USB adds to many software
laters.

You can buy a new motherboard with a real rs232 port for under $100
and used ones for even less.  I'd not recommend uSB for the PPS
signal.  It is OK for serial data but not for PPS. (that is if you
care about best accuracy.)

On the USB converter the fact that the dCD signal changed has to go
over the USB bus in a serial data packet and gt queued and then read
and acted on.  It is orders of magnitude worse.

But all that said, if you get NTP sync'd to within 20 uSec you are
more than good enough.  It takes some effort to get to the 2 uSec
level and heroic effort to break 1 uS.  For practical purposes you
have to decide what is good enough.  Some people are happily with 10
milli Sec.


> Sara, I'd be interested to know if you ran into the problem and changing baud 
> rate fixed it. I ask that as my understanding of the most common UART 
> indicates that the DCD signal line is not managed with the baud rate clock. 
> At least for the most common 16550x variety, the DCD level changes are 
> signaled in the MSR and then if interrupts are enabled an interrupt is 
> queued. However t there is an anti-metastability filter of 2 CLK cycles 
> before pin level changes are reflected in the MSR. So.. if your UART is on a 
> slow clock,  it could be that a 10us transition will be  too fast to pass the 
> filter. However, I do agree that trying is the easiest test.

--

Chris Albertson
Redondo Beach, California
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] gpsd 1pps pulse?

2013-05-08 Thread mike cook

Le 7 mai 2013 à 20:00, Sarah White a écrit :

> On 5/6/2013 9:38 AM, Chuck Forsberg WA7KGX N2469R wrote:
>> I would like to set up a NTP server on a machine running Linux
>> (currently Korora 18).
>> 
>> What are the requirements for the 1 PPS signal fed to the carrier detect
>> pin?
>> I presume the 10 us 1pps from the Thunderbolt is too narrow.
>> I assume the rising edge of CD is the one gpsd triggers on.
> 
> Chuck,
> 
> 10 microseconds? That sounds fine actually... You could simply try it?
> 
> Really, I mean it. Just try and it might work with your serial port.
> 
> 
snipped

> If you have problems with PPS, just set the serial port to a higher baud
> rate... This is the reason I recommend against using the DCD line on the
> same serial port you're using for TSIP. Trimble tends to use 9600 baud
> on the TSIP port, and the signaling on that is too narrow.
> 
> For PPS, you'll be fine with 115200 BAUD (bit/s) ... This speed comes
> out to 8680.55 nanoseconds, more than a full microsecond "narrower" than
> the 10 microsecond wide PPS.
> 

Sara, I'd be interested to know if you ran into the problem and changing baud 
rate fixed it. I ask that as my understanding of the most common UART indicates 
that the DCD signal line is not managed with the baud rate clock. At least for 
the most common 16550x variety, the DCD level changes are signaled in the MSR 
and then if interrupts are enabled an interrupt is queued. However t there is 
an anti-metastability filter of 2 CLK cycles before pin level changes are 
reflected in the MSR. So.. if your UART is on a slow clock,  it could be that a 
10us transition will be  too fast to pass the filter. However, I do agree that 
trying is the easiest test. 



___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] gpsd 1pps pulse?

2013-05-07 Thread Sarah White
On 5/6/2013 9:38 AM, Chuck Forsberg WA7KGX N2469R wrote:
> I would like to set up a NTP server on a machine running Linux
> (currently Korora 18).
> 
> What are the requirements for the 1 PPS signal fed to the carrier detect
> pin?
> I presume the 10 us 1pps from the Thunderbolt is too narrow.
> I assume the rising edge of CD is the one gpsd triggers on.

Chuck,

10 microseconds? That sounds fine actually... You could simply try it?

Really, I mean it. Just try and it might work with your serial port.

I don't recommend any clever hardware hacks which will somehow piggyback
the 1 PPS output onto the DCD line on the same serial port you're using
for the TSIP protocol.

If you have problems with PPS, just set the serial port to a higher baud
rate... This is the reason I recommend against using the DCD line on the
same serial port you're using for TSIP. Trimble tends to use 9600 baud
on the TSIP port, and the signaling on that is too narrow.

For PPS, you'll be fine with 115200 BAUD (bit/s) ... This speed comes
out to 8680.55 nanoseconds, more than a full microsecond "narrower" than
the 10 microsecond wide PPS.

I had trouble getting the right headers to connect to the onboard serial
port on the motherboard (not installed by default) ... So I tried a
USB-serial, and ultimately switched to a "PCI Express to Serial Port"
version.

This is from the product description on my current setup:

(quote) Based on a native single chip design (no bridge chip), this
2-port serial adapter card allows you to harness the full capability
offered by PCI Express (PCIe), and reducing the load applied to the CPU
by as much as 48% over conventional serial cards.

^ I'm really not sure if this helps the latency for hardware interrupts,
or makes them worse, but it DEFINITELY works better than the USB-serial
adapter I was trying to use before.

At less than $100, the price is right though (And now my PPS hardware
interrupts are via "native PCIe" so it only makes sense that it would
work better than USB)

Hope this helps
--Sarah

P.S. If anyone needs a good serial port and not sure where to look, I
got mine from newegg, they have tons: http://goo.gl/CEzZA ... Mine was
specifically, this model, made by startech: http://goo.gl/S9EHx
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] gpsd 1pps pulse?

2013-05-06 Thread Hal Murray

c...@omen.com said:
> What are the requirements for the 1 PPS signal fed to the carrier detect
> pin? I presume the 10 us 1pps from the Thunderbolt is too narrow. 

Sometimes it works.  Sometimes it almost works meaning that it works well 
enough to look like it's working but only some of the samples are getting 
captured and it may drop out when something changes.  I'm not sure of the 
details.  I assume some hardware doesn't actually save the right info and/or 
some software looks at the current status rather than the saved bit.

I suggest plugging it in and looking at the counters.

You have to do something like this (as root) to get started:
  ldattach 18 /dev/ttyS0

Then just
  cat /sys/class/pps/pps0/assert
Then wait a while and look again and see if the counter went up at 1 per 
second.

You will get things like this:
  1367878436.73687#17737425
The stuff before the # is the time stamp.  The stuff after the # is a counter 
that gets bumped on each interrupt.


> I assume the rising edge of CD is the one gpsd triggers on.

Is there a reason you want to use gpsd?



-- 
These are my opinions.  I hate spam.



___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] gpsd 1pps pulse?

2013-05-06 Thread Bob Camp
Hi

Unless you have a holdover requirement (running without a GPS antenna for
x,xxx hours), a TBolt is major overkill for NTP. A cheap / simple / low
power GPS receiver with a pps out is plenty good enough. Save the TBolt (and
it's complicated power demands) for a place where you need it. 

Depending on the exact hardware you have in your PC, 10 us may (or may not)
be to narrow. It's easy enough to hook up a TTL to RS-232 chip and try it
out. 

Bob

-Original Message-
From: time-nuts-boun...@febo.com [mailto:time-nuts-boun...@febo.com] On
Behalf Of Chuck Forsberg WA7KGX N2469R
Sent: Monday, May 06, 2013 9:39 AM
To: time-nuts
Subject: [time-nuts] gpsd 1pps pulse?

I would like to set up a NTP server on a machine running Linux
(currently Korora 18).

What are the requirements for the 1 PPS signal fed to the carrier detect 
pin?
I presume the 10 us 1pps from the Thunderbolt is too narrow.
I assume the rising edge of CD is the one gpsd triggers on.

-- 
  Chuck Forsberg WA7KGX   c...@omen.com   www.omen.com
Developer of Industrial ZMODEM(Tm) for Embedded Applications
   Omen Technology Inc  "The High Reliability Software"
10255 NW Old Cornelius Pass Portland OR 97231   503-614-0430

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] gpsd 1pps pulse?

2013-05-06 Thread Chris Albertson
The computer only looks at the leading edge so the pulse width does
not matter as long as the cable is short.  look at what kind of signal
is required by the serial port on the PC.  Many of them will accept a
TTL level 5 volt signal but you may have to level sift it to RS-232
levels (plus and minus about 9 volts)If you are driving a long
cable you may have to buffer it.

Whatever you do make sure the polarity is correct.  RS232 data signals
use "negative logic" with 0 meaning 1 but rs232 control signls use the
other convention.   If you get the polarity wrong the timing is "off"
by the width of the pulse.  So you get a 10 uS bias.Having the PPS
inverted is a common error.



On Mon, May 6, 2013 at 6:38 AM, Chuck Forsberg WA7KGX N2469R
 wrote:
> I would like to set up a NTP server on a machine running Linux
> (currently Korora 18).
>
> What are the requirements for the 1 PPS signal fed to the carrier detect
> pin?
> I presume the 10 us 1pps from the Thunderbolt is too narrow.
> I assume the rising edge of CD is the one gpsd triggers on.
>
> --
>  Chuck Forsberg WA7KGX   c...@omen.com   www.omen.com
> Developer of Industrial ZMODEM(Tm) for Embedded Applications
>   Omen Technology Inc  "The High Reliability Software"
> 10255 NW Old Cornelius Pass Portland OR 97231   503-614-0430
>
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.



-- 

Chris Albertson
Redondo Beach, California
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] gpsd 1pps pulse?

2013-05-06 Thread Azelio Boriani
Yes, the rising edge is the usual UTC reference for the PPS pulse. The PPS
is used to trigger the interrupt on its rising edge so a 10uS long pulse
should be enough.


On Mon, May 6, 2013 at 3:38 PM, Chuck Forsberg WA7KGX N2469R
wrote:

> I would like to set up a NTP server on a machine running Linux
> (currently Korora 18).
>
> What are the requirements for the 1 PPS signal fed to the carrier detect
> pin?
> I presume the 10 us 1pps from the Thunderbolt is too narrow.
> I assume the rising edge of CD is the one gpsd triggers on.
>
> --
>  Chuck Forsberg WA7KGX   c...@omen.com   www.omen.com
> Developer of Industrial ZMODEM(Tm) for Embedded Applications
>   Omen Technology Inc  "The High Reliability Software"
> 10255 NW Old Cornelius Pass Portland OR 97231   503-614-0430
>
> __**_
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/**
> mailman/listinfo/time-nuts
> and follow the instructions there.
>
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] gpsd 1pps pulse?

2013-05-06 Thread Chuck Forsberg WA7KGX N2469R

I would like to set up a NTP server on a machine running Linux
(currently Korora 18).

What are the requirements for the 1 PPS signal fed to the carrier detect 
pin?

I presume the 10 us 1pps from the Thunderbolt is too narrow.
I assume the rising edge of CD is the one gpsd triggers on.

--
 Chuck Forsberg WA7KGX   c...@omen.com   www.omen.com
Developer of Industrial ZMODEM(Tm) for Embedded Applications
  Omen Technology Inc  "The High Reliability Software"
10255 NW Old Cornelius Pass Portland OR 97231   503-614-0430

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.