RTC Calibration program

Contributions to this software library are always welcome. Please ensure that you post program listings rather than .raw files. They give a reasonable idea of what your program does without having to load them into a DM42 and you can also include comments in your code. Check out the following link for a decoder/encoder: https://technical.swissmicros.com/decoders/dm42/

You can then copy/paste the listing and post it in "code" tags.
rprosperi
Posts: 1698
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: RTC Calibration program

Post by rprosperi »

HPMike wrote:
Sun Sep 01, 2019 10:05 pm
So, I just ran this program, but when I view the FAT drive in my PC file manager, I don't see any rtccalib.cfg file in the root directory. Am I expected to create this file, or am I missing something ?
The Release notes found here: viewtopic.php?f=16&t=2211 imply that you should supply a file with that name. Just make a text file and copy it to the root of the FAT disk.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
HPMike
Posts: 439
Joined: Fri Jul 21, 2017 11:01 pm
Location: DFW, Texas

Re: RTC Calibration program

Post by HPMike »

rprosperi wrote:
Sun Sep 01, 2019 11:11 pm
HPMike wrote:
Sun Sep 01, 2019 10:05 pm
So, I just ran this program, but when I view the FAT drive in my PC file manager, I don't see any rtccalib.cfg file in the root directory. Am I expected to create this file, or am I missing something ?
The Release notes found here: viewtopic.php?f=16&t=2211 imply that you should supply a file with that name. Just make a text file and copy it to the root of the FAT disk.
Had a heck of a time creating the file in Win 10 with Notepad. Kept insisting on using a .txt extension instead of .cfg. Went back to an old MSDOS computer to create the file, then copied via floppy disk to my Win XT computer and then connected the DM42 to a USB port so I could copy it to the FAT disk. After running CALIB with 0 as the initial value in RTCCALIB.CFG, nothing changed, even after turning the DM42 off and back on again. Still has 0 in the file and the time stamp of the file is unchanged. What is the problem ?
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973. DM32, SN 00054.
toml_12953
Posts: 795
Joined: Wed May 03, 2017 7:46 pm
Location: Malone, NY USA

Re: RTC Calibration program

Post by toml_12953 »

HPMike wrote:
Mon Sep 02, 2019 1:40 am
Had a heck of a time creating the file in Win 10 with Notepad. Kept insisting on using a .txt extension instead of .cfg. Went back to an old MSDOS computer to create the file, then copied via floppy disk to my Win XT computer and then connected the DM42 to a USB port so I could copy it to the FAT disk. After running CALIB with 0 as the initial value in RTCCALIB.CFG, nothing changed, even after turning the DM42 off and back on again. Still has 0 in the file and the time stamp of the file is unchanged. What is the problem ?
You could've created the file with a TXT extension and then renamed it.
Tom L

Some people call me inept but I'm as ept as anybody!
DM10L SN: 059/100
DM41X SN: 00023 (Beta)
DM41X SN: 00506 (Shipping)
DM42 SN: 00025 (Beta)
DM42 SN: 00221 (Shipping)
WP43 SN: 00025 (Prototype)
HPMike
Posts: 439
Joined: Fri Jul 21, 2017 11:01 pm
Location: DFW, Texas

Re: RTC Calibration program

Post by HPMike »

toml_12953 wrote:
Mon Sep 02, 2019 2:29 am
HPMike wrote:
Mon Sep 02, 2019 1:40 am
Had a heck of a time creating the file in Win 10 with Notepad. Kept insisting on using a .txt extension instead of .cfg. Went back to an old MSDOS computer to create the file, then copied via floppy disk to my Win XT computer and then connected the DM42 to a USB port so I could copy it to the FAT disk. After running CALIB with 0 as the initial value in RTCCALIB.CFG, nothing changed, even after turning the DM42 off and back on again. Still has 0 in the file and the time stamp of the file is unchanged. What is the problem ?
You could've created the file with a TXT extension and then renamed it.
Tried doing that, but Win 10 wouldn't let me. The file became rtccalib.cfg.txt ! Win 10 sucks !!!!!

However, I just discovered that I can do this from a Command Prompt, aka DOS Box.
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973. DM32, SN 00054.
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: RTC Calibration program

Post by Thomas Okken »

HPMike wrote:
Mon Sep 02, 2019 3:09 am
toml_12953 wrote:
Mon Sep 02, 2019 2:29 am
You could've created the file with a TXT extension and then renamed it.
Tried doing that, but Win 10 wouldn't let me. The file became rtccalib.cfg.txt ! Win 10 sucks !!!!!
That's odd. When I try to rename foo.txt to foo.cfg, File Explorer warns me that "If you change a file name extension, the file might become unusable," and asks if I'm sure I want to do that, but when I click Yes, it does change the extension without any further drama.

When you open a File Explorer window, and click View in the ribbon / menu bar / whatever that strip at the top below the title bar is called nowadays, do you have the option "File name extensions" checked? I think you want that checked in order to get reasonable behavior.
Ken S
Posts: 3
Joined: Sun Feb 11, 2018 11:15 pm

Re: RTC Calibration program

Post by Ken S »

That is exactly right in Windows 10, if you don't show the file extension you can't change it.
HPMike
Posts: 439
Joined: Fri Jul 21, 2017 11:01 pm
Location: DFW, Texas

Re: RTC Calibration program

Post by HPMike »

Thomas Okken wrote:
Mon Sep 02, 2019 4:10 am
HPMike wrote:
Mon Sep 02, 2019 3:09 am
toml_12953 wrote:
Mon Sep 02, 2019 2:29 am
You could've created the file with a TXT extension and then renamed it.
Tried doing that, but Win 10 wouldn't let me. The file became rtccalib.cfg.txt ! Win 10 sucks !!!!!
That's odd. When I try to rename foo.txt to foo.cfg, File Explorer warns me that "If you change a file name extension, the file might become unusable," and asks if I'm sure I want to do that, but when I click Yes, it does change the extension without any further drama.

When you open a File Explorer window, and click View in the ribbon / menu bar / whatever that strip at the top below the title bar is called nowadays, do you have the option "File name extensions" checked? I think you want that checked in order to get reasonable behavior.
That's it, thanks ! It wasn't checked, and all I was doing was changing the base filename from rtccalib to rtccalib.cfg without actually changing the extension, which is why I didn't get that warning. I was using a DOS-like file manager called ZTree on my Win 7 machine that died, as well as my Win XT and Win 98 machines, so I didn't need to use Windows File Explorer, but alas, like so many other great old software, it won't work on Win 10.
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973. DM32, SN 00054.
User avatar
ijabbott
Posts: 253
Joined: Fri Dec 15, 2017 2:34 pm
Location: GB-MAN

Re: RTC Calibration program

Post by ijabbott »

HPMike wrote:
Mon Sep 02, 2019 1:40 am
Had a heck of a time creating the file in Win 10 with Notepad. Kept insisting on using a .txt extension instead of .cfg. Went back to an old MSDOS computer to create the file, then copied via floppy disk to my Win XT computer and then connected the DM42 to a USB port so I could copy it to the FAT disk. After running CALIB with 0 as the initial value in RTCCALIB.CFG, nothing changed, even after turning the DM42 off and back on again. Still has 0 in the file and the time stamp of the file is unchanged. What is the problem ?
The CALIB program does not alter the rtccalib.cfg file, it just calculates a value to be placed into the file BY YOU.
HPMike
Posts: 439
Joined: Fri Jul 21, 2017 11:01 pm
Location: DFW, Texas

Re: RTC Calibration program

Post by HPMike »

ijabbott wrote:
Mon Sep 02, 2019 9:40 am
HPMike wrote:
Mon Sep 02, 2019 1:40 am
Had a heck of a time creating the file in Win 10 with Notepad. Kept insisting on using a .txt extension instead of .cfg. Went back to an old MSDOS computer to create the file, then copied via floppy disk to my Win XT computer and then connected the DM42 to a USB port so I could copy it to the FAT disk. After running CALIB with 0 as the initial value in RTCCALIB.CFG, nothing changed, even after turning the DM42 off and back on again. Still has 0 in the file and the time stamp of the file is unchanged. What is the problem ?
The CALIB program does not alter the rtccalib.cfg file, it just calculates a value to be placed into the file BY YOU.
Thanks ! Makes total sense now that I think about it. Anything involving the FAT disk is under the control of the DMCP and NOT DM42. I noticed that once I had placed a non-zero value into the rtccalib.cfg file, the correction value now appears in the Settings Set Time selection.

Anyways, it would be really nice if the next version of DMCP had an option in Setup to enter a calibration number for rtccalib.cfg directly, rather than having to create it externally on a PC/MAC and then transferring to the USB Disk over cable.
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973. DM32, SN 00054.
mcc
Posts: 277
Joined: Fri Jun 23, 2017 5:10 am

Re: RTC Calibration program

Post by mcc »

For me it is not totally clear from the instruction, whether I have to set the clock each time I do the calibration...

Cheers!
Meino
DM 42 - SN: 00373, Firmware release v.:3.22. / DMCP 3.24. as compiled by SwissMicros
Post Reply