[Coco] Smartwatch setting from Basic09
George Ramsower
georgera at gvtc.com
Sat Apr 6 10:30:05 EDT 2013
This morning early, I was thinking on this very thing. It wasn't setime I used, it was setclk. Danged memory.
I intend to do some testing today on this very problem and see exactly what I have done and what the results were.
Last year, I banged my head and my memory isn't all there. So I have to refresh it as much as I can.
I'm sure I was simply using the wrong syntax in a B09 program to use "setclk". I'll try this again to see if I can or can't get it to work, then I'll have an update to this list on my findings. I'm sure it was me and not the software.
George
----- Original Message -----
From: Robert Gault
To: CoCoList for Color Computer Enthusiasts
Sent: Saturday, April 06, 2013 9:14 AM
Subject: Re: [Coco] Smartwatch setting from Basic09
George Ramsower wrote:
> I have been using a Coco3 for many years. I love these boxes. My Coco3 is my connection to the world of my life.
> When I use this to keep track of time keeping things, such as a mechanical clock, I have to adjust for the errors in the SmartWatch.
> Is there a way to set the smartwatch from basic09?
> I've attemted this a couple of times but, now I don't remember what I did or why it didn't work. Now I want to start this again to monitor a mechanical clock but, I want to adjust the Smartwatch on a scheduled basis(as I tried before) such as once a day or every few hours. The smartwatch I am using loses time and needs adjusting ocassionally.
> Is it possible to do that from Basic09? How would this be accomplished? Before, I used "Settime" or "Setime"( can't remember right now) but, that was from the command line. Does the new OS9 clock module allow this or can I use the original clock. I don't really care about the year thing. If it says it's 1913, I'm good with that.
>
> Suggestions?
>
Setime is an OS-9 command to adjust system time but will have no effect on a
real time clock (RTC). Your use of smartwatch is confusing as that is a
copyrighted name for a specific RTC but it seems you may be using it as a
generic name for all RTCs.
To set an RTC, you must know the specifications of the unit as they require
different command sequences to both set and read the time. Except for the very
simple emulations of RTCs in some Coco emulators, the code sequence will be
complicated enough that an assembly program rather than Basic09 will be your
best bet.
In addition to sending the correct sequence, you must be sure that the RTC is
"in memory". For that, you must know which I/O bytes are used and if OS-9
currently has those bytes available. That is not a trivial matter on a Coco3 and
you likely may need to reset the GIME and MMU registers. Then there is the issue
of where the physical location of the RTC is and that may require checking each
MPI slot.
I have written and sell code that supports the SmartWatch (r) for both Basic and
OS-9.
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list