Changes

Jump to: navigation, search

URTC-8 Universal RTC for Z80 computers

2,237 bytes added, 08:56, 2 December 2020
/* Prices */
uRTC-8 is a universal RTC that can be connected via a [[UIDE_Universal_IDE_adapter_cards_for_Z-80_computers#Z80_Shims|Z80 Shim]] to any Z80 computer that has a socketed CPU. It is also compatible with the [[UIDE_Universal_IDE_adapter_cards_for_Z-80_computers#Machine-specific_expansion_port_adapters|uIDE-8 PcW expansion port adapters]]. Both of these connectivity options present a 40 way "Z80 Bus" and you can connect uRTC-8 to this bus, in parallel with other devices on the bus.
uRTC-8 uses an 8 bit comparator and a set of jumpers to enable I/O base address selection, just like uIDE-8. The RTC used is an Epson RTC72421 which has 16 registers, directly accessible via IN and OUT instructions. As a result, the base I/O address is a four bit number between 0000 and 1111 (0-15), putting the device at any of the I/O addresses 00h, 10h, 20h, 30h, 40h, 50h, 60h, 70h, 80h, 90h, A0h, B0h, C0h, D0h, E0h or F0h. From any of these base addresses to [base address + 0Fh] are the 16 registers of the Epson RTC. The default base address is 80h, and this is what uRTC.COM expects. Contact me if you need to set a different I/O base address.
uRTC-8 is powered by the host computer, but also has a battery backed supply to maintain the time and date when the host is powered down. The battery is a common CR2032 3v button cell.
Refer to the [[UIDE_Universal_IDE_adapter_cards_for_Z-80_computers|uIDE CPC Wiki page]] for further details on connectivity options. You don't need uIDE-8 in order to use uRTC-8 but you will need to choose a way to connect it to your computer. PCWs can use Z80 shim or the expansion port adapter; other Z80 computers can use the Z80 shim.
 
=== Video Demonstrations ===
 
* Hardware description and Superbrain demo: https://youtu.be/POBRlgAFxmo
* PCW (CP/M Plus) demo: https://youtu.be/CDJlPLYHUEA
=== Pictures of the finished board ===
A uRTC-8 stacked on a uIDE-8 board using plastic stand offs.
 
=== Aux PWR and Aux Batt connectors ===
As supplied, I do not provide header pins for Aux PWR or Aux Batt pads. If you want to use either of them, solder standard 2.54mm pitch header pin pairs and connect to those.
 
* Aux PWR is a 5v power line that is fed from the host computer. It is supplied as a convenience to allow you to provide power to other devices. Do not attempt to use it as a power input.
* Aux Batt is an alternative battery connector, to be used if you do not want to use the built in CR2032 button cell. If you use Aux Batt, you *must* remove the button cell first, and the voltage you need to apply is 3v - 5v. The clock chip can tolerate up to 7v but it is not advisable to go this high as you risk damaging it.
 
For both connectors, observe the connection polarity printed on the PCB.
== Project status ==
=== uRTC.COM ===
Download the latest variant that matches your host computer, rename to uRTC.COM and transfer to your computer. ==== Download link CP/M Plus variant ==== Version 0.2 https://drive.google.com/open?id=1biJngbF-HsDswufP4QZSDSKqk6e34a54 Version 0.1 https://drive.google.com/open?id=1Er7WKz09m9ctzeEk3jxSyDXjDc1OzInK Note: When you set the system time on the PCW (-t option), the second is always set to 0. ==== Superbrain variant ==== Version 0.2 https://drive.google.com/open?id=1UZq4VTQw32Y4G1tUflGlZpAKdPz19NY9
==== Usage ====
usage: uRTC - show date and time from the RTC clock"
uRTC [[dd/mm/yy] [hh:mm[:ss]]] [-ts|p] [-q] - set RTC day/date/time"
-tp t transfer uRTC date/time to CP/M Plus system clock" -ts transfer uRTC date/time to Superbrain host machine system clock"
-q quiet mode, reports errors only"
A>uRTC
Tue 18 Dec 2018 17:05:13
A>uRTC -tpt
CP/M Plus system time set: Tue 18 Dec 2018 17:05:13
You can combine functions as well; so for example
A>uRTC 19/12/18 -tpt
..would set the day of the week to Wednesday and the date to the 19th Dec 2018 on uRTC's clock, then transfer the new date and current uRTC time to the host computer's system clock.
==== Y2K handling ====
==== Setting the system time automatically on the PCW ====
 
Use the CP/M Plus / PCW version of uRTC.COM.
 
To automatically set the PCW system time, add the following line to the PROFILE.SUB file of the boot disk:
uRTC -tpt
Before first use, set the uRTC-8 clock time as shown in the usage section. Now, at each boot, the CP/M Plus system time is set automatically from the battery backed clock on the uRTC-8 board.
==== Setting the system time automatically on the Superbrain ====
 
Use the Superbrain version of uRTC.COM.
 
The Superbrain has no automatic boot command capability; however, if you are using uRTC-8 you can use the XSETCMD.COM program to set an initial boot command. The one you want is:
uRTC -tst
If you are not using uIDE-8 on your Superbrain, you will have to remember to enter the command manually each time you boot. Advanced users may patch the CCP on the boot disk directly to inject the command.
You will also need a copy of INITDIR.COM: [https://drive.google.com/open?id=1EJOk6i24IxBluL8gx61bsn-a5Gl5MGnY Download link]
=== Using timestamps with CP/M plus files ===A full description of how to configure a CP/M Plus system for timestamps can be found on page 592 of the [[http://www.cpm.z80.de/manuals/cpm3-usr.pdf|the CP/M 3 user guide]].
In a nutshell:
Now, use DIR with option [FULL] to see the timestamps (after you've created / updated / accessed any files). You will see the timestamps on the far right of the directory listing. Where a timestamp is missing, it means that the file hasn't been accessed / created / updated since the INITDIR operation.
 
==== Locoscript considerations ====
For PCW users, be aware that Locoscript does not support datestamps on CP/M file systems properly, so it is not recommended to use INITDIR on any disk that is used to store Locoscript files (including CP/M disks you want to read files from within Locoscript).
== Technical info ==
== Prices ==
This is a summary of the prices I have posted to the forum so far.
I am sorry that the assembled prices are what they are, but it is a time consuming and dreary job, not to mention the effort and cost to acquire the parts. [Update Dec 2020] Sadly, the clock chip used in this design has become much more expensive (the last one I bought cost over £10) and there are many counterfeits coming out of China, so it is risky to buy cheaply from there. My last three orders of clock chips turned out to be fake parts - not one of them worked. So I have to buy from the expensive UK vintage chip suppliers. As a result, I have had to put the price of the uRTC up to compensate.
{| class="wikitable"
! Item !! Price
|-
| uRTC-8 assembled || £37£44.00
|-
| Z80 Shim assembled (LHS or RHS) || £17.50
410
edits