Datasheet
Clock Accuracy
The accuracy of the clock is dependent upon the accuracy
of the crystal and the accuracy of the match between the
capacitive load of the oscillator circuit and the capacitive
load for which the crystal was trimmed. Additional error is
added by crystal frequency drift caused by temperature
shifts. External circuit noise coupled into the oscillator
circuit may result in the clock running fast. Figure6 shows
a typical PC board layout for isolating the crystal and
oscillator from noise. Refer to
ApplicationNote58:Crystal
Considerations with Dallas Real-Time Clocks for detailed
information
RTC Address Map
Table 3 shows the address map for the device registers.
During a multibyte access, when the address pointer
reaches the end of the register space (10h), it wraps
around to location 00h. On an I
2
C START or address
pointerincrementingtolocation 00h,thecurrenttimeis
transferred to a second set of registers. The time infor-
mation is read from these secondary registers, while the
clock may continue to run. This eliminates the need to
re-read the registers in case of an update of the main
registers during a read.
Time and Date Operation
The time and date information is obtained by reading the
appropriate register bytes. Table 3 shows the RTC reg-
isters.Thetimeanddatearesetorinitializedbywriting
the appropriate register bytes. The contents of the time
and date registers are in the BCD format. The device can
be run in either 12-hour or 24-hour mode. Bit 6 of the
HOURSregisterisdefinedasthe12-or24-hourmode-
selectbit.Whenhigh,the12-hourmodeisselected.Inthe
12-hourmode,bit5istheAM/PM bit with logic high being
PM.Inthe24-hourmode,bit5isthe20-hourbit(20to
23 hours). All hours values, including the alarms, must be
re-entered whenever the 12/24-hour mode bit is changed.
TheCenturybit(bit7oftheMONTHregister)istoggled
whentheYEARregister overflowsfrom99to00.Ifthe
Century bit is logic 0, the year will be designated as a
LeapYearandFebruarywillcontain29days.
If the Century bit is logic 1, the year will not be designated
asaLeapYearandFebruarywillcontain28days.
TheDay-Of-Weekregisterincrementsatmidnight.Values
that correspond to the day of week are user-defined, but
must be sequential (i.e., if 1 equals Sunday, then 2 equals
Monday and so on). Illogical time and date entries result
in undefined operation.
When reading or writing the time and date registers,
secondary (user) buffers are used to prevent errors when
theinternalregistersupdate.Whenreadingthetimeand
dateregisters, the userbuffersare synchronized tothe
internal registers on a START or when the address pointer
rollsoverto00h.Thecountdownchainisresetwhenever
thesecondsregisteriswritten.Writetransfersoccurson
the acknowledge pulse from the device. To avoid rollover
issues, once the countdown chain is reset, the remaining
time and date registers must be written within one sec-
ond.Ifenabled,the1Hzsquare-waveoutputtransitions
high500msafterthesecondsdatatransfer,providedthe
oscillator is already running.
DS1339B Low-Current, I
2
C, Serial Real-Time Clock
For High-ESR Crystals
www.maximintegrated.com
MaximIntegrated
│
9










