[Coco] Smartwatch setting from Basic09

Gene Heskett gheskett at wdtv.com
Sat Apr 6 11:24:21 EDT 2013


On Saturday 06 April 2013 11:16:07 Robert Gault did opine:

> 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).

Huh?  All the clock modules I have ever used, have contained code to set 
the hardware too, or did from the B&B-XTC, the disto 4n1, and now the TC^3 
controller I use now.  I have /assumed/ that all the clock2 modules for a 
specific hardware clock always followed that recipe.  Do some of them not?

> 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.

Also true if writing it from scratch.  But that page of memory addressing 
the slot selection is in the top page at $FF7F, and always available 
regardless of GIME/MMU status.
 
> 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


Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
My views 
<http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml>
"Mr. Watson, come here, I want you."   -- Alexander Graham Bell
A pen in the hand of this president is far more
dangerous than a gun in the hands of 200 million
          law-abiding citizens.



More information about the Coco mailing list