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: http://www.swissmicros.com/dm42/decoder/

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

Re: RTC Calibration program

Post by rprosperi » Sun Sep 01, 2019 9:11 pm

HPMike wrote:
Sun Sep 01, 2019 8: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

HPMike
Posts: 87
Joined: Fri Jul 21, 2017 9:01 pm
Location: DFW, Texas

Re: RTC Calibration program

Post by HPMike » Sun Sep 01, 2019 11:40 pm

rprosperi wrote:
Sun Sep 01, 2019 9:11 pm
HPMike wrote:
Sun Sep 01, 2019 8: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.

toml_12953
Posts: 514
Joined: Wed May 03, 2017 5:46 pm
Location: Malone, NY USA

Re: RTC Calibration program

Post by toml_12953 » Mon Sep 02, 2019 12:29 am

HPMike wrote:
Sun Sep 01, 2019 11:40 pm
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

My father was a man of the cloth. He was a tailor.

DM42 SN: 00025 (Beta)
SN: 00221 (Shipping)

HPMike
Posts: 87
Joined: Fri Jul 21, 2017 9:01 pm
Location: DFW, Texas

Re: RTC Calibration program

Post by HPMike » Mon Sep 02, 2019 1:09 am

toml_12953 wrote:
Mon Sep 02, 2019 12:29 am
HPMike wrote:
Sun Sep 01, 2019 11:40 pm
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.

Thomas Okken
Posts: 600
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: RTC Calibration program

Post by Thomas Okken » Mon Sep 02, 2019 2:10 am

HPMike wrote:
Mon Sep 02, 2019 1:09 am
toml_12953 wrote:
Mon Sep 02, 2019 12: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 10:15 pm

Re: RTC Calibration program

Post by Ken S » Mon Sep 02, 2019 3:08 am

That is exactly right in Windows 10, if you don't show the file extension you can't change it.

HPMike
Posts: 87
Joined: Fri Jul 21, 2017 9:01 pm
Location: DFW, Texas

Re: RTC Calibration program

Post by HPMike » Mon Sep 02, 2019 3:16 am

Thomas Okken wrote:
Mon Sep 02, 2019 2:10 am
HPMike wrote:
Mon Sep 02, 2019 1:09 am
toml_12953 wrote:
Mon Sep 02, 2019 12: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.

User avatar
ijabbott
Posts: 157
Joined: Fri Dec 15, 2017 1:34 pm
Location: GB-MAN

Re: RTC Calibration program

Post by ijabbott » Mon Sep 02, 2019 7:40 am

HPMike wrote:
Sun Sep 01, 2019 11:40 pm
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: 87
Joined: Fri Jul 21, 2017 9:01 pm
Location: DFW, Texas

Re: RTC Calibration program

Post by HPMike » Mon Sep 02, 2019 6:21 pm

ijabbott wrote:
Mon Sep 02, 2019 7:40 am
HPMike wrote:
Sun Sep 01, 2019 11:40 pm
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.

mcc
Posts: 211
Joined: Fri Jun 23, 2017 3:10 am

Re: RTC Calibration program

Post by mcc » Thu Sep 05, 2019 4:54 pm

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 v.:3.14. / 3.14. as compiled by SwissMicros

Post Reply