Connect with us

Clock Question

Discussion in 'CAD' started by Jim Thompson, Feb 2, 2004.

Scroll to continue with content
  1. Jim Thompson

    Jim Thompson Guest

    Anyone have an idea how one might output their PC clock information
    though the serial (or USB) port?

    My PC clock is NIST-synchronized and it would be nice to have a wall
    clock with that accuracy.

    ...Jim Thompson
     
  2. A simple method would be to write a Basic or C utility to interrogate
    the system clock and output the time string through the port in whatever
    format you choose..

    Cheers!

    Chip Shults
     
  3. Bill Garber

    Bill Garber Guest

    : Anyone have an idea how one might output their PC clock
    information
    : though the serial (or USB) port?
    :
    : My PC clock is NIST-synchronized and it would be nice to have a
    wall
    : clock with that accuracy.

    How about this? Once a day look at the computer and
    set your clock. Hahahahahahahahahahaha!!!!!!!!!!!!!

    Sorry Jim, I just couldn't resist it, and if I had
    a clue I would tell you, honestly I would. 8)

    Bill @ GarberStreet Enterprizez };-)
    Web Site - http://garberstreet.netfirms.com
    Email -
    Remove - SPAM and X to contact me
     
  4. scada

    scada Guest

    You could write a VB script to poll the Datepart: Time(), or Now(). Send it
    to the serial port though MSComm, as a byte or a sync pulse.
     
  5. Russell Shaw

    Russell Shaw Guest

    date > /dev/ttyS0
     
  6. Jim Thompson

    Jim Thompson Guest

    In Analog language this means what ???

    ...Jim Thompson
     
  7. Jim:

    "Nice to have a clock with that accuracy... Heh, heh..."

    Seems like you have a yen for clock accuracy...

    Jim, to really appreciate what it means to be an amateur with a "yen" for
    accuracy you should visit...

    http://www.leapsecond.com

    You will be impressed...
     
  8. Analog it ain't. If I remember my UNIX days, that command redirects the
    OS's date function to the serial port. Beats me what you'd do with it then.
     
  9. Do you dislike WWV?

    www.klockit.com have some Atomix clocks fairly cheap.

    Other wise you'd need to parse a serial string sent out from a vb script or a plain old windos app. Cable length of usb would be too
    short for most clock locations. Blue tooth would be nice tho (c;

    Cheers
     
  10. Jim,

    It's easy to write a program that, receiving a message via the serial port,
    gets the system time and sends it back. So you need to get (build) a clock
    that is relatively accurate on its own and sends a message every now and
    then, receives the system time of the computer and synchronises itself
    accordingly. The message can be a byte (a special one like a question mark
    or a random one) or even a pulse pulling a modem control line of the serial
    port. I'd use a micro containing a UART (PIC or any brand you like) and
    clock it with a clock x-tal from an old watch or something like that. If you
    like it a more oldfashioned way, you still need a UART. But you can build
    the clock using (synchronous) counters with a parallel load. A carry
    pulse - from the tens minutes counter or instance - can be used to activate
    the computer. That has to send the time bytes in BCD. Shift them in a shift
    register and load them into the counters when the last one has been
    received.

    petrus
     
  11. Garrett Mace

    Garrett Mace Guest

    Indeed...I think the site can be summed up by the following picture:
    http://www.leapsecond.com/images/LabJan2001r.jpg
     
  12. www.atomictime.com
     
  13. Chuck Harris

    Chuck Harris Guest

    Uhmm? Go to costco, and buy their WWVL synchronized wall clock
    for $17?

    -Chuck Harris
     
  14. Gregg

    Gregg Guest

    Hi Jim,

    I too sync my computer using NTP.

    A few lines of Perl should do you bud :)
     
  15. Mike

    Mike Guest

    I'm sure I could write you a program to do something like that pretty
    quickly. The question is, what clock is going to read data from a serial
    port?

    An even more important question is, isn't it going to drive you nuts
    knowing that any clock you drive from the serial port is going to be
    milliseconds (yes, milliseconds, and probably many of them!) off target?

    Just think about it. You'll end up sitting in your rocking chair, staring
    at the clock, thinking, "Damn, that last tick should have happened
    earlier... damn, that one too... damn, that one too... damn, that one
    too..."

    In the morning, your wife will find that you've spontaneously combusted,
    and all that's left is your slippers, part of your robe, and what many
    people will come to believe was simply an urban legend all along.

    "Jim Thompson? Hell, son, he's like Bob Widlar. He never really existed,
    it's just a bunch of stories that got handed down through generations of
    engineers."

    Is that what you really want, Jim? Even your kids would begin to believe
    the legend after a while. One day, your daughter would recount the story of
    how you died: "Well, dad had bought this JATO rocket at the swap meet, and
    he welded it to his old Impala one day... You can still see the hole in the
    side of South Mountain where he augered in."

    Trust me. What you want is a Westclox Big Ben. They're simple. They're
    cheap. They're probably not made any more. But I'm sure you can find one on
    Ebay. They need to be reset every week. But who cares? You'll never look at
    one of them and say, "Damn, that last tick should have happened earlier..."

    -- Mike --
     
  16. Garrett Mace

    Garrett Mace Guest

    You should have clicked "Send" a lot earlier.

    (couldn't resist)
     
  17. "Jim Thompson" wrote ...
    "Off the peg" USB-powered 7-seg LED displays...
    http://www.delcom-eng.com/products_USBNDisplay.asp
    Docs & software downloadable. Routine to spit out computer
    clock time is relatively trivial.
     
  18. "Mike" wrote ...
    You can write the software to take any time delays into account.
    You can even compensate for the speed of light from the display
    to Mr. Thompson's retinas (including the delay through his optic
    nerves to his cereberal cortex. Of couse, it will be *slightly* off
    for others! :)
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-