[net.micro.6809] Slow Clock on COCO/OS-9

rickb@tekig1.UUCP (Rick Bensene) (11/02/83)

In response to the question re: the slow time of day clock
under OS-9 on the COCO, NO - your crystal isn't off.  It is
a natural occurrance when using an interrupt to vector to
a routine to keep the time.  You said that you weren't using
interrupts - well, you are using interrupts ALL the time
under OS-9.  The task switching and scheduling is all based
upon the 60 Hz 'tick' of the clock.  ANYTHING that shuts off
interrupts, such as accessing the disk, or during the time that
interrupt driven devices are serviced, or when a character is
recieved on the fake "/t1" on the COCO will cause the clock
to lose ticks.  In the case of disk I/O, quite a few ticks
can be lost per sector read.  As time goes on, the error will
become more and more obvious.  The only real solution to this
is to add on a real time clock chip, and change the "Clock"
module to get the time out of the chip.  Such a change is not
difficult, provided you are familiar enough with OS-9, and
have the knowledge to interface the clock chip.  A good
clock chip is the 58167 made by National.  It is quite simple
to interface to, and keeps month, day, day of week, hour, minute,
second, and fractions of seconds down to .001 second.

                Rick Bensene
                 Tektronix, Inc.