• Please review our updated Terms and Rules here

Model III Holmes FDC & Real Time Clock

pavery

Experienced Member
Joined
Dec 29, 2008
Messages
160
Location
New Zealand
I would like to get the RTC going in my Model III which came as a feature on the aftermarket Holmes FDC DX-3D board it has fitted. I renewed the on-board battery, but first relocated it to make future renewals easy. I can't find any docs about this FDC + RTC, so have tried Newclock-80 port addresses. No dice, though I do see seconds I believe ticking away on port 231. However only the "ones" (0-9), no "tens", minutes, hours or date is apparent. I would like to use this RTC with MultiDos.

Anybody have one that works &/or docs/programs for it?

Many thanks
Philip
 
No, I don't know & my machine is now all closed up. However Patrick B's
thread on the same board has a photo of the board, but I can't read the chip number. I'll ask him as he'll have a higher-res photo.
 
The lower right chip appears to have the "<OKI>" logo. It is probably the MSM5832 ...
 
Thanks Jenz. I'll read up on that chip and maybe I'll get lucky outputting a command to a port...

Philip
 
The lower right chip appears to have the "<OKI>" logo. It is probably the MSM5832 ...

That indeed appears to be correct.

Next to the clock chip is a 74ls175 quad flip-flop, my completely uneducated guess is that they’re using that as a latch connected to the address lines of the clock chip. This chip normally takes 16 addresses (checked the newclock-80 manual to confirm); the FDC port in the Model III/4 does not have the full address bus, it’s pre-decoded, so the available range is likely too small to do that. So my guess is they picked a single unused port address to drop that latch in; you write which register on the clock you want to access into the latch and that changes what you see on port 231.

I would suggest trying using OUT to poke values into undocumented ports in the range decoded by the FDC connector and see if instead of incrementing every second the count at 231 slows down accordingly.
 
Thank you all for the replies - we have some success!

The first port I tried (230) seems to be the "latch" port. Sending values 0-12 (as per MSM5832 datasheet) selects all the different registers for subsequent inp(231). I can see time accumulating and it states 24 days since I applied power to the rtc, which would be right..

Now all I need to do is be able to write new values to the rtc. I have no experience with rtc's and I'm presuming that an out 231 will cause a "write" to the selected register. I tried:

out 230,1 ; Select 10's secs
out 231,4 ; Set it to '40'

This appears to write to the '10 secs' register, but writes a zero to it and not a '4' (or any other value I try).

Any thoughts about this please?
 
The datasheet says that’s expected behavior; any write to the 1s/10s registers just resets them to zero. Apparently they expect you to set it to the next closest minute and reset the seconds when you get there.
 
Oh, so it does, thank you Eudimorphodon. Yes, I can now set mins, hours, etc. Wow, can't believe it's that easy - I was preparing for a major battle getting the RTC to work. I'm really enjoying using my Model III in stock/early-80s configuration as I now have the floppy drives working 100% - after a good service which included lubing the various bearings.

Many thanks
 
Well, there was some luck involved in solving it quickly. I first in Basic did a FOR-NEXT loop which constantly INP from a range of ports & displayed on screen. I moved my range downwards from 255 & was delighted when I saw a digit increment every second from 0-9. This was the 'seconds' and it was on port 231. However nothing else incremented.

On learning (above) there was likely only one port address to select the unit required & on studying the datasheet, it was clear sending value 0-12 to a port would likely change what unit appeared at port 231.

1668965173488.png

In the above table S1 & S10 means 'seconds, units' & seconds, 10s', then there's minutes, hours, etc.

So in Basic again, I looped on Print Inp(231) and with an INKEY$ stmt I controlled the various bits in the 'address' field, as above. As luck would have it I chose port 230 first up... and it worked. I could toggle from 10-seconds back to 1-seconds & see them both increment. I then did a FOR-NEXT loop from 0-12 outputting to port 230 and displaying contents from port 231, and lo & behold all the contents of the RTC appeared.

I'll clean up my Basic program which sets & reads the RTC & post it here. Part II of this will be to do the 'reading' program in assembly language & patch the DOS so that on boot up it seamlessly & instantly sets the system date/time from the RTC.
 
Here is the Basic program I wrote to Set & Read the RTC. Note: pokes values into MultiDos, so change maybe required to work with other Dos's. Also, I realise it could be shorter but I've left it this way so it's easy for anyone to modify, say to change from 24hr mode to am/pm.

Philip
 

Attachments

  • RTCSET.TXT
    1.4 KB · Views: 5
Back
Top