[time-nuts] ``direct'' RS-232 vs. RS-232 via USB vs. PPS decoding cards

Bob Camp kb8tq at n1k.org
Sat Feb 18 00:48:18 UTC 2017


Hi

Roughly speaking, if you have a 10 MHz clock driving a timer and the pin latches data 
from that timer, you get 100 ns “buckets and +/- 100 ns “jitter”.  You can find MCU’s that
will do this for < $1. If you go crazy, you can spend < $10 and still get a very fancy MCU
on a board with all the support “stuff”. That would get you into > 100 MHz clocks driving
counters that might be 32 bits wide. 

The Intel guys have some *very* fast timers flying around their cpu’s. They would laugh
at the idea of a 10 or 100 MHz clock. If you can configure the pin to grab the data off those timer, you
have way better than 100 ns at the timer. The trick is writing a driver that does that. How 
easy that is to do depends a *lot* on your OS and the chipset you are running. It may 
be trivial or it may be impossible.

At some point one might ask: Is a $1 MCU a “system” or is it a peripheral? 

Bob


> On Feb 17, 2017, at 5:58 PM, Thomas Petig <thomas at petig.eu> wrote:
> 
> Hi,
> 
> I was wondering whether there is some data/information available on the
> claimed +/- 100 ns jitter?
> 
> Regarding the PPS -> USB (using the CTS line of a FTDI FT232R), I
> plotted, using some lines of Python, the time offset as attached. Just
> to get an overview how it is 'worst case', i.e., user program, python,
> etc. The 1PPS signal comes from a GPS rx.
> Looks like a standard deviation of around 150 us.
> y-axis:  measured pps offset from full second (computer time) in us,
> x-axis pps pulse number.
> 
> On the long term it looks interesting (while measuring I played with the
> NTP server on this computer)
> Until ca. second 10000: ntpd synchronization via internet
> Until ca. second 17000: made an additional LAN NTP server (GPS) available
> Until the end: replaced ntpd with chrony (still using internet and local
> servers)
> 
> Interesting points:
> -It looks surprisingly bad with using the normal ntpd (especially, there
> is not really an improvement having an local GPS based server
> available, did I do something wrong? Only the offset changes by ca. 3
> ms.)
> -It looks surprisingly good with chrony. But there are continuously
> outliers of up to 4500 us, is this a result of the chrony control loop?
> The time is wandering around with ntpd, but has less jitter.
> 
> Conclusion:
> Despite the 150 us stddev, the using PPS over USB gives some interesting
> inside of what the local ntp server is actually doing. It looks to me
> like it would be an improvement to use it when using ntpd, but not when
> using chrony.
> 
> Best regards,
>   Thomas
>   DK6KD
>   SA6CID
> 
> PS:
> Raw data is here, if you want to zoom in: (1.7 MiB, one row per PPS
> offset in us)
> http://petig.eu/pps-usb.txt
> 
> On Tue, Feb 14, 2017 at 07:26:23AM -0500, Bob Camp wrote:
>> Hi
>> 
>> A direct port might be a +/- 100 ns sort of thing most of the time and a +/-10 us
>> thing every so often under some OS’s. Most desktop operating systems are not
>> designed to prioritize random pin interrupts. A dirt cheap MCU coded with a few
>> (hundred) lines of assembly code may be a better option than a typical desktop.
>> Complicating this further is the degree to which some OS’s can be directly or
>> indirectly optimized. Install *this* package and it all goes nuts. Install that package
>> and not much happens ….
>> 
>> Bob
>> 
>>> On Feb 13, 2017, at 11:07 AM, Ruslan Nabioullin <rnabioullin at gmail.com> wrote:
>>> 
>>> Hi, generally speaking, what are the performance differences between the following: 1. direct RS-232 (i.e., what I believe is a standard PCI card offering RS-232---essentially UARTs interfaced more-or-less directly to the PCI bus); 2. RS-232 via USB; 3. PPS decoding PCI cards (which might also have an IRIG input or even an onboard GNSS receiver).
>>> 
>>> Thanks in advance,
>>> Ruslan
>>> _______________________________________________
>>> time-nuts mailing list -- time-nuts at 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 at febo.com
>> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>> and follow the instructions there.
>> 
> <overall.jpg><zoom.jpg>_______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.




More information about the Time-nuts_lists.febo.com mailing list