News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Real Time Clock Board

Started by dxs, 19:14, 10 February 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Would you be interested in buying a RTC board?

Yes. Definitely, as a complete standalone.
16 (30.2%)
Only if usable in parallel with the X-MEM.
23 (43.4%)
Only as a module to plug on my physical ROMBOARD I already have.
3 (5.7%)
No thanks.
11 (20.8%)

Total Members Voted: 53

Pollo

#275
It's still a bit sad to see incompatible modern hardware (Symbiface II, Nova, etc...), when commercial-era extensions existed (Dk'Tronics RTC, Dobbertin RTC).

I don't understand why the hardware guys feel the need to reinvent the wheel instead of making compatible hardware extensions.

eto

Quote from: Prodatron on 11:00, 31 March 25I am not sure, if the Nova is more complex to implement, as it has this additional RAM which can be mapped into the CPUs memory as an 8K block.
I would expect that it makes more sense to implement the Symbiface logic. It's unlikely to connect Ulifac and Symbiface in parallel but it's pretty likely to connect the Nova (for it's NVRAM)  in parallel to the Ulifac. Unless of course the Ulifac implements the whole Nova functionality. 

ikonsgr

#277
As i see, both Nova and dxs rtc use a 50pin connector, obviously for direct connection to Amstrad's expansion port (using an MX4 board or an idc to edge/centronics connector cable), so if i add a 50pin female connector on the board, you could plug the rtc module directly on ULIfAC board.
 The other option would be to include a  DS12887A socket to "emulate" the RTC of SYMBiFACE II board.
Fortunately there are still a lot of DS12887A RTC chips available, and in quite cheap prices too! Then, as SYMBiFACE II RTC uses only &FD15 and &FD14 I/O addresses, i suppose i could use a CD74HCT4075E triple 3-input OR gate chip to activate it (use the appropriate 6 address bits that need to be '0' + IORQ=0 as inputs to the OR gates, and use the combined output to drive CS pin of RTC chip).
I will also need the required connections for the RTC chip, so after i consulted this, i came up to this:

AD0–AD7-address/data bus -> To Z80 data bus
MOT - Bus type selection      -> to Gnd (Activate intel mode)
CS - Chip select                     -> Output from OR gate chip
AS - Address strobe              -> Z80 Address bit 0 (&FD15 register select A0=1, &FD14 read/write selected register A0=0, i'm not sure about this as it uses rise/fall of signals and not level...)
R/W - Read/write input          -> WE (Write enable from z80)
DS - Data strobe                    -> RD (Read enable from Z80)
RESET - Reset input               -> Goes to reset button of ULIfAC board
IRQ and SQW are outputs so i suppose they don't need any connections, and also RCLR-RAM clear pin,as it has internal pull up.

Could you advise if the above pinout table is correct?

eto

Quote from: Pollo on 13:01, 31 March 25It's still a bit sad to see incompatible modern hardware (Symbiface II, Nova, DXS RTC, etc...), when commercial-era extensions existed (Dk'Tronics RTC, Dobbertin RTC).
They are also not compatible to each other. DK'Tronics is not even documented and Dobbertin uses an addressing scheme that seems to require a lot of effort to emulate.

And at least in that particular case it doesn't really matter that the logic differs as there is hardly any application that would use it hard coded. It's primarily CP/M where it was used and in CP/M you just switch the utility depending on your hardware.




Prodatron

#279
Quote from: Pollo on 13:01, 31 March 25It's still a bit sad to see incompatible modern hardware (Symbiface II, Nova, DXS RTC, etc...), when commercial-era extensions existed (Dk'Tronics RTC, Dobbertin RTC).

I don't understand why the hardware guys feel the need to reinvent the wheel instead of making compatible hardware extensions.
The DXS RTC is a Dobbertin RTC clone ;)


In general I completely agree, that new hardware should be compatible, so it's really good that Ikonsgr is thinking about this!.

But at 20 years old, the SYMBiFACE II is already a classic hardware extension, which also has several compatible successors (X-Mass, Cyboard, standalone PS/2 mouse adapter) and versatile emulator support.


*EDIT* sorry, it's Cyboard instead of Net4CPC

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Bryce

Quote from: poulette73 on 10:32, 31 March 25Hello,

Probably off-topic, but I'm using the NOVA RTC card from @PulkoMandy which works wonderfully.



This card does not use the Internet : it keeps the date and time permanently, even when the Amstrad CPC/Plus is turned off.  8)
It works with a ROM and is used with an RSX.

More information here :
https://pulkomandy.github.io/shinra.github.io/nova.html
Or by contacting its author.  ;)



Is France still stuck in 2023 ? We've moved on to 2025 here. :D

Bryce.

Prodatron

Quote from: eto on 13:30, 31 March 25Dobbertin uses an addressing scheme that seems to require a lot of effort to emulate.
Yes, it behaves like a ROM, so it is like a memory mapped I/O device.
It is more easy just to have two I/O ports, at least on software side.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

d_kef

Quote from: ikonsgr on 13:25, 31 March 25As i see, both Nova and dxs rtc use a 50pin connector, obviously for direct connection to Amstrad's expansion port (using an MX4 board or an idc to edge/centronics connector cable), so if i add a 50pin female connector on the board, you could plug the rtc module directly on ULIfAC board.
 The other option would be to include a  DS12887A socket to "emulate" the RTC of SYMBiFACE II board.
Fortunately there are still a lot of DS12887A RTC chips available, and in quite cheap prices too! Then, as SYMBiFACE II RTC uses only &FD15 and &FD14 I/O addresses, i suppose i could use a CD74HCT4075E triple 3-input OR gate chip to activate it (use the appropriate 6 address bits that need to be '0' + IORQ=0 as inputs to the OR gates, and use the combined output to drive CS pin of RTC chip).
I will also need the required connections for the RTC chip, so after i consulted this, i came up to this:
AD0–AD7-address/data bus -> To Z80 data bus
MOT - Bus type selection      -> to Gnd (Activate intel mode)
CS - Chip select                    -> Output from OR gate chip
AS - Address strobe              -> Z80 Address bit 0 (&FD15 register select A0=1, &FD14 read/write selected register A0=0, i'm not sure about this as it uses rise/fall of signals and not level...)
R/W - Read/write input          -> WE (Write enable from z80)
DS - Data strobe                    -> RD (Read enable from Z80)
RESET - Reset input              -> Goes to reset button of ULIfAC board
IRQ and SQW are outputs so i suppose they don't need any connections, and also RCLR-RAM clear pin,as it has internal pull up.
Could you advise if the above pinout table is correct?
+1 for the SF2 RTC (DS12887) or NOVA.
If you go for the DS12887 then you should know that the DS12R887 variant is still in production.
I've been using it for the Cyboard which is open hardware so you can get all the info you need and of course I'm available for any questions that may arise.

d_kef

Pollo

#283
The RTC situation is quite a mess. Let's rethink it:
* The Dobbertin is a kludge on top of a ROM.
* The Dk'Tronics uses an additional Z80 pio chip for no good reason.
*The Nova is an NVRAM extension first, to be used for debugging, the RTC just being an included freebie in the chip.
* The Symbiface II RTC seems to be the proper deal with versatile support.

eto

Does the PIC have some spare pins left? If yes, could it could use a very cheap RTC with I2C and emulate the DS12887 functionality of the Symbiface? DS1307 board go for about 1€ if accuracy is not too important. Or DS3231 boards for less than 5€ with a few seconds per month deviation. 

Bryce

Just for info. I made a prototype RTC based on a DCF77 receiver a looong time ago. No idea where it is now, but it was very simple and of course as accurate as you can get. Maybe that should also be considered as an option if someone is creating a new device?

Bryce.

ikonsgr

#286
Quote from: eto on 14:58, 31 March 25Does the PIC have some spare pins left? If yes, could it could use a very cheap RTC with I2C and emulate the DS12887 functionality of the Symbiface? DS1307 board go for about 1€ if accuracy is not too important. Or DS3231 boards for less than 5€ with a few seconds per month deviation.
That would be a good idea, but i'm afraid there is nothing left on both PIC mcu's to support extra functions! :)
So in order to do that, it would need an extra PIC MCU which will add board size +cost + development time considerably, thus i don't think it's worth it, as most of Amstrad users don't care for RTC anyway.
 My thought was to add some kind of an RTC connector (like the amiga kit's RTC module that plugs onto the trapdoor Ram expansion) to plug a ready-made RTC board for anyone needed (thus not adding additional cost for people that don't want it), but unfortunately as @polo noted, RTC on CPC is quite a mess, there is nothing like  "standard connector" for RTC support ...  :(

@d_kef, Cyboard is indeed a good idea, if there is a way to "extract" the RTC part and add it to ULIfAC board. Unfortunately i couldn't load schematics file (i'm using DIPTRACE as pcb designing tool, which supports eagle projects, but it gives me an error when i tried to load sch file). If RTC part includes only RTC chip + some logic, and you can provide the required connections, maybe i could add it to ULIfAC board (i suppose something similar to what i proposed here: https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/real-time-clock-board/msg249384/#msg249384)
In any case ,for now, the only viable solution is to add a 50pin connector, for plugging Nova and dxs rtc boards.
 

poulette73

#287
Quote from: Bryce on 13:41, 31 March 25Is France still stuck in 2023 ? We've moved on to 2025 here. :D
Bryce.
LOL  ;D

Hello Bryce,
My screen capture is old... I took it from a photo posted on CPC Rulez..  :P


d_kef

Quote from: ikonsgr on 17:23, 31 March 25d_kef, Cyboard is indeed a good idea, if there is a way to "extract" the RTC part and add it to ULIfAC board. Unfortunately i couldn't load schematics file (i'm using DIPTRACE as pcb designing tool, which supports eagle projects, but it gives me an error when i tried to load sch file).

You only need to drive 3 pins: DS, AS, R/W. For address decoding I use a 2x4input AND and a GAL and I don't think you can avoid them easily.
But you can certainly fit the 3 ICs on a small PCB and separate completely the RTC from the rest of the circuit.

Here is the schematic
You cannot view this attachment.

and the GAL equations

/*  Cyboard for Amstrad CPC - I/O address decoding logic                  */
/*  Copyright (C) 2023 Dimitris Kefalas                                   */

/*  This program is free software: you can redistribute it and/or modify  */
/*  it under the terms of the GNU General Public License as published by  */
/*  the Free Software Foundation, either version 3 of the License, or     */
/*  (at your option) any later version.                                   */

/*  This program is distributed in the hope that it will be useful,       */
/*  but WITHOUT ANY WARRANTY; without even the implied warranty of        */
/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         */
/*  GNU General Public License for more details.                          */

/*  You should have received a copy of the GNU General Public License     */
/*  along with this program.  If not, see <http://www.gnu.org/licenses/>. */

Name     cyboard;
PartNo   01 ;
Date     7/02/2023 ;
Revision 01 ;
Designer Dimitris Kefalas ;
Company  ;
Assembly none;
Location IC4 ;
Device   g20v8a ;

/* *************** INPUT PINS *********************/
PIN  1 = A0                      ; /*                                 */
PIN  2 = A1                      ; /*                                 */
PIN  3 = A2                      ; /*                                 */
PIN  4 = A3                      ; /*                                 */
PIN  5 = A4                      ; /*                                 */
PIN  6 = A5                      ; /*                                 */
PIN  7 = A6                      ; /*                                 */
PIN  8 = A7                      ; /*                                 */
PIN  9 = A8                      ; /*                                 */
PIN 10 = A9                      ; /*                                 */
PIN 11 = A1X                     ; /*A15 & A14 & A13 & A12 & A11 & A10*/
/* PIN 12 = GND                                                       */
PIN 13 = !IOREQ                  ; /*                                 */
PIN 14 = !RD                     ; /*                                 */
PIN 23 = !WR                     ; /*                                 */

/* *************** OUTPUT PINS *********************/
PIN 15 = CFA3                    ; /* CF card A3 line                 */
PIN 16 = !W5CS                   ; /* W5100S module Chip select       */
PIN 17 = !PINT                   ; /* PIC Interrupt line              */
PIN 18 = RTCAS                   ; /* RTC Address Strobe              */
PIN 19 = !RTCRW                  ; /* RTC Read/Write                  */
PIN 20 = !RTCDS                  ; /* RTC Data Strobe                 */
PIN 21 = !CFLED                  ; /* CF card activity LED            */
PIN 22 = !CFCS                   ; /* CF card Chip Select             */
/* PIN 24 = VCC                                                       */


/* Logic */

RTCRW =   IOREQ & A1X & WR & !RD & A8 & !A9 & !A7 & !A6 & !A5 & A4 & !A3 & A2 & !A1 & !A0;

RTCDS =   IOREQ & A1X & !WR & RD & A8 & !A9 & !A7 & !A6 & !A5 & A4 & !A3 & A2 & !A1 & !A0;

RTCAS =   IOREQ & A1X & WR & !RD & A8 & !A9 & !A7 & !A6 & !A5 & A4 & !A3 & A2 & !A1 & A0;

PINT =    IOREQ & A1X & RD & !WR & A8 & !A9 & !A7 & !A6 & !A5 & A4 & !A3 & !A2 & !A1 & !A0;

CFA3 =    !A3;

CFCS =    IOREQ & A1X & A8 & !A9 & !A7 & !A6 & !A5 & !A4 & !A3 & A2 & A1
        # IOREQ & A1X & A8 & !A9 & !A7 & !A6 & !A5 & !A4 & A3;

CFCSLED = IOREQ & A1X & A8 & !A9 & !A7 & !A6 & !A5 & !A4 & !A3 & A2 & A1
        # IOREQ & A1X & A8 & !A9 & !A7 & !A6 & !A5 & !A4 & A3;

W5CS =    IOREQ & A1X & A8 & !A9 & !A7 & !A6 & A5 & !A4 & !A3 & !A2;


d_kef

ikonsgr

Thanks @d_kef:)
Now, i took a look at RTC chip pinout and the 3 GAL equations for RTC:
RTCRW =   IOREQ & A1X & WR & !RD & A8 & !A9 & !A7 & !A6 & !A5 & A4 & !A3 & A2 & !A1 & !A0;
RTCDS =   IOREQ & A1X & !WR & RD & A8 & !A9 & !A7 & !A6 & !A5 & A4 & !A3 & A2 & !A1 & !A0;
RTCAS =   IOREQ & A1X & WR & !RD & A8 & !A9 & !A7 & !A6 & !A5 & A4 & !A3 & A2 & !A1 & A0;

Now, instead of having CS to Gnd (always enable),and have complex logic for RW, DS,AS of RTC chip, i thought an alternative of activating CS using an OR gate chip that will combine the 6 address bits for &FBD14/&FBD15 ports that need to be '0' + IORQ=0 , and only then, CS will be active (='0')! AFAIK, there is no device or internal function of CPC that sets the specific 6 address bits at '0' at the same time upon I/O request, so i believe no other address bits will be needed to specifically select RTC chip.
The other 2 pins of RW and DS can go directly to WR and RD of Z80 as this is their function in intel mode (MOT->gnd)
And that leave us with AS (Adress strobe), which is exactly the same with RTCRW except for A0 which is inserted directly and not inverted (!A0). I thought of using A0 on AS pin but i don't know if it will work that way.
What do you think?

d_kef

I think that partial address decoding will not be a problem.
Regarding the /CS signal I'm not sure. It's been a long time since I was experimenting with it and I'm pretty sure I took a similar approach that didn't work out. Maybe I'm wrong though. 

Please take a look at the DS12887 datasheet. I think there is a reason /CS is tied to ground but I'm not sure. I'll also take a look at it tomorrow and try to remember...

d_kef

d_kef

#291
@ikonsgr
QuoteFrom the DS12R887 datasheet:

Chip-Select Input. The active-low chip-select signal must be asserted low for a bus cycle in the DS12R885 to be accessed. CS must be kept in the active state during DS and AS for Motorola timing and during DS and R/W for Intel timing. Bus cycles that take place without asserting CS latch addresses, but no access occurs. When VCC is below VPF volts, the DS12R885 inhibits access by internally disabling the CS input. This action protects the RTC data and the RAM data during power outages.

Also the only relevant time parameter for Intel bus timing is tcs: Chip-Select Setup Time Before DS or R/W.

So it seems that your implementation should work and now that I looked at it, it seems more logical than mine.
That been said I'm still sure I had problems with it. ::)
I could re-test it in the weekend if you are interested.

edit: regarding AS, I think it's impossible to just have it connected to A0 as the Z80 puts the memory refresh address in the address bus in every machine cycle.

d_kef

ikonsgr

@d_kef that would be very nice, if you could test my implementation, thanks! About AS, you think the only way to work right is to implement this multiple AND of so many signals? IOREQ & A1X & WR & !RD & A8 & !A9 & !A7 & !A6 & !A5 & A4 & !A3 & A2 & !A1 & A0
Anyway, if there is no other way to put RTC in the board, unless a GAL is also used, maybe i could add the extra logic i'm using in ULIfAC II to the GAL (two 14pin Logic gate chips), along with your equations, and so i could end up with only the GAL and the two 3-state buffers chips also existed (btw does GAL supports 3-state buffers with enable? Then perhaps i could also add to GAL the functions of the one 3-state buffer chip too)
Maybe it's time to learn GAL programming...  :)

GUNHED

Quote from: ikonsgr on 23:52, 30 March 25I revive the thread for asking a relative question:
 I would like to add an RTC connector to the upcoming ULIfAC II board i'm developing (mostly a ULIfAC having two 512k sram chips, to offer 512k Expansion RAM + 32x Rom board at the same time) , so i was wondering if you can suggest what would be the best and most popular RTC solution, and where i could find the required connector pinout for it?
For example, i found URTC-8 project, but i don't know if it is the most popular (thus useful) rtc board, and also there is no info about the pinout of it's 40pin connector either... ::) 
To use the dsx clone of Dobbertins TimeROM is a great idea. This clock has the following advantages:
- Conains a battery which lasts for 20-30 years (my 1987 clock still works!)
- Battery can be exchanges (see dxs board)
- This clock has (at least in Germany) the most commercial success
- For this clock you have the most / best software available. See Dobbertins TimeROM ROM which great features.
- Support for all mayor OS on CPC: Native OS, CP/M 2.2, 63K CP/M 2.2, CP/M Plus, FutureOS and more...
- It's cheap
- And it's very easy to program
- It doesn't waste ports, because it uses Memory mapped I/O in the ROM space
- It's save: No port collision no compatibility issues

Just the best choice!!!

As alternative (#2 in ranking) I would suggest the SF2 solution of the RTC.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

ikonsgr

@GUNHED, as already noted, to support dsx board, the only thing needed, is to add a 50pin expansion female connector, to plug the board directly on ULIfAC II board.
The thing is, how many such boards are out there and does this board is still available?
Although this is the "Easy way" to add RTC support, the other way (of adding a SF2 RTC clone), provided that will only require the DS12R887 RTC chip and a GAL chip (possibly a 22V10 that will also provide extra logic for ULIfAC board to replace the 2 logic gate chips), could offer an RTC support with minimum extra cost (even if someone don't want RTC, i could offer ULIfAC II board having only the socket of the RTC ;) ), as i suppose the cost of the RTC chip is much smaller than getting a dsx or NOVA board.
 If i'm not mistaken them main usage of the RTC would be with CP/M+ and symbos OS, i know that SF2 RTC supports symbos but does it support CP/M too?

ikonsgr

#295
I took a look at Dobbertin's smart watch and if i get it right,  the original RTC , only needs the smart watch rom, and this: https://www.ebay.com/itm/335554259901
In that case, and since with ULIfAC you can easily mount smart watch rom (without needing an actual eprom chip), the only thing you will need to add at ULIfAC's II board, is the DS1216 adapter which must be connected exactly like amsdos rom on CPC 6128?
And if you see here: https://www.ebay.com/sch/i.html?_nkw=DALLAS+DS1216&_sacat=0&_from=R40&_trksid=m570.l1313&_odkw=DALLAS+DS1216&_osacat=0&_sop=15
There are still 1000's DS1216 available at very low prices! :)
If that's the case, then as @GUNHED noted, dobbertin's smart watch is indeed the best choice for adding RTC to the board, as apart from offering the most functions and compatibility, it would be  very easy to add it on ULIfAC II board too (just an extra 28pin socket for the DS1216 adapter...), without needing any extra logic ic's or gal!  ;)

d_kef

Quote from: ikonsgr on 00:15, 03 April 25There are still 1000's DS1216 available at very low prices! :)
If that's the case, then as GUNHED noted, dobbertin's smart watch is indeed the best choice for adding RTC to the board, as apart from offering the most functions and compatibility, it would be  very easy to add it on ULIfAC II board too (just an extra 28pin socket for the DS1216 adapter...), without needing any extra logic ic's or gal!
You could even use the DS1244 which is still in production and a drop-in replacement according to AD.

d_kef

Pollo

#297
Quote from: ikonsgr on 03/04/2025 01:15:39
If that's the case, then as @GUNHED noted, dobbertin's smart watch is indeed the best choice for adding RTC to the board, as apart from offering the most functions and compatibility, it would be  very easy to add it on ULIfAC II board too (just an extra 28pin socket for the DS1216 adapter...), without needing any extra logic ic's or gal!  

It is more convenient from an hardware standpoint.
But less convenient from a software standpoint.

GUNHED

#298
Quote from: Pollo on 07:52, 03 April 25It is more convenient from an hardware standpoint.
But less convenient from a software standpoint.
No, its extremely easy to use the Dobbertin / dxs SmartWatch Chip. Just reading (writing) from (to) an address in the memory. Not even an I/O command is needed. The complete driver is about 30 bytes and the source code is available. :-)

And as mentioned, for this clock there is by far the most supporting software.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Pollo

The Dobbertin can be installed on any rom.
How do you know at what address you can find it?

Powered by SMFPacks Menu Editor Mod