URTC-8 Universal RTC for Z80 computers

From CPCWiki - THE Amstrad CPC encyclopedia!
Revision as of 08:28, 24 April 2019 by JonB (Talk | contribs)

Jump to: navigation, search
uRTC-8 board render from OshPark
uRTC-8 3D render from KiCad

About uRTC-8

uRTC-8 is a universal RTC that can be connected via a Z80 shim to any Z80 computer that has a socketed CPU. It 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.

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.

uRTC-8 is designed to work on the Z80 bus implemented by uIDE-8. The intention is that the board is connected to the Z80 bus in parallel to uIDE-8 to provide a means to set the host computer's clock at boot time, automatically. Initial implementation will be for the Amstrad PcW word processor.

Project status

As of this time (April 2019), the uRTC boards are designed and in fabrication. Work has started on the utilities.

Downloads

Along with the device itself, there are downloadable utilities:

  • uRTC.COM allows the user to set and get the time on the RTC chip.
  • uRTCTX.com transfers the time and date to the host computer's operating system (normally CP/M). If you have uIDE-8 installed, add a call to this program to your PROFILE.SUB and locate the program on an IDE partition so it loads and runs faster.
  • uRTCTX.FID performs the same function as uRTCTX.COM, except as a FID (field installable driver). Use this to set the PcW system clock when booting into LocoScript (also works under CP/M but is slower to load than a copy of uRTCTX.COM that's sitting on a uIDE partition).

uRTC.COM

Use to set or display the time and date on uRTC-8.

usage: uRTC - show date and time from the RTC clock"
       uRTC [[day] [dd/mm/yy] [hh:mm[:ss]]] [-b ADDR]"
		set RTC day/date/time"
		-b ADDR specify alternative uRTC base I/O register"
		        (default is A0)"

The following examples should illustrate its use:

 A>uRTC
 Tue 10 Nov 2017 12:42:36
 A>uRTC 18/12/18
 Tue 18 Dec 2018 12:42:52
 A>uRTC 17:05
 Tue 18 Dec 2018 17:05:00
 A>uRTC 17:05:55
 Tue 18 Dec 2018 17:05:55
 A>uRTC
 Tue 18 Dec 2018 17:05:13

uRTCTX.COM

A small utility that copies the time from uRTC-8 to the PCW's CP/M internal clock. Install it to the boot disk and call from PROFILE.SUB. If you have uIDE-8 installed, copy it to an IDE drive and call from PROFILE.SUB for improved speed.

uRTCTX.FID

A small FID that copies the time from uRTC-8 to the PCW's CP/M internal clock. Install it to the boot disk / start of day disk and it will run each time the PcW cold boots. (Note, requires CP/M Plus v.1.15 or higher).

Technical info

This is the technical application manual for the 72421 RTC chip used in uRTC-8.

File:Rtc72421 appman.pdf