SwissMicros Clock Calibration

This program simplifies calibrating the realtime clock in your SwissMicros calculator. There is no need to first set the clock to correct time because the program compares elapsed calculator time to elapsed computer time. It does not compare readings of the two clocks. A two step process is needed to generate the calibration measurement:

  1. Run it to begin a measurement.
  2. After several days, run it a second time to end the measurement.
Length of time between is not important, but should be long enough to capture significant drift. Several days to a week is probably enough. If you already have a /rtccalib.cfg file on your calculator, delete or rename it first to be sure that you measure uncorrected clock drift. The difference between elapsed computer time and elapsed calculator time is clock drift. From that, the program creates rtccalib.cfg, the file your calculator uses to calibrate the clock.

Code

Download the python program: rtcal.py

Usage

rtcal.py -b|-e [-d Y M D h m s] [-f filename]
-b begin measurement
-e end measurement
-d calculator date, yr mo day hr min sec, all integers
-f filename to store start times, default is "calTimes"

If the -d date option is not used, you will be prompted to enter the calculator's date and time.

Example Run

If /rtccalib.cfg exists on your calculator, remove or rename it.

If the calculator clock indicates that it is 15 Aug 2024 1.25pm and 0 seconds, start the measurement by typing:

rtcal.py -b -d 2024 8 15 13 25 0

Hit enter just as the seconds change to zero, since 0 is specified above, to duplicate the calculator clock setting as accurately as you can. A two line ascii file named calTimes is created. Some days later, four days in this example, cd to where file calTimes exists and run

rtcal.py -e -d 2024 8 19 8 44 30

and a calibration file named rtccalib.cfg is created containing a single number. Again, try to hit enter, in this example, just as the clock seconds turn to 30. The more accurate you are, the better your calibration is. Finish up by doing:

  1. cp rtccalib.cfg /media/mm/DM42 (or where ever your calc is mounted).
  2. Set calculator clock to proper time.
  3. Enjoy nearly drift-free time!

Example Two

If you calibrate more than one calculator at the same time, use the -f filename option to maintain multiple calibration files. For example, to calibrate a DM42 and a DM41X,

rtcal.py -f cal41 -b
rtcal.py -f cal42 -b
When ending the measurements, remember that each rtcal run creates a new rtccalib.cfg and will overwrite any previous one. Be sure to move it to the correct calculator before ending another measurement.
rtcal.py -f cal41 -e
cp rtccalib.cfg /media/mm/DM41X
rtcal.py -f cal42 -e
cp rtccalib.cfg /media/mm/DM42

int or float?

The SwissMicros manual says that the calibration value should be an integer, but I notice it not only accepts and prints the float value but that the clock keeps excellent time. Does the calculator simply truncate the fraction, use the float, or something else? I don't know and SwissMicros does not answer. For now the program generates a float because it seems to work well and potentially offers more accuracy than an int. But the question remains.

Mike Markowski
mike.ab3ap@gmail.com

Web Analytics