beautypg.com

Rainbow Electronics DS1642 User Manual

Page 3

background image

DS1642

3 of 11

SETTING THE CLOCK

The 8th bit of the control register is the write bit. Setting the write bit to a 1, like the read bit, halts
updates to the DS1642 registers. The user can then load them with the correct day, date and time data in
24-hour BCD format. Resetting the write bit to a 0 then transfers those values to the actual clock counters
and allows normal operation to resume.

STOPPING AND STARTING THE CLOCK OSCILLATOR

The clock oscillator may be stopped at any time. To increase the shelf life, the oscillator can be turned off

to minimize current drain from the battery. The

OSC

bit is the MSB for the seconds registers. Setting it to

a 1 stops the oscillator.

FREQUENCY TEST BIT

Bit 6 of the day byte is the frequency test bit. When the frequency test bit is set to logic 1 and the
oscillator is running, the LSB of the seconds register will toggle at 512 Hz. When the seconds register is
being read, the DQ0 line will toggle at the 512 Hz frequency as long as conditions for access remain valid

(i.e.,

CE

low, and

OE

low) and address for seconds register remain valid and stable.

CLOCK ACCURACY

The DS1642 is guaranteed to keep time accuracy to within

±

1 minute per month at 25

°

C. The clock is

calibrated at the factory by Dallas Semiconductor using special calibration nonvolatile tuning elements.
The DS1642 does not require additional calibration and temperature deviations will have a negligible
effect in most applications. For this reason, methods of field clock calibration are not available and not
necessary.

DS1642 REGISTER MAP – BANK1 Table 2

DATA

ADDRESS

B7

B6

B5

B4

B3

B2

B1

B0

FUNCTION

7FF

-

-

-

-

-

-

-

-

YEAR

00-99

7FE

X

X

X

-

-

-

-

-

MONTH

01-12

7FD

X

X

-

-

-

-

-

-

DATE

01-31

7FC

X

FT

X

X

X

-

-

-

DAY

00-23

7FB

X

X

-

-

-

-

-

-

HOUR

00-59

7FA

X

-

-

-

-

-

-

-

MINUTES

00-59

7F9

OSC

-

-

-

-

-

-

-

SECONDS

00-59

7F8

W

R

X

X

X

X

X

X

CONTROL

A

OSC

= STOP BIT

R = READ BIT

FT = FREQUENCY TEST

W = WRITE BIT

X = UNUSED

NOTE:

All indicated “X” bits are not dedicated to any particular function and can be used as normal RAM bits.