Newsgroups: comp.robotics
Path: brunix!uunet!timbuk.cray.com!hemlock.cray.com!kilian
From: kilian@cray.com (Alan Kilian)
Subject: Re: 1 Second interval on 68CH11
Message-ID: <1992Sep21.104300.29565@hemlock.cray.com>
Lines: 21
Organization: Cray Research, Inc.
Date: 21 Sep 92 10:43:00 CDT


> koolish@BBN.COM (Richard M. Koolish)
> How do I get a 1 second interval on the 68HC11 (Paraphrased)

Since you are already counting interrupts use the RTI interrupt.
Set RTR1 and RTR2 to 0 to generate a 4.10 millisecond interrupt.
Then count 244 interrupts for a total of 1.0004 seconds. .04% error

This assumes an 8 mHz crystal for a 2 mHz E clock. If you have a different
I think you are using an 8 mHz crystal because you state that 2 TOF
interrupts are 1.05 seconds and at 8mHz 2*TOF = 1.0486 Seconds.

You could also buy a 2^23 Hz crystal and count exactly 2 TOF interrupts.
But I can't find any 2^23 Hz crystals in DigiKey.

                     -Alan Kilian

-- 
 -Alan Kilian           kilian@cray.com 612.683.5499 (Work) 612.729.1652 (Home)
  Cray Research, Inc.   655 F Lone Oak Drive, Eagan  MN, 55121 
                        "It's based on actual math". -Dilbert
