|
DS1385 Datasheet, PDF (6/20 Pages) Dallas Semiconductor – RAMified Real Time Clock 4K x 8 | |||
|
◁ |
DS1385/DS1387
TIME, CALENDAR AND ALARM DATA MODES Table 1
ADDRESS
LOCATION
FUNCTION
DECIMAL
RANGE
RANGE
BINARY DATA MODE
BCD DATA MODE
0
Seconds
0â59
00â3B
00â59
1
Seconds Alarm
0â59
00â3B
00â59
2
Minutes
0â59
00â3B
00â59
3
Minutes Alarm
0â59
00â3B
00â59
4
Hoursâ12âhr Mode
1â12
01â0C AM, 81â8C PM
01â12AM, 81â92PM
Hoursâ24âhr Mode
0â23
00â17
00â23
5
Hours Alarmâ12âhr
1â12
01â0C AM, 81â8C PM
01â12AM, 81â92PM
Hours Alarmâ24âhr
0â23
00â17
00â23
6
Day of the Week
Sunday = 1
1â7
01â07
01â07
7
Date of the Month
1â31
01â1F
01â31
8
Month
1â12
01â0C
01â12
9
Year
0â99
00â63
00â99
USER NONVOLATILE RAM â RTC
The 50 user nonvolatile RAM bytes are not dedicated to
any special function within the DS1385/DS1387. They
can be used by the application program as nonvolatile
memory and are fully available during the update cycle.
This memory is directly accessible in the RTC section.
INTERRUPTS
The RTC plus RAM includes three separate, fully auto-
matic sources of interrupt for a processor. The alarm in-
terrupt can be programmed to occur at rates from once
per second to once per day. The periodic interrupt can
be selected for rates from 500 ms to 122 µs. The
updateâended interrupt can be used to indicate to the
program that an update cycle is complete. Each of
these independent interrupt conditions is described in
greater detail in other sections of this text.
The application program can select which interrupts, if
any, are going to be used. Three bits in Register B en-
able the interrupts. Writing a logic 1 to an interruptâen-
able bit permits that interrupt to be initiated when the
event occurs. A logic 0 in an interruptâenable bit prohib-
its the IRQ pin from being asserted from that interrupt
condition. If an interrupt flag is already set when an in-
terrupt is enabled, IRQ is immediately set at an active
level, although the interrupt initiating the event may
have occurred much earlier. As a result, there are cases
where the program should clear such earlier initiated in-
terrupts before first enabling new interrupts.
When an interrupt event occurs, the relating flag bit is
set to logic 1 in Register C. These flag bits are set inde-
pendent of the state of the corresponding enable bit in
Register B. The flag bit can be used in a polling mode
without enabling the corresponding enable bits. When a
flag is set, an indication is given to software that an inter-
rupt event has occurred since the flag bit was last read.
However, care should be taken when using the flag bits
as they are cleared each time Register C is read.
Double latching is included with Register C so that bits
which are set remain stable throughout the read cycle.
All bits which are set (high) are cleared when read and
new interrupts which are pending during the read cycle
are held until after the cycle is completed. One, two or
three bits can be set when reading Register C. Each uti-
lized flag bit should be examined when read to ensure
that no interrupts are lost.
012496 6/20
|
▷ |