Date : Mon, 24 Aug 1987 20:55:00 MST
From : Jerry Crow <JCrow@HIS-PHOENIX-MULTICS.ARPA>
Subject: Re: No-slot Clocks
RE: ZTIME-1 Clock
My impression was that the term "no slot" clocks was used primarily to
refer to clocks for the IBM PC and compatibles; the ZTIME-1 and friends are
for Z-80 machines. Still, if the "no slot" clocks use ROM/RAM sockets as
an installation/interface mechanism, they could be used on CP/M machines.
I have installed and used both the ZTIME-1 and the Advent clock. These two
clocks are, to the best of my knowledge, the most popular clocks available
for CP/M machines. The Legacy clock also enjoys a following; I am not
familiar with it.
Disclaimers: impressions noted below are based upon events which occurred
two years ago; the products may have changed since then. I have no
connection whatsoever with either of the companies mentioned.
Both the ZTIME-1 and the Advent use the National Semiconductor MM58167A
real time clock chip. This is the same clock that is in the AT and most AT
clones. It is an excellent, general purpose clock chip.
Both clock products are supplied as a piggyback for the Z-80 CPU chip;
i.e., to install the clock boards one removes the Z-80 chip, installs the
Z-80 in a socket on the clock board, and then installs the clock board
itself into the Z-80 socket. Both boards feature battery backup, of
course. The 58167 is very parsimonious WRT power consumption. There is a
pin on the chip which, when it goes low (e.g., when power is removed from
the board), puts the chip into a "power off" mode in which all chip
functions save those required for register maintenance and update are
halted. The spec sheet claims the power consumption in this mode is in the
The ZTIME-1 board is not as fancy or "professional" looking as the Advent
board (the latter has silk screened legends, machine generated traces,
etc.; it just looks like a high quality board), but it functions well. I
installed the ZTIME-1 in a Morrow MD3. Other than a tight physical fit
(the CPU was near the rear of the cabinet and I had to trim one corner of
the ZTIME-1 board to get it to fit) I encountered no problems with the
board. I had to replace the Z-80 because it was soldered in (no socket),
but that's another story; see below. The ZTIME-1 worked the first time I
tested it. I used it with the DateStamper (DS) software from Plu-Perfect
Systems. As noted in an earlier message, the DS package contains a driver
for this clock. I did, however, have to cut a trace and jumper another to
change the I/O address base for the clock because of the I/O map within the
Morrow. More on this below.
I installed the Advent clock in my Kaypro 10. It, too, went in easily and
worked the first time. No physical space problems here. No jumpers either
because of the manner in which the clock is addressed. More on this below.
I migrated the DateStamper software to my Kaypro when I abandoned the
Morrow; the DS package contains a driver for this clock too.
Things to think about:
First, check your system motherboard to see if your CPU chip is socketed.
Most are, but if it isn't you'll have to install a socket to effect
installation of either of these clock boards. Not overly difficult, but
tedious. And, you'll need to get another Z-80 chip. (Believe me, you
don't want to try to remove the one that's solder mounted in the hope of
salvaging it -- cut the pins, throw the chip away, and carefully remove the
leads with a desoldering tool. Install a socket on the motherboard; get
another Z-80 and install it on the clock board. Some may debate this
advice, but in my opinion the price of a Z-80 isn't high enough to justify
attempted removal and reuse of a soldered chip.)
Next, think about I/O port mapping, particularly if you are looking at the
ZTIME-1. The 58167 is designed with address line input to control access
to its internal registers. This design eliminates the need for a "control"
register which, on some chips, is used to select an internal register for
read/write. For example, the 6845 CRT controller has 30+ internal
registers. To access these, one must first write (OUT) a numerical value
into an address register to select one of the other registers, then execute
the IN/OUT command to read/write the desired register. The 58167 design
eliminates the need for this extra level of indirection. The ZTIME-1 and
the Advent, however, have very different mechanisms for interfacing with
these clock chip address lines.
The ZTIME-1 uses its glue chips to map the address lines on the clock chip
directly into the Z-80 I/O port address space. This presents a fairly
straightforward interface to the programmer -- one I/O port for each clock
chip register -- but it requires *32* I/O ports. True, that's only 12% of
the available space, but the kicker is that the ports must be *contiguous*.
The ZTIME-1, thus, requires a port base within your system that allows for
32 contiguous open port addresses. As shipped, the board defaults to
E0-FF. This conflicted with the Morrow port address space (even though
Kenmore's documentation claimed the default configuration would work on an
MD3; maybe they were lucky when they tested it), and I had to modify the
board to change the port base. The change required solder and trace
cutting; no dip switches here. Don't misunderstand -- the board is
designed to be altered in this way and the documentation is clear, but such
alteration does require trace cutting and soldering. I changed the base to
The Advent board is somewhat more sophisticated. It is designed primarily
for Kaypros, though it should work in any Z-80 machine which doesn't
utilize the port address space to which the board is sensitive (80H to
90H). (Advent may offer a generic, non-Kaypro specific version of this
board; I don't know.) The interface on this board is based upon the
operation of the I/O instructions in the Z-80. The "standard", 8080 like,
direct I/O instruction of the Z-80 (IN/OUT <port address>) functions like
its counterpart in the 8080; the port address is placed on the low order
address lines and the contents of the A register is placed on the data
lines and the high order address lines. The Z-80, however, is capable of
indirect I/O instructions which do not exist in the 8080. These indirect
instructions permit IN/OUT instructions to move data from registers other
than the A and permit register based selection of an I/O port address.
When an indirect I/O instruction is executed, the contents of the *B
register* (as opposed to the A) is placed on the high order address lines.
The Advent board utilizes this fact to map the clock chip into a single I/O
port. The lower 5 high order address lines from the Z-80 (A8-A12) are
mapped to the 5 address lines on the clock chip. Thus, the content of the
B register is used to select a clock register. Somewhat more complex from
a programming standpoint, but very conserving of I/O port space. There is,
however, no provision for altering the single port address (90H) which is
used to control the clock. By design, neither this address nor the others
to which the board reacts (80H-90H) conflict with Kaypro architecture. If
this board is being considered for a Z-80 machine other than a Kaypro,
however, the port map situation would have to be investigated.
Both boards come with a disk of support software, including a program to
set/read the clock and various examples of clock interface programs. The
Kenmore package includes clock interface software for MS BASIC 80, generic
C and Turbo Pascal. The Advent package includes all of the above plus a
dBase II routine.
The Advent software is more sophisticated than the Kenmore, but all the
software functioned adequately. I have been using the dBase II routine as
part of my dBase startup file to set the date() variable within dBase from
the clock. This is very handy, as any reader who has used dBase II
extensively will appreciate.
One interesting vagary of this chip: the chip does not have a year
register. So, once a year, you will have to manually update the content of
one of latch registers to reflect the change of year. The DateStamper
software uses the hundredths/tenths of second latch to hold the year. This
alteration takes about 30 seconds with DDT.
Either of these clock boards will provide a useful and convenient real time
clock capability for your Z-80 CP/M machine. The Advent is somewhat
flashier and the support software is a bit more sophisticated; its price is
also, predictably, higher. The Kenmore is more economical, particularly if
it is purchased in kit form (I did not buy the kit).
I no longer have the Morrow, but still use the Kaypro occasionally. My
primary machine is now an AT clone. I strongly recommend the installation
of a real time clock in your machine if you don't have one; they are very
useful and convenient.
The last magazine advertisements I saw had both of these clock products
priced under $100. Haven't seen a Kenmore ad lately, but Advent is in
nearly every issue of Micro Cornucopia and Profiles.
Enjoy your real time clock. Once you use a system which has one, you'll
wonder how you ever got along without it.
-- Jerry Crow