RTC setting

298 views
Skip to first unread message

b.de...@comcast.net

unread,
Nov 2, 2022, 10:57:42 PM11/2/22
to RC2014-Z80
Does anyone have instruction for the RTC module?    I cannot find any here or elsewhere.  I can Initialize and put in all the 2 character data.  (Day?)  But nothing gets set.  If I enter the date and time and then press S to set the time, it’s still all zeros.  I assume Sunday is day 01 but I’m just guessing.  I have tried for days to find any instructions with no luck.
-Brian

b.de...@comcast.net

unread,
Nov 2, 2022, 11:02:18 PM11/2/22
to RC2014-Z80

BTW I have the Zed Pro with ROMWBW in ROM  and CF card
-Brian

Douglas Miller

unread,
Nov 3, 2022, 8:41:16 AM11/3/22
to RC2014-Z80
Are you talking about the RC2014 DS1302 board? That device must be bit-banged, so the software is more complicated. I thought RomWBW already had a driver for the DS1302, so aren't there RomWBW commands/calls for setting it and reading TOD? Are you asking about how to use RomWBW, or are you writing code to directly access the DS1302? Or something else like using CP/M commands to set the time?

michael....@gmail.com

unread,
Nov 3, 2022, 9:35:29 AM11/3/22
to RC2014-Z80
Brian,

If you are using ROMWBW you can boot ZSDOS (choose the Z boot selection) then run 

LDDS       - loads the driver.
TD S         - to set the date and time
ZCAL       - display the current months calendar. 

If you have a battery backed RTC then when you boot you should see a line like this :

DSRTC: MODE=STD IO=0x0C Thu 2022-11-03 13:29:50 CHARGE=OFF

Regards,
Mikew

Spencer Owen

unread,
Nov 3, 2022, 9:36:04 AM11/3/22
to rc201...@googlegroups.com
Hi Brian,

The documentation you're looking for is on Eds GitHub page here; https://github.com/electrified/rc2014-ds1302-rtc 

Thanks

Spencer

On Thu, 3 Nov 2022 at 02:57, b.de...@comcast.net <b.de...@comcast.net> wrote:
Does anyone have instruction for the RTC module?    I cannot find any here or elsewhere.  I can Initialize and put in all the 2 character data.  (Day?)  But nothing gets set.  If I enter the date and time and then press S to set the time, it’s still all zeros.  I assume Sunday is day 01 but I’m just guessing.  I have tried for days to find any instructions with no luck.
-Brian

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/ffd379cb-3388-4f5f-94a8-63a26c40f506n%40googlegroups.com.

Wayne Warthen

unread,
Nov 3, 2022, 3:05:15 PM11/3/22
to RC2014-Z80
Hi Brian,

On Wednesday, November 2, 2022 at 7:57:42 PM UTC-7 b.de...@comcast.net wrote:
Does anyone have instruction for the RTC module?    I cannot find any here or elsewhere.  I can Initialize and put in all the 2 character data.  (Day?)  But nothing gets set.  If I enter the date and time and then press S to set the time, it’s still all zeros.  I assume Sunday is day 01 but I’m just guessing.  I have tried for days to find any instructions with no luck.

It sounds like you are using the RTC.COM application included with RomWBW to try and manipulate the RTC.  That is perfectly fine, but as you have seen, it is not terribly user friendly.  In fact, RTC.COM was originally written (long ago) as a simple tool to test the RTC chip when it was first used in the original hardware that RomWBW targeted.  The commands are (minimally) documented in the "RomWBW Applications Manual".  If that is not enough to wrestle it into submission, then post some more questions here.

OK, with that said, I think you are using the RTC tool correctly.  Indeed, you use the (I)nitialize command to set up the date/time values followed by (S)et to actually program them into the RTC.  Subsequently, you should be able to use (L)oop to display the current date/time which should increment appropriately.  You may have a hardware issue if that is not working.

FYI, it is the intention of RomWBW to provide RTC services to the OSes themselves.  Unfortunately, CP/M 2.2 has no concept of a clock.  However, both ZSDOS and CP/M 3 do.  Under ZSDOS, use the LDDS command to load the clock driver, then use the TD command to set or display the time.  Under CP/M 3 use the DATE command to set or display the date and time.  Hmmm... a warning.  I am not sure, but the CP/M 3 adaptation in RomWBW in the current release version of RomWBW (v3.0.1) may not have RTC stuff fully implemented.  Use ZSDOS or the development branch of RomWBW.

Thanks,

Wayne




Brian Denley

unread,
Nov 3, 2022, 5:57:27 PM11/3/22
to rc201...@googlegroups.com
Wayne:
Thanks! I just wanted my Zed Pro to know the time and date.  Didn’t think it would be quite so difficult.  ROMWBW sets up several ‘disks’ but they seem to be much the same although one is set up for Wordstar.  No other applications that I have seen yet.  Not sure what these drives are set up for but they all work!

My Zed Pro seems to have ROMWBW in rom (rom/ram module) and again on the CF card module.  The system all works well except for the WiFi card.  I will try that again one day.

I am used to CPM 2.2 and 3.0.  I have three Osbornes here (along with a replica 8080, PDP-8 and PDP-11).

Brian
KB1VBF
Sent from my iPad

On Nov 3, 2022, at 3:05 PM, Wayne Warthen <wwar...@gmail.com> wrote:

Hi Brian,
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.

Wayne Warthen

unread,
Nov 3, 2022, 10:26:00 PM11/3/22
to RC2014-Z80
On Thursday, November 3, 2022 at 2:57:27 PM UTC-7 b.de...@comcast.net wrote:
Thanks! I just wanted my Zed Pro to know the time and date.  Didn’t think it would be quite so difficult.

Yeah, the problem is that back in the day, date/time handling varied a lot between hardware systems and OSes.  RomWBW abstracts the hardware, but the OS must still have some concept of date/time file stamping or it would not be much use.  The RTC.COM app is really just intended to test your RTC hardware (although it is quite capable of setting and reading the date/time).
 
ROMWBW sets up several ‘disks’ but they seem to be much the same although one is set up for WordStar.  No other applications that I have seen yet.  Not sure what these drives are set up for but they all work!

There are 6 slices (filesystems) in the standard disk image (used for CF, SD, etc.).  The first 5 of these are bootable OSes (CP/M 2.2, ZSDOS, NZCOM, CP/M 3, and ZPM).  I suppose booting from each of these does appear similar since OSes of the day shared many similarities including the command line interface.  The 6th (and last) slice is WordStar.  The intention is to provide a wide array of possible OSes you can start using under RomWBW.  Typically, you would just start your favorite OS by booting from the associated slice and ignore the other slices.  The WordStar slice makes WordStar available to all of the OSes.  Additionally, RomWBW is designed so that you can create and add your own slices with whatever applications you like.

All of this is documented (although maybe not perfectly) in the "RomWBW Getting Started" document.  Probably worth a read if you have not done so yet.

My Zed Pro seems to have ROMWBW in rom (rom/ram module) and again on the CF card module.  The system all works well except for the WiFi card.  I will try that again one day.

The ROM module contains pared down versions of CP/M 2.2 and ZSDOS.  Yes, they are duplicative of the contents of the first two slices of your CF Card, but they are provided as a way to help people get started even if they do not have a working CF Card.

I am used to CPM 2.2 and 3.0.  I have three Osbornes here (along with a replica 8080, PDP-8 and PDP-11).

Ah, well you should be right at home with RomWBW slice 0 (CP/M 2.2) and slice 3 (CP/M 3).

Good luck!

-Wayne
Reply all
Reply to author
Forward
0 new messages