News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Amstrad PCW RTC

Started by torrind, 00:19, 25 December 18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

torrind

Hi Folks,


Firstly, Merry Christmas - Hope you all get everything you want.... ;D


What I'd like Father Christmas to bring me is a RTC addon for my PCW8256 - I've found instructions to build one in German, but this isn't much good to me.


Do any of you good people have any ideas / suggestions how easy this is to achieve?


As always, your suggestions are most welcome...


Regards,


Darren

JonB

#1
Hi Darren

Not too tricky. An 8 bit address decode using a comparator chip and a DS1302 RTC, followed by code to read / write the RTC and a small "run and exit" FID to set the system time at bootup. Needs a latch, too, I think. With this you'd have 8 GPIO pins and 3 are needed by the RTC - so the other 5 pins you could use for other purposes.

The main problem will be connecting this to the PCW (use a Z80 shim, maybe) and the cost of the components. The rest of it is straightforward. If you have a uIDE installed it would be even easier, but you need to design / build a PCB.

Let me think a bit. Sounds like a useful project.

torrind

Thanks Jon -


That would be most appreciated.


I don't have a uIDE, although I'd love one...




Darren

GeoffB17

#3
Hmm, no idea about the how, but I'd find one pretty useful.   I had one, and it was a help.

The one I had was an add-on - or should this be an add-in - for the CPS8256 unit.   You needed to upen up the box, prise out the SIO chip (I think it was that one, add in the extra card which included the battery and the clock chip, and then plug the SIO chip back into the new socket).   All went OK, it worked fine.   I had quite a few disks set up to expand the DIR info for date/times, this was useful when I was programming.   I don't think it's working now, as the battery has gone from lack of use.   Or maybe it DID still work, but did not keep any change for very long?

The problem NOW is that the expansion slot is not available for the CPS box, as it's occupied by Jon's uIDE connector which is much more important.   So how to get around that?   If Jon can get around that??

Just found the little doc for the thing.   It was the SCA Real Time Clock Module.   You needed to remove the 'Z80 DART' chip, not sure if that's the same as the SIO?   No need to refit the removed component, the card must have had a new one fitted.   The package includes a prog, TIME.COM, to obtain or set the time stored, plus GETCLOCK.BAS which allows BASIC to access the system time/date.

I'll keep my fingers crossed.   After all, it IS Christmas!!

Geoff

JonB

Hmm, well, I am trying to think of the best / most cost effective way to implement it.

The lazy way would be to use the address decoding mechanism of the uIDE (comparator) and bolt a RTC onto it. I'd have to build it so that the uIDE plugged into it. Either that or you'd need to use something like the Z80 bus card I proposed.

Geoff, you ought to use a Z80 shim if you need access to the expansion port...

CraigsBar

I'd love one of these too, I have no IDE in my PcW (yet) so if there is a combined solution then I'd love to have an RTC in my PCW :)

IRC:  #Retro4All on Freenode

JonB

Just for fun, then...

The board is called uRTC-8 and it is similar to uIDE-8, except it has a battery backed RTC on-board instead of an IDE port. You will need to add a connector to your Z80 bus cable when connecting it to a PCW that is equipped with uIDE-8 - this is a 40 way cable mounted female IDC socket. I'll probably produce a simple bus board,too.

GUNHED

That's amazing! IDE and RTC in one! Like the Symbiface II for the CPC.  :)


I definitely would prefert the uIDE with RTC too. It's great that things can be made so easy (well, if you can deal with hardware of course).  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

JonB

#8
No, they are separate boards that you would connect in parallel to the Z80 bus. Exiting uIDE owners need a viable upgrade path, and of course I want to fit the RTC to other Z80 machines.

You're still going to need the v1.15 CP/M that accepts FID files, though. I intend to provide a FID that will read time and date and initialise the PcW's in built clock at every boot, and the card will be supplied with utilities to get and set the date / time on the RTC.

"Made so easy"... hmm, I think my Mrs would have a thing or two to say about that. I spend a lot of time in my study doing this stuff. The board itself isn't complete yet... I'll post up a 3D render of it when done, but I have a lot of other stuff on the go right now.

In other words, the device is coming, but not too soon..

GUNHED

Take all the time you need. It will come, and that is what counts.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

GeoffB17

Yes, I'd like one of the RTC devices please.

I think I understand that it may add onto the existing uIDE cable, hopefully leaving space for other similar devices to be added later??

Make it easier to do things with date/time stamping of files, although I think I remember problems with INITDIR and 2k dates?   Most (all ?) of the other CP/M utilities had been officially updated to make them 2k compliant, but not INITDIR?   Or was it just that this update was 'unofficial'?

Geoff

torrind

I'd certainly want one when the times comes  ;D

JonB

#12
I want to make them cheaply, but the RTC is costly for some reason and of course there is the board and other components plus time to assemble.

Yes, I got the description of the connector wrong, Geoff. You'll need a FEMALE IDC socket crimped onto your existing Z80 bus cable, same orientation as the uIDE plug. And yes, you can add more if you like, but you will probably want to build a sort of chassis to hold them apart. I will put holes in the uRTC board at the same location as the uIDE-8, then you can just screw them together using PCB stand offs.

So... this leads me to that other holy grail, which is booting off the uIDE-8. For this we are going to need a set of additional connections between the boot board and the expansion port adapter. This is what the "Unused" port is for - it is present on the Video and Lite adapters:


[attach=2,msg173145]


So we'll need to carry some of these lines to the boot board using jumpers or a ribbon cable of some sort. About now, I am rather wishing I'd arranged this connector as 2x3 rows because it would have been easier to attach a ribbon cable to it, but at the time I expected to be using individual jumper wires if I ever needed to actually use the thing!

I expect it will look a bit like the file I attached below, only much, much neater..

By the way, the "boot module" and "uRTC module" are just dummies for illustration (boot module is an 8080 ICE card and the uRTC module is another uIDE-8).


torrind

It's all sooo exciting! :D

GeoffB17

Jon, I don't want to cramp your style, but I'm not sure I'd be that worried about booting from the uIDE.

I've got no problem booting from the floppy, and this is very much a 'retro' computer, and booting from the floppy is about as 'retro' as you can get.   Also, not sure how booting from the uIDE would cope with booting different systems, booting different versions of, say. Locoscript, or using games that need to boot from disk.

I find that the benefit of having the uIDE at boot time is still a massive plus.   Yes, loading the EMS file, then the FID, then PROFILE.SUB from the floppy takes a little time, but then it's much faster, with the C: drive set as the default instead of M: and all the files that I might have needed to transfer from disk to M: staying on C: (marked as SYSTEM so they're accessible from all user areas) the whole operation of the machine is much better.

Maybe if my 3" drive dies (again) I'll need to think again, but it should last a while yet?

I'll keep an eye of your progress in this area, anyway.

Geoff

JonB

#15
I guess you haven't see my Superbrain uIDE demo video?


https://www.youtube.com/watch?v=8hshdu2_P7Q

This implementation gives a choice - to boot from the floppy drive or uIDE. I'm not sure how I'd do this on the PCW (what with its awful boot scheme) but at the very least I can imagine a switch on the boot board that disables it for floppy boot.

As you infer, the life of floppy disks and drives is limited. That's a good reason why you might want to boot from uIDE. I'm not sure about booting different systems, you might be able to just copy a different EMS / EMT file to C:, but in the case of CP/M it needs to be patched to pick up the PROFILE.SUB from C: rather than A:. Locoscript is likely to be be no different (and I'm not going to be patching that).

I will do the uRTC first as I still am not sure how to implement uIDE boot.

TynH

Quote from: torrind on 11:23, 12 April 19
I'd certainly want one when the times comes  ;D


Me too! Haven't had the opportunity to actually fit the uIDE module yet but at least it's waiting for me back home on my desk.  :D

JonB

Alright lads, it's "game on"!

GUNHED

Wonderful, my PcW just needs an RTC!  :)  I mean CP/M Plus is made for timestamps.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

JonB

#19
Initial board layout.


[attach=1,msg173420]

JonB

Quote from: TynH on 08:01, 16 April 19

Me too! Haven't had the opportunity to actually fit the uIDE module yet but at least it's waiting for me back home on my desk.  :D

Oh, you are in for fun...

@GUNHED stop "liking" and start commenting... ;)

GUNHED

Ha, I would give you an XXXL box of likes more if I could. Since I'm a software person I can't comment that much. However it looks neat, cleaned up and also it's a good idea to be able to alter the base address (I assume that's what the jumpers are for).
Regarding software, it should be very easy to use the watch: Read data and set the CP/M Plus clock. Nothing special needed. Just some GETRTC.COM in the profile.sub file.  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

JonB

#22
Actually, a small FID that unloads immediately after setting the clock from the RTC was what I had in mind, but if you are using uIDE then you probably want the getrtc.com on C: so it will load quicker.

Now, I've had a little play with some spare boards. Take a close look at the attachments.

IMG_5470 shows two boards sandwiched together with plastic PCB standoffs, and then connected to a PCW Expansion port adapter with a 40 way IDC "Z80 bus" cable. Suppose one of these is a uIDE-8 and the other is a uRTC-8... this is what your setup might look like.

IMG_5471 is a close up of the boards, showing the standoffs. In practice I would expect uIDE-8 to be at the top and the uRTC-8 at the bottom (as it has no indicator lights), but there's no reason not to swap them around if you like.

So, the board's laid out. Dare I order a batch before building and testing a prototype...?  :o

PS, Yes, the base address is alterable. Hence "Universal" RTC. It can be fitted to any Z80 machine having a socketed CPU, same as uIDE. And I am a software guy too, and my electronics knowledge is largely self taught.

Cheers
JonB

GUNHED

Excellent pictures, and good to see a bus system for the PcW.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

JonB

Sorry Gunhed, it is not a PcW bus system, it's a Z80 bus system.

Anyway... the boards are on order, despite me not having built a prototype yet. Might be a waste of money (especially if there are errors!) but we will see.

Powered by SMFPacks Menu Editor Mod