[Coco] Battery-Backed RTCs for CoCo?

Dave Philipsen dave at davebiz.com
Sat Dec 1 01:32:08 EST 2018


The DS3231 is temperature compensated and it has the ability to trim (or 
compensate for) the crystal frequency.  I don't have all of the details 
in front of me but according to the datasheet it can be very accurate.

Dave


On 11/30/2018 7:08 PM, Gene Heskett wrote:
> On Friday 30 November 2018 19:26:01 Robert Gault wrote:
>
>> That must be the clock2_coco3fpga.asm as that is "for the Maxim
>> Integrated DS3231 RTC."
>>
>> Again that code gets read more often than is necessary.
> Agreed, once a day is sufficient, and by makeing setclock loadable from
> storage and close itself when its done it would save at least a page of
> very badly needed system ram in kernel memory.
>
> Remember, the only place you would have to update is the 6 bytes in the
> DP, the softclock takes and works with whatever is there, so you only
> have to assure is that that the DP the new setclock is using, is the
> same DP the kernel is using. Usually regs.dp=$00.
>
> It really is that simple. In the case of the xt-rtc, I think I'd put it
> in the startup and not worry about a cron job for daily. And w/o any
> spinning rust, I'd just turn it off when done for the session.
>
>> You could use
>> the clock_soft, convert clock2_coco3fpga.asm to a stand alone program,
>> and read the RTC every ten or more minutes. As long as the RTC is
>> automatically read on a Boot, the system clock will be more than
>> accurate enough for any disk file label or other time stamp required.
> I agree. You would get perfect time if the clock crystal was 3.5800000
> mhz, but its not, more than likely its in the ballpark of 3.579545 mhz,
> the ntsc color frequency, minus what ever ageing the rock has done
> because the silver plating that is the coupling between the quartz and
> the circuitry, slowly becomes oxidized, and the added weight of the
> oxygen incorporated into the silver plating as this occurs, slows the
> crystal, as much as 10 kilohertz by the time it actually dies. I haven't
> encountered such a coco, so the shack must have bought well sealed
> crystals. The CB radios of the day didn't have such a luxury, so we
> replaced a lot of crystals back in the day.
>
> Your factoid for the day... ;-)
>
>> Dave Philipsen wrote:
>>> Actually we have a NitrOS9 driver for the newer (and cheaper) DS3231
>>> chip that is so prevalent on many RTC boards available on eBay.  It
>>> is currently used on the CoCo3FPGA.  I believe that the general
>>> register architecture of the Dallas Semi chips are all pretty much
>>> the same. It's just that the older ones were accessed in a slightly
>>> different way before the advent of I2C and SPI.
>>> Dave
>
>



More information about the Coco mailing list