[Coco] DS1216 -- issue with "Setclk"

George Ramsower georgera at gvtc.com
Tue Sep 22 14:14:45 EDT 2015



On 9/22/2015 6:54 AM, Robert Gault wrote:
> George Ramsower wrote:
>>
>
>>   Oh! I should specify on these matters. This PC keeps excellent time 
>> and once a
>> week, it updates from WWV.
>>
>>   The coco keeps terrible time without the smart watch but for what 
>> I'm doing, I
>> have to use getclk about every  five or ten seconds or the software 
>> clock in OS9
>> will lose about one to two seconds over a period of about thirty 
>> seconds. This
>> is okay for normal use as a few seconds won't matter.
>> <snip>
>>
>> George R.
>>
>>
>
> So your problem is with the NitrOS-9 clock not the SmartWatch. :)
>
> What do you have in your OS9Boot file regards the clock? NitrOS-9 now 
> has the option of a clock2_smart module which presumably "constantly" 
> reads the DS1216. That will waste system time but will prevent the 
> typical losses found with the clock2_soft module.
> Looking at the clock2_smart source code, it should be possible to set 
> the DS1216 without any special set clock routine, just use the setime 
> command or the F$Time system call. I have not tested this but expect 
> you won't need to constantly use getclk with clock2_smart in your 
> OS9Boot file.
>
> Robert
>
>
  I'm using OS-9 L2. Not Nitr0S-9.
  As far as getting the time off of the Smartwatch and setting the OS-9 
clock is not an issue at all. I've never complained about that, ever. 
The system clock w/Smartwatch is working fine.

  My entire issue in all these messages is regarding "Setclk". That is 
the sore thumb in all this.

  My issue is with "Setclk", nothing else!!

  So forget everything most of you have ASSUMED!!

  My issue is with "Setclk", nothing else!!

  The issue is that it will not accept a command such as "setclk 
yy/mm/dd/hh/mm/ss".
  If I do that exactly as shown(except with the correct 
"yy/mm/dd/hh/mm/ss", it will load and execute and then it will prompt me 
to enter the new "yy/mm/dd/hh/mm/ss".
  It does not accept input from being passed to the program.
  Setclk will only accept the input from the keyboard upon it's 
execution but not if it's passed along to it before hand.

  I simply cannot figure a way to explain this more clearly.
  I can ONLY input the date and time AFTER the routine is running and 
ONLY when it prompts me for that data.

  All I'm trying to do is write a routine that upon a known number of 
days, and upon a known error that the smart watch normally does, the 
routine will execute setclk and pass into it the corrected date and time 
based upon known errors in that smart watch. No clock keeps perfect time 
and they all have errors that are consistent. This error is figured into 
the routine by ME and that will give the new date and time to the setclk 
routine and this should do the trick without intervention from me.
  This way, I should be able to NOT have to manually re-set the smart 
watch for a very long time and the system clock will always be darned 
close to dead on.

  The smart watch cannot be set unless it is done from the keyboard, 
using setclk.
  Setclk will not accept date and time if it is passed along from a 
calling routine.

George R.


More information about the Coco mailing list