Maker Pro
Maker Pro

Clock Question

M

Michael

Jan 1, 1970
0
Mike said:
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 --


I've gotten this brand of logic from many people over the years, Jim.
Don't listen.
My first self-setting clock was the Heathkit Most Accurate Clock, a-way
back in the 80's. Most people who saw it were not impressed: "Whaddya
need that kind of accuracy for??" was the usual response. Well, I
confess I _am_ a clock bigot - have been since my time in the A.F. back
in the 60's when I was responsible for our H.P. cesium beam-driven world
time clock - but I didn't get the Heath clock because of a necessity for
split second accuracy. I got it because it was cool.

After studying the Heath clock's schema for upteen months I decided I
could do it better and cheaper. I had to learn microcontrollers first,
chose the Z80B because it was readily available, cheap, and a freeware
assembler was available. That whetted my appetite, set me to learning
an ancient Motorola NMOS chip. And that's what I used for my clock. I
built it in 1994 and it's been running ever since.

No, we don't need split-second accuracy. That comes as gravy from a box
that doesn't need resetting even when the bad ol' spring-ahead-fall-back
disruptions occur. That's what I love, not having to reset my clocks
several times/year simply because some doofus decided that the sun gets
out of whack WRT the correct - read "human" - biorhythm.
 
M

Michael

Jan 1, 1970
0
Tom Gross wrote:
(snip)
I have a CASIO Waveceptor Watch that attempts to get synched up with
WWV in Fort Collins every night. That might be your cheapest
solution.



WWV? Or should that have been "WWVB"?
 
J

Jim Thompson

Jan 1, 1970
0
I've gotten this brand of logic from many people over the years, Jim.
Don't listen.
My first self-setting clock was the Heathkit Most Accurate Clock, a-way
back in the 80's. Most people who saw it were not impressed: "Whaddya
need that kind of accuracy for??" was the usual response. Well, I
confess I _am_ a clock bigot - have been since my time in the A.F. back
in the 60's when I was responsible for our H.P. cesium beam-driven world
time clock - but I didn't get the Heath clock because of a necessity for
split second accuracy. I got it because it was cool.

After studying the Heath clock's schema for upteen months I decided I
could do it better and cheaper. I had to learn microcontrollers first,
chose the Z80B because it was readily available, cheap, and a freeware
assembler was available. That whetted my appetite, set me to learning
an ancient Motorola NMOS chip. And that's what I used for my clock. I
built it in 1994 and it's been running ever since.

No, we don't need split-second accuracy. That comes as gravy from a box
that doesn't need resetting even when the bad ol' spring-ahead-fall-back
disruptions occur. That's what I love, not having to reset my clocks
several times/year simply because some doofus decided that the sun gets
out of whack WRT the correct - read "human" - biorhythm.

I've said several times, "This is for fun and pizzazz".

Of course one thing that will NEVER happen is that I would own an
Impala... sheeeeesh, that's a GM product... I've haven't owned an
American automobile since 1977 when I gave up on Ford ;-)

...Jim Thompson
 
T

Tom Gross

Jan 1, 1970
0
Richard Crowley said:
Set up one of the machines as the NTP master. Use one of the
several available utilities to sync it to WWV via RF, dialup,
or internet. Still free (assuming internet connectivity.)

yes, I will have to set up one of the XP Pro machines as a master time
server. I can't rely on any of my machines actually being connected
to the web (in this application) but it's really not that important to
me, as long as they think it's the same time down to about a second.

Apparently the two homebrewed machines I have with ASUS motherboards
are consistently running too fast, gaining about 15 seconds per hour.
 
B

Bob Stephens

Jan 1, 1970
0
I've said several times, "This is for fun and pizzazz".

Of course one thing that will NEVER happen is that I would own an
Impala... sheeeeesh, that's a GM product... I've haven't owned an
American automobile since 1977 when I gave up on Ford ;-)

...Jim Thompson

With all the "Buy American" hoopla currently extant, it would be
interesting to poll how many American engineers drive American cars.
I haven't owned one in decades.

Bob
 
C

Chris Hodges

Jan 1, 1970
0
Writing the time to the serial port is not the problem. You need some kind
of scheduling unless you want to synchronise your clock manualy every time.
Running Linux it's easy. Can be done by a three or four line script starting
a background process. Windows has its own scheduler(s) although I can't
imagine a simple script to run it a the moment. As DOS lacks multi tasking,
writing a scheduler is not that easy. It nervertheless can be done if you
make it a device driver or another resident program. Unless you're running
Linux it's much easier to do the scheduling by the clock itself. Make it
send a kind of a signal to the computer using the serial port. This signal
activates an interrupt routine that replies by sending the system time.

That's certainly true, I was only really replying to the specifics of
DOS output. Personally as I start the pc every day I would probably
just put it in the autoexec to sync once per day, or use 98's task
scheduler to call a batch file. Messy though. My other approach would
be to write something in Delphi (or possibly Visual C for the challenge)
that would work as you suggest.

My linux skills are a long way short of scripting this sort of thing!
 
C

Carl D. Smith

Jan 1, 1970
0
if you create a text file containing just a carriage return (test.txt in
my example) then at the dos prompt:
time < test.txt > test2.txt
puts:
Current time is 7:23:20.08p
Enter new time:
into test2.txt, so time < test.txt >com1 should output the time as ascii
to the serial port.

If I have time later I might test with 2 pcs, a cable and hyperterminal.

Or you could do the following command (at least it works on my
Win98 and XP machines):

echo. |time

That's the pipe character before time, and don't leave out the
period. It pipes the carriage return produced by the "echo."
command into the time command.
 
J

JeffM

Jan 1, 1970
0
Set up a job in Scheduled Tasks
(the task GET_TIME executes TIME_IS.BAT hourly).

Carl D. Smith
echo. |time
That's the pipe character before time,
and don't leave out the period.
It pipes the carriage return produced by the "echo." command
into the time command.

:: TIME_IS.BAT writes the current time to the serial port.
@echo. | TIME | FIND "is" > COM1:
(One executable line; auto-deletes the temp file.)
 
C

Chris Hodges

Jan 1, 1970
0
Carl said:
Or you could do the following command (at least it works on my
Win98 and XP machines):

echo. |time

That's the pipe character before time, and don't leave out the
period. It pipes the carriage return produced by the "echo."
command into the time command.

I think that's what I was looking for when I set out to refresh myu mind
on redirection! Thanks for the reminder Carl.
 
K

K Wannamaker

Jan 1, 1970
0
Yep! That pic does sum up it up! couldn't have done better if you wanted
too. It's a shame that this is my basement!
 
K

Ken Taylor

Jan 1, 1970
0
That's a shameful photo - there's some clear space which could be usefully
filled! :)

Ken
 
M

mike

Jan 1, 1970
0
Jim said:
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

The easiest thing to do is plunk down $15 and buy a commercial digital
clock with a wwvb receiver built in. Mine are all marketed by
Oregon Scientific, but I'm bettin' they're available at Radio Shack.

Assuming by "wall clock" you mean something that you look at and don't
really need anything closer than a second...

The next easiest thing to do is plunk down a buck for a garage sale pc
and set it's clock to the master clock on your main pc. Just resync it
periodically so it stays in sync within the resolution of your display.
My PC is hooked into the stereo to play MP3s and has a BIG clock display.
Here's the batch file:
rem this runs on music at startup to sync things up.
rem This sets local time to main system time.
net time \\main /SET /YES

Or you can just broadcast the time over your network. I use the mailbox
protocol, just because that was all that worked with the OS I had at the
time. I'd probably try to use named pipes if I did it again.
Have a process running at the destination to catch the time
and display it.

Or you can write a basic program to stuff the time out any of the ports.
The time is easy. Depending on your OS, accessing the ports may be a
hassle. You still need a display.

Having said all that, I find that I never need to know the time more
accurately than what my watch says. I keep a stock of "chill pills"
for use when I think I might need more resolution.
The impulse soon passes ;-)
mike



--
Return address is VALID.
Bunch of stuff For Sale and Wanted at the link below.
Toshiba & Compaq LiIon Batteries, Test Equipment
Honda CB-125S $800 in PDX
TEK Sampling Sweep Plugin and RM564
Tek 2465 $800, ham radio, 30pS pulser
Tektronix Concept Books, spot welding head...
http://www.geocities.com/SiliconValley/Monitor/4710/
 
R

Rich Grise

Jan 1, 1970
0
build a uP clock controller with an Ethernet port on it, plug
it into your DSL hub, and get the time from one of the timeservers.

Why count on your computer, unless you've logged onto NTP when
you installed Linux. ;-)

Cheers!
Rich
 
R

Rich Grise

Jan 1, 1970
0
mike said:
The easiest thing to do is plunk down $15 and buy a commercial digital
clock with a wwvb receiver built in. Mine are all marketed by
Oregon Scientific, but I'm bettin' they're available at Radio Shack.
I got mine at Walgreen's. :)

Cheers!
Rich
 
J

Jim Thompson

Jan 1, 1970
0
I got mine at Walgreen's. :)

Cheers!
Rich

And you didn't read my response. I live in a small, very rocky canyon
(actually part of the mouth of an extinct volcano :), so the WWVB
signal level is too low.

...Jim Thompson
 
S

Spehro Pefhany

Jan 1, 1970
0
And you didn't read my response. I live in a small, very rocky canyon
(actually part of the mouth of an extinct volcano :), so the WWVB
signal level is too low.

...Jim Thompson

Maybe you pick up the signal when it reflects off the planes going
overhead. ;-)

Best regards,
Spehro Pefhany
 
J

Jim Thompson

Jan 1, 1970
0
Maybe you pick up the signal when it reflects off the planes going
overhead. ;-)

Best regards,
Spehro Pefhany

Sno-o-o-o-ort ;-) (That's an inside joke that only long-term lurkers
will recall :)

For some reason WWVB doesn't do well even in parts of the valley that
you'd think would be OK... for instance the flat farm fields south of
Chandler have a pitiful signal.

...Jim Thompson
 
Top