Page 1 of 1

Time adjustment using CF48

Posted: 09 Aug 2015, 17:19
by Laurie_the_Knot
Having not dived for a while I thought I should switch on my OSTC2C to check the battery voltage. The battery was fine but I found that the clock was over 20 minutes slow.

Rather than going through the time setting procedure I decided to use CF48 to slowly adjust the time forward until the correct time was displayed. I set CF48 to +2:00 and left it overnight. I checked the time on the OSTC2C the next day and found the clock was even slower than the previous day. I then experimented other values for CF48 and found that if it had a setting of +1:00 or more the clock lost time.

I copied the source .asm files from the OSTC repository and found the code that uses the value of CF48 to adjust the clock in isr.asm. Studying the logic between labels RTCisr2: and check_date: showed that time adjustment should work correctly for a negative value of CF48 or a positive value up to +0:59.

I would like to make some suggestions regarding modifying the code in this area as follows:
1. The initial check of the value of secs should check that it is greater than 59 seconds and return if not.
2. After the time_correction_value is copied to secs a loop should be created that tests the value of secs and increments mins and decrements secs by 60 until secs is less than 60.

Re: Time adjustment using CF48

Posted: 16 Aug 2015, 20:48
by heinrichsweikamp
Hi Laurie,

This CF48 is now obsolete. It was introduced to compensate a silicon bug in the used processor. "Newer" firmware (less then 3 years old) will provide enough accuracy (less then a few seconds/month error).

Make sure CF48 is set to it's zero value and the clock should be fine. Download your dives (And sync with the PC clock) every 20 dives or so and it will be even better.

Regards,
Matthias

Re: Time adjustment using CF48

Posted: 17 Aug 2015, 12:56
by Laurie_the_Knot
Thanks for the advice Matthias.

I have to say that my old 2N was more accurate than my newer 2C - but the 2C loses less than 1 second per week. When I'm diving I keep a close eye on the OSTC2C's timekeeping and use CF48 to adjust by just one second occasionally.

As I haven't dived since April I thought I'd use CF48 to bring it to time rather than resetting the time through the menu which I would have done had I needed the time corrected quickly.

If you don't plan to fix this bug maybe you should limit the range of CF48 to +/- 59 seconds. This way the bug will never be seen.

Thanks again for a great dive computer.