DS1388
I
2
C RTC/Supervisor with Trickle Charger
and 512 Bytes EEPROM
____________________________________________________________________ 13
Control Register (00Ch)
Bit 7: Enable Oscillator (EOSC). When set to logic 0,
the oscillator is started. When set to logic 1, the oscillator
is stopped when the DS1388 switches to battery power.
This setting can be used to conserve battery power
when timekeeping operation is not required. This bit is
cleared (logic 0) when power is first applied. When the
DS1388 is powered by V
CC
, the oscillator is always on
regardless of the status of the EOSC bit. The clock can
be halted whenever the timekeeping functions are not
required, which minimizes V
BAT
current (I
BACKUPDR
).
Bits 6 to 2: These bits read as zero and cannot be
modified.
Bit 1: Watchdog Enable (WDE). When set to logic
one, the watchdog counter is enabled. When set to
logic 0, the watchdog counter is disabled, and the two
registers can be used as NV RAM. This bit is cleared
(logic 0) when power is first applied.
Bit 0: Watchdog Reset (WD/RST). This bit enables the
watchdog alarm output to drive the RST pin. When the
WD/RST bit is set to logic 1, RST pulses low for t
RST
if
WDE = 1 and the watchdog counter reaches zero.
When the WD/RST bit is set to logic 0, the RST pin is
not driven by the watchdog alarm; only the watchdog
flag bit (WF) in the flag register is set to logic 1. This bit
is logic 0 when power is first applied.
Trickle-Charge Register (00Ah)
The simplified schematic of Figure 5 shows the basic
components of the trickle charger. The trickle-charge
select (TCS) bits (bits 4–7) control the selection of the
trickle charger. To prevent accidental enabling, only a
pattern on 1010 enables the trickle charger. All other
patterns disable it. The trickle charger is disabled when
power is first applied. The diode-select (DS) bits (bits 2
and 3) select whether or not a diode is connected
between V
CC
and V
BACKUP
. If DS is 01, no diode is
selected, yet if DS is 10, a diode is selected. The ROUT
bits (bits 0 and 1) select the value of the resistor con-
nected between V
CC
and V
BACKUP
. Table 3 shows the
resistor selected by the resistor select (ROUT) bits and
the diode selected by the diode-select (DS) bits.
Warning: The ROUT value of 250Ω must not be select-
ed whenever V
CC
is greater than 3.63V.
The user determines the diode and resistor selection
according to the maximum current desired for battery
or super cap charging. The maximum charging current
can be calculated as illustrated in the following exam-
ple. Assume that a system power supply of 3.3V is
applied to V
CC
and a super cap is connected to
V
BACKUP
. Also, assume that the trickle charger has
been enabled with a diode and resistor R2 between
V
CC
and V
BACKUP
. The maximum current I
MAX
would
be calculated as follows:
I
MAX
= (3.3V - diode drop) / R2 (3.3V - 0.7V) / 2kΩ
1.3mA
As the super cap charges, the voltage drop between
V
CC
and V
BACKUP
decreases and therefore the charge
current decreases.
Control Register (00Ch)
BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
EOSC 00000WDEWD/RST
Table 3. Trickle-Charge Register
TCS3 TCS2 TCS1 TCS0 DS1 DS0 ROUT1 ROUT0 FUNCTION
X X X X 0 0 X X Disabled
X X X X 1 1 X X Disabled
X X X X X X 0 0 Disabled
10100101No diode, 250Ω resistor
10101001One diode, 250Ω resistor
10100110No diode, 2kΩ resistor
10101010One diode, 2kΩ resistor
10100111No diode, 4kΩ resistor
10101011One diode, 4kΩ resistor
00000000Initial default value—disabled
DS1388
EEPROM
The DS1388 provides 512 bytes of EEPROM organized
into two blocks of 256 bytes. Each 256-byte block is
divided into 32 pages consisting of 8 bytes per page.
The EEPROM can be written one page at a time. Page
write operations are limited to writing bytes within a sin-
gle physical page, regardless of the number of bytes
actually being written. Physical page boundaries start at
addresses that are integer multiples of the page size (8
bytes) and end at addresses that are integer multiples
of [page size -1]. For example, page 0 contains word
addresses 00h to 07h. Similarly, page 1 contains word
addresses 08h to 0Fh. If a page write command
attempts to write across a physical page boundary, the
result is that the data wraps around to the beginning of
the current page (overwriting data previously stored
there), instead of being written to the next page as
might be expected. Therefore, it is necessary for the
application software to prevent page write operations
that would attempt to cross a page boundary.
I
2
C Serial Data Bus
The DS1388 supports a bidirectional I
2
C bus and data
transmission protocol. A device that sends data onto
the bus is defined as a transmitter and a device receiv-
ing data is defined as a receiver. The device that con-
trols the message is called a master. The devices that
are controlled by the master are slaves. The bus must
be controlled by a master device that generates the
serial clock (SCL), controls the bus access, and gener-
ates the START and STOP conditions. The DS1388
operates as a slave on the I
2
C bus. Connections to the
bus are made through the open-drain I/O lines SDA
and SCL. Within the bus specifications, a standard
mode (100kHz maximum clock rate) and a fast mode
(400kHz maximum clock rate) are defined. The DS1388
works in both modes.
The following bus protocol has been defined (Figure 6):
Data transfer can be initiated only when the bus is
not busy.
During data transfer, the data line must remain stable
whenever the clock line is high. Changes in the data
line while the clock line is high will be interpreted as
control signals.
Accordingly, the following bus conditions have been
defined:
Bus not busy: Both data and clock lines remain
high.
Start data transfer: A change in the state of the data
line from high to low, while the clock line is high,
defines a START condition.
Stop data transfer: A change in the state of the data
line from low to high, while the clock line is high,
defines a STOP condition.
Data valid: The state of the data line represents valid
data when, after a START condition, the data line is
stable for the duration of the high period of the clock
signal. The data on the line must be changed during
the low period of the clock signal. There is one clock
pulse per bit of data.
I
2
C RTC/Supervisor with Trickle Charger
and 512 Bytes EEPROM
14 ____________________________________________________________________
R1
250Ω
R2
2kΩ
R3
4kΩ
V
CC
V
BACKUP
BIT 7
BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
TCS3 TCS2 TCS1 TCS0 DS1 DS0 ROUT1 ROUT0
TRICKLE-CHARGE REGISTER (00Ah)
1 0F 16 SELECT
NOTE: ONLY 1010b ENABLES CHARGER
1 OF 2
SELECT
1 OF 3
SELECT
TCS
0-3
= TRICKLE-CHARGE SELECT
DS
0-1
= DIODE SELECT
ROUT
0-1
= RESISTOR SELECT
Figure 5. Programmable Trickle Charger
Each data transfer is initiated with a START condition
and terminated with a STOP condition. The number
of data bytes transferred between the START and the
STOP conditions is not limited, and is determined by
the master device. The information is transferred
byte-wise and each receiver acknowledges with a
ninth bit.
Acknowledge: Each receiving device, when
addressed, is obliged to generate an acknowledge
(ACK) after the reception of each byte. The master
device must generate an extra clock pulse, which is
associated with this acknowledge bit. The DS1388
does not generate any acknowledge bits if access to
the EEPROM is attempted during an internal pro-
gramming cycle.
A device that acknowledges must pull down the SDA
line during the acknowledge clock pulse in such a
way that the SDA line is stable low during the high
period of the acknowledge-related clock pulse. Of
course, setup and hold times must be taken into
account. A master must signal an end of data to the
slave by generating a not-acknowledge (NACK) bit on
the last byte that has been clocked out of the slave. In
this case, the slave must leave the data line high to
enable the master to generate the STOP condition.
Figures 7 and 8 detail how data transfer is accom-
plished on the I
2
C bus. Depending upon the state of
the R/W bit, two types of data transfer are possible:
Data transfer from a master transmitter to a slave
receiver. The first byte transmitted by the master is
the slave address. Next follows a number of data
bytes. The slave returns an acknowledge bit after
each received byte. Data are transferred with the
most significant bit (MSB) first.
Data transfer from a slave transmitter to a master
receiver. The first byte (the slave address) is trans-
mitted by the master. The slave then returns an
acknowledge bit. Next follows a number of data
bytes transmitted by the slave to the master. The
master returns an acknowledge bit after all received
bytes other than the last byte. At the end of the last
received byte, a NACK is returned.
The master device generates all the serial clock
pulses and the START and STOP conditions. A trans-
fer is ended with a STOP condition or with a repeat-
ed START condition. Since a repeated START
condition is also the beginning of the next serial
transfer, the bus is not released. Data are transferred
with the most significant bit (MSB) first.
DS1388
I
2
C RTC/Supervisor with Trickle Charger
and 512 Bytes EEPROM
____________________________________________________________________ 15
SDA
SCL
IDLE
1–7 8 9 1–7 8 9 1–7 8 9
START
CONDITION
STOP CONDITION
REPEATED START
SLAVE
ADDRESS
R/W ACK ACKDATA ACK/
NACK
DATA
MSB FIRST MSB LSB MSB LSB
REPEATED IF MORE BYTES
ARE TRANSFERRED
Figure 6. I
2
C Data Transfer Overview

DS1388Z-33+

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Real Time Clock I2C RTC/Supervisor w/Trickle Charger
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet