M48T86
Clock operations
3.5
Alarm interrupt
The alarm interrupt provides the system processor with an interrupt when a match is made
between the RTC's hours, minutes, and seconds bytes and the corresponding alarm bytes.
The three alarm bytes can be used in two ways. First, when the alarm time is written in the
appropriate hours, minutes, and seconds alarm locations, the alarm interrupt is initiated at
the specified time each day if the Alarm Interrupt Enable bit (Register B; Bit 5) is high. The
second use is to insert a “Don't care” state in one or more of the three alarm bytes. The
“Don't care” code is any hexadecimal value from C0 to FF. The two most significant bits of
each byte set the “Don't care” condition when at logic '1.' An alarm will be generated each
hour when the “Don't care” is are set in the hours byte. Similarly, an alarm is generated
every minute with “Don't care” codes in the hour and minute alarm bytes. The “Don't care”
codes in all three alarm bytes create an interrupt every second.
ct(s) 3.6
Update cycle interrupt
du After each update cycle, the Update Cycle Ended Flag bit (UF) (Register C; Bit 4) is set to a
ro ) '1.' If the Update Interrupt Enable bit (UIE) (Register B; Bit 4) is set to a '1,' and the SET bit
P t(s (Register B; Bit 7) is a '0,' then an interrupt request is generated at the end of each update
cycle.
solete roduc 3.7
Oscillator control bits
b P When the M48T86 is shipped from the factory the internal oscillator is turned off. This
- O te feature prevents the lithium energy cell from being discharged until it is installed in a system.
) le A pattern of “010” in Bits 4-6 of Register A will turn the oscillator on and enable the
t(s o countdown chain. A pattern of “11X” will turn the oscillator on, but holds the countdown
s chain of the oscillator in reset. All other combinations of Bits 4-6 keep the oscillator off.
roduc ) - Ob 3.8
Update cycle
P t(s The M48T86 executes an update cycle once per second regardless of the SET bit (Register
te c B; Bit 7). When the SET bit is asserted, the user copy of the double buffered time, calendar,
le du and alarm bytes is frozen and will not update as the time increments. However, the time
so ro countdown chain continues to update the internal copy of the buffer. This feature allows
accurate time to be maintained, independent of reading and writing the time, calendar, and
b P alarm buffers. This also guarantees that the time and calendar information will be
O teconsistent. The update cycle also compares each alarm byte with the corresponding time
lebyte and issues an alarm if a match or if a “Don't care” code is present in all three positions.
so There are three methods of accessing the real time clock that will avoid any possibility of
b obtaining inconsistent time and calendar data. The first method uses the update-ended
O interrupt. If enabled, an interrupt occurs after every update cycle which indicates that over
999ms are available to read valid time and date information. If this interrupt is used, the
IRQF Bit (Register C; Bit 7) should be cleared before leaving the interrupt routine.
A second method uses the Update-In-Progress (UIP) bit (Register A; Bit 7) to determine if
the update cycle is in progress. The UIP bit will pulse once per second. After the UIP bit
goes high, the update transfer occurs 244 µs later. If a low is read on the UIP bit, the user
has at least 244 µs before the time/calendar data will be changed. Therefore, the user
17/36