70
7. REAL-TIME CLOCK
The ZT 8904 includes one Motorola
®
-compatible 146818 real-time clock. The real-time
clock provides clock and 100-year calendar information in addition to 242 bytes of
CMOS setup static RAM. These functions are battery backed for continuous operation
even in the absence of system power. The RAM is used by the operating system BIOS
to store configuration information. The major features of the real-time clock are listed
below.
•
Timekeeping to a 1 second resolution
•
More than 200 bytes of CMOS setup RAM
•
Leap year compensation
•
Daylight Savings Time compensation
•
Periodic, Alarm, and Update Ended interrupts
•
Battery backed
PROGRAMMABLE REGISTERS
The real-time clock includes 64 register locations. These registers are accessed through
I/O port locations 70h and 71h. A real-time clock register is accessed by first writing the
offset address of the register to I/O port location 70h. Data is then transferred to or from
the register through I/O port location 71h. This sequence must be repeated to read the
same register a second time. The I/O port addressing for the real-time clock is given in
the "
Real-Time Clock Register Addressing
" table following.
The following topics illustrate the programmable registers for the real-time clock.