Figure 3. alarm mask bits, Special purpose registers, Control register (0eh) – Rainbow Electronics DS1339 User Manual

Page 7

Advertising
background image

DS1339

7 of 18

Figure 3. ALARM MASK BITS

ALARM 1 REGISTER MASK BITS

(BIT 7)

DY/DT

A1M4

A1M3

A1M2

A1M1

ALARM RATE

X

1

1

1

1

Alarm once per second

X

1

1

1

0

Alarm when seconds match

X

1

1

0

0

Alarm when minutes and seconds match

X

1

0

0

0

Alarm when hours, minutes, and seconds match

0

0

0

0

0

Alarm when date, hours, minutes, and seconds match

1

0

0

0

0

Alarm when day, hours, minutes, and seconds match

ALARM 2 REGISTER MASK BITS

(BIT 7)

DY/DT

A2M4

A2M3

A2M2

ALARM RATE

X

1

1

1

Alarm once per minute (00 second of every minute)

X

1

1

0

Alarm when minutes match

X

1

0

0

Alarm when hours and minutes match

0

0

0

0

Alarm when date, hours, and minutes match

1

0

0

0

Alarm when day, hours, and minutes match

SPECIAL PURPOSE REGISTERS

The DS1339 has two additional registers (control and status) that control the RTC, alarms, and square-
wave output.

CONTROL REGISTER (0Eh)

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

EOSC

0

BBSQI

RS2

RS1

INTCN

A2IE

A1IE

EOSC

(Enable Oscillator) – This bit when set to logic 0 starts the oscillator. When this bit is set to a

logic 1, the oscillator is stopped. This bit is enabled (logic 0) when power is first applied.

BBSQI (Battery-Backed Square-Wave and Interrupt Enable) – This bit when set to a logic 1 enables
the square-wave or interrupt output when V

CC

is absent and the DS1339 is being powered by the V

BACKUP

pin. When BBSQI is a logic 0, the SQW/

INT

pin goes high impedance when V

CC

falls below the power-

fail trip point. This bit is disabled (logic 0) when power is first applied.

RS2 and RS1 (Rate Select) – These bits control the frequency of the square-wave output when the
square wave has been enabled. Figure 4 shows the square-wave frequencies that can be selected with the
RS bits. These bits are both set to logic 1 (32kHz) when power is first applied.

Advertising