CHAPTER 7. REAL-TIME CLOCK
The ZT 8905 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
•
50 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 below.
The topics that follow illustrate the programmable registers for the real-time clock.
Real-Time Clock Register Addressing
Address
Function
Range
Offset
0h
Time-Seconds
0-59
1h
Alarm-Seconds
0-59
2h
Time-Minutes
0-59
3h
Alarm-Minutes
0-59
4h
Time-Hours
1-12
(12 hour mode)
4h
Time-Hours
0-23
(24 hour mode)
5h
Alarm-Hours
0-23
6h
Day of Week
1-7
7h
Date of Month
1-31
8h
Month
1-12
9h
Year
0-99
Ah-Dh
Register A-D
----
Eh-3Fh
General Purpose
----
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com