26
FN8232.8
August 12, 2010
Alarm Operation Examples
Following are examples of both Single Event and periodic
Interrupt Mode alarms.
EXAMPLE 1
Alarm 0 set with single interrupt (IM=”0”)
A single alarm will occur on January 1 at 11:30am.
A. Set Alarm 0 registers as follows:
B. Also the AL0E bit must be set as follows:
After these registers are set, an alarm will be generated when
the RTC advances to exactly 11:30am on January 1 (after
seconds changes from 59 to 00) by setting the AL0 bit in the
status register to “1”.
EXAMPLE 2
Pulsed interrupt once per minute (IM = ”1”)
Interrupts at one minute intervals when the seconds register
is at 30s.
A. Set Alarm 0 registers as follows:
B. Set the Interrupt register as follows:
Note that the status register AL0 bit will be set each time the
alarm is triggered, but does not need to be read or cleared.
ALARM0
REGISTER
BIT
DESCRIPTION76543210HEX
SCA0 00000000 00hSeconds disabled
MNA0 10110000 B0hMinutes set to 30,
enabled
HRA0 10010001 91hHours set to 11,
enabled
DTA0 10000001 81hDate set to 1,
enabled
MOA0 10000001 81hMonth set to 1,
enabled
DWA0 00000000 00hDay of week
disabled
CONTROL
REGISTER
BIT
DESCRIPTION76543210HEX
INT 00100000 x0hEnable Alarm
ALARM0
REGISTER
BIT
DESCRIPTION76543210HEX
SCA0 10110000B0hSeconds set to 30,
enabled
MNA0 0000000000hMinutes disabled
HRA0 00000000 00hHours disabled
DTA0 00000000 00hDate disabled
MOA0 00000000 00hMonth disabled
DWA0 00000000 00hDay of week disabled
CONTROL
REGISTER
BIT
DESCRIPTION76543210HEX
INT 10100000 x0hEnable Alarm and Int
Mode
ISL12027, ISL12027A