1305.PDF

(318 KB) Pobierz
DS1305
Serial Alarm Real Time Clock (RTC)
www.dalsemi.com
FEATURES
§
Real time clock counts seconds, minutes,
hours, date of the month, month, day of the
week, and year with leap year compensation
valid up to 2100
§
96-byte nonvolatile RAM for data storage
§
Two Time of Day Alarms - programmable
on combination of seconds, minutes, hours,
and day of the week
§
Serial interface supports Motorola Serial
Peripheral Interface (SPI) serial data ports or
standard 3-wire interface
§
Burst Mode for reading/writing successive
addresses in clock/RAM
§
Dual power supply pins for primary and
backup power supplies
§
Optional trickle charge output to backup
supply
§
2.0 - 5.5 volt operation
§
Optional industrial temperature range -40°
C
to +85°
C
§
Available in space-efficient 20-pin TSSOP
package
PIN ASSIGNMENT
V
CC2
V
BAT
X1
NC
X2
NC
INT0
NC
INT1
GND
1
2
3
4
5
6
7
8
9
10
20
19
18
17
16
15
14
13
12
11
V
CC1
NC
PF
V
CCIF
SD0
SDI
SCLK
NC
CE
SERMODE
DS1305 20-Pin TSSOP (173-mil)
V
CC2
V
BAT
X1
X2
NC
INT0
INT1
GND
1
2
3
4
5
6
7
8
16
15
14
13
12
11
10
9
V
CC1
PF
V
CCIF
SDO
SDI
SCLK
CE
SERMODE
ORDERING INFORMATION
DS1305
DS1305N
DS1305E
DS1305EN
16-Pin DIP
16-Pin DIP (Industrial)
20-Pin TSSOP
20-Pin TSSOP (Industrial)
DS1305 16-Pin DIP (300-mil)
1 of 22
08/10/99
D1305
PIN DESCRIPTION
- Primary Power Supply
- Backup Power Supply
- +3 Volt Battery Input
- Interface Logic Power Supply
Input
GND
- Ground
X1, X2
- 32,768 Hz Crystal Connection
- Interrupt 0 Output
INT0
INT1
- Interrupt 1 Output
SDI
- Serial Data In
SDO
- Serial Data Out
CE
- Chip Enable
SCLK
- Serial Clock
SERMODE - Serial Interface Mode
PF
- Power Fail Output
V
CC1
V
CC2
V
BAT
V
CCIF
DESCRIPTION
The DS1305 Serial Alarm Real Time Clock provides a full BCD clock calendar which is accessed via a
simple serial interface. The clock/calendar provides seconds, minutes, hours, day, date, month, and year
information. The end of the month date is automatically adjusted for months with less than 31 days,
including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with
AM/PM indicator. In addition 96 bytes of nonvolatile RAM are provided for data storage.
An interface logic power supply input pin (V
CCIF
) allows the DS1305 to drive SDO and
PF
pins to a level
that is compatible with the interface logic. This allows an easy interface to 3-volt logic in mixed supply
systems.
The DS1305 offers dual power supplies as well as a battery input pin. The dual power supplies support a
programmable trickle charge circuit which allows a rechargeable energy source (such as a super cap or
rechargeable battery) to be used for a backup supply. The V
BAT
pin allows the device to be backed up by
a non-rechargeable battery. The DS1305 is fully operational from 2.0 to 5.5 volts.
Two programmable time of day alarms are provided by the DS1305. Each alarm can generate an interrupt
on a programmable combination of seconds, minutes, hours, and day. “Don’ care” states can be inserted
t
into one or more fields if it is desired for them to be ignored for the alarm condition. The time of day
alarms can be programmed to assert two different interrupt outputs or to assert one common interrupt
output. Both interrupt outputs operate when the device is powered by V
CC1
, V
CC2
, or V
BAT
.
The DS1305 supports a direct interface to Motorola SPI serial data ports or standard 3-wire interface. A
straightforward address and data format is implemented in which data transfers can occur 1 byte at a time
or in multiple-byte burst mode.
OPERATION
The block diagram in Figure 1 shows the main elements of the Serial Alarm RTC. The following
paragraphs describe the function of each pin.
2 of 22
DS1305
DS1305 BLOCK DIAGRAM
Figure 1
SIGNAL DESCRIPTIONS
V
CC1
- DC power is provided to the device on this pin. V
CC1
is the primary power supply.
V
CC2
- This is the secondary power supply pin. In systems using the trickle charger, the rechargeable
energy source is connected to this pin.
V
BAT
- Battery input for any standard 3-volt lithium cell or other energy source.
V
CCIF
(Interface Logic Power Supply Input)
- The V
CCIF
pin allows the DS1305 to drive SDO and
PF
out-put pins to a level that is compatible with the interface logic, thus allowing an easy interface to 3-volt
logic in mixed supply systems. This pin is physically connected to the source connection of the p-channel
transistors in the output buffers of the SDO and
PF
pins.
SERMODE (Serial Interface Mode Input)
-
The SERMODE
pin offers the flexibility to choose
between two serial interface modes. When connected to GND, standard 3-wire communication is
selected. When connected to V
CC
, Motorola SPI communication is selected.
SCLK (Serial Clock Input)
- SCLK is used to synchronize data movement on the serial interface for
either the SPI or 3-wire interface.
SDI (Serial Data Input)
- When SPI communication is selected, the SDI pin is the serial data input for
the SPI bus. When 3-wire communication is selected, this pin must be tied to the SDO pin (the SDI and
SDO pins function as a single I/O pin when tied together).
SDO (Serial Data Output)
- When SPI communication is selected, the SDO pin is the serial data output
for the SPI bus. When 3-wire communication is selected, this pin must be tied to the SDI pin (the SDI and
SDO pins function as a single I/O pin when tied together).
3 of 22
DS1305
CE (Chip Enable)
- The Chip Enable signal must be asserted high during a read or a write for both 3-
wire and SPI communication. This pin has an internal 55K pull-down resistor (typical).
INT0
(Interrupt 0 Output)
- The
INT0
pin is an active low output of the DS1305 that can be used as an
interrupt input to a processor. The
INT0
pin can be programmed to be asserted by only Alarm 0 or can be
programmed to be asserted by either Alarm 0 or Alarm 1. The
INT0
pin remains low as long as the status
bit causing the interrupt is present and the corresponding interrupt enable bit is set. The
INT0
pin operates
when the DS1305 is powered by V
CC1
, V
CC2
, or V
BAT
. The
INT0
pin is an open drain output and requires
an external pull-up resistor.
INT1
(Interrupt 1 Output)
- The
INT1
pin is an active low output of the DS1305 that can be used as an
interrupt input to a processor. The
INT1
pin can be programmed to be asserted by Alarm 1 only. The
INT1
pin remains low as long as the status bit causing the interrupt is present and the corresponding
interrupt enable bit is set. The
INT1
pin operates when the DS1305 is powered by V
CC1
, V
CC2
, or V
BAT
.
The
INT1
pin is an open drain output and requires an external pull-up resistor.
Both
INT0
and
INT1
are open drain outputs. The two interrupts and the internal clock continue to run
regardless of the level of V
CC
(as long as a power source is present). However, it is important to insure
pullup resistors used with the interrupt pins are never pulled up to a value which is greater than V
CCX
+
0.3V. It is also required to insure that during backup operation mode, the voltage present at INT0 and
INT1
does never exceed the voltage of the backup source. At all times the current on each interrupt
should not exceed 4.0 mA at V
CC
= 5V, or 1.5 mA at V
CC
= 2.5V.
PF
(Power Fail Output)
- The
PF
pin is used to indicate loss of the primary power supply (V
CC1
).
When V
CC1
is less than V
CC2
or is less than V
BAT
, the
PF
pin will be driven low.
X1, X2
- Connections for a standard 32.768 kHz quartz crystal. The internal oscillator is designed for
operation with a crystal having a specified load capacitance of 6 pF. For more information on crystal
selection and crystal layout considerations, please consult Application Note 58, “Crystal Considerations
with Dallas Real Time Clocks.” The DS1305 can also be driven by an external 32.768 kHz oscillator. In
this configuration, the X1 pin is connected to the external oscillator signal and the X2 pin is floated.
4 of 22
DS1305
RTC AND RAM ADDRESS MAP
The address map for the RTC and RAM registers of the DS1305 is shown in Figure 2. Data is written to
the RTC by writing to address locations 80h to 9Fh and is written to the RAM by writing to address
locations A0h to FFh. RTC data is read by reading address locations 00h to 1Fh and RAM data is read by
reading address locations 20h to 7Fh.
ADDRESS MAP
Figure 2
CLOCK, CALENDAR, AND ALARM
The time and calendar information is obtained by reading the appropriate register bytes. The real time
clock registers are illustrated in Figure 3. The time, calendar, and alarm are set or initialized by writing
the appropriate register bytes. Note that some bits are set to zero. These bits will always read 0 regardless
of how they are written. Also note that registers 12h to 1Fh (read) and registers 92h to 9Fh are reserved.
These registers will always read 0 regardless of how they are written. The contents of the time, calendar,
and alarm registers are in the Binary-Coded Decimal (BCD) format.
5 of 22
Zgłoś jeśli naruszono regulamin