DS1390–DS1394
Low-Voltage SPI/3-Wire RTCs with
Trickle Charger
19
Maxim Integrated
The user determines 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
therefore be calculated as follows:
I
MAX
= (3.3V - diode drop) / R2 (3.3V - 0.7V) /
2kΩ≈1.3mA
As the super cap changes, the voltage drop between
V
CC
and V
BACKUP
decreases and therefore the charge
current decreases.
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 (8Fh WRITE, 0Fh READ)
1 0F 16 SELECT
NOTE: ONLY 1010b ENABLES CHARGER
1 OF 2
SELECT
1 OF 3
SELECT
TCS[3:0] = TRICKLE-CHARGE SELECT
DS[1:0] = DIODE SELECT
ROUT[1:0] = RESISTOR SELECT
Figure 8. DS1390–DS1394 Programmable Trickle Charger
MODE CPHA CS SCLK SDI SDO
Disable X High Input Disabled Input Disabled High-Z
Write 0 Low
CPOL* = 0, SCLK Rising;
CPOL = 1, SCLK Falling
Data Bit Latch High-Z
Read 0 Low
CPOL = 0, SCLK Falling;
CPOL = 1, SCLK Rising
X Next Data Bit Shift**
Write 1 Low
CPOL* = 1, SCLK Rising;
CPOL = 0, SCLK Falling
Data Bit Latch High-Z
Read 1 Low
CPOL = 1, SCLK Falling;
CPOL = 0, SCLK Rising
X Next Data Bit Shift**
Table 6. SPI Pin Function
*
CPOL is the clock-polarity bit set in the control register of the host microprocessor.
**
SDO remains at high-Z until 8 bits of data are ready to be shifted out during a read.
DS1390–DS1394
Low-Voltage SPI/3-Wire RTCs with
Trickle Charger
20
Maxim Integrated
SPI Serial-Data Bus
The DS1390/DS1391/DS1394 provide a 4-wire SPI seri-
al-data bus to communicate in systems with an SPI host
controller. The DS1390/DS1391 support SPI modes 1
and 3, while the DS1394 supports SPI modes 0 and 2.
Both devices support single-byte and multiple-byte
data transfers for maximum flexibility. The DIN and
DOUT pins are the serial-data input and output pins,
respectively. The CS input initiates and terminates a
data transfer. The SCLK pin synchronizes data move-
ment between the master (microcontroller) and the
slave (DS1390/DS1391) devices. The shift clock
(SCLK), which is generated by the microcontroller, is
active only during address and data transfer to any
device on the SPI bus. Input data (DIN) is latched on
the internal strobe edge and output data (DOUT) is
shifted out on the shift edge (Figure 9). There is one
clock for each bit transferred. Address and data bits
are transferred in groups of eight.
Address and data bytes are shifted MSB first into the
serial-data input (DIN) and out of the serial-data output
(DOUT). Any transfer requires the address of the byte
to specify a write or read, followed by one or more
bytes of data. Data is transferred out of the DOUT pin
for a read operation and into the DIN for a write opera-
tion (Figures 10 and 11).
The address byte is always the first byte entered after
CS is driven low. The most significant bit (W/R) of this
byte determines if a read or write takes place. If W/R is
0, one or more read cycles occur. If W/R is 1, one or
more write cycles occur.
Data transfers can occur one byte at a time or in multi-
ple-byte burst mode. After CS is driven low, an address
is written to the DS1390/DS1391/DS1394. After the
address, one or more data bytes can be written or
read. For a single-byte transfer, one byte is read or writ-
ten and then CS is driven high. For a multiple-byte
transfer, however, multiple bytes can be read or written
after the address has been written. Each read or write
cycle causes the RTC register address to automatically
increment. Incrementing continues until the device is
disabled. The address wraps to 00h after incrementing
to 0Fh (during a read) and wraps to 80h after incre-
menting to 8Fh (during a write). Note, however, that an
updated copy of the time is only loaded into the user-
accessible copy upon the falling edge of CS. Reading
the RTC registers in a continuous loop does not show
the time advancing.
CPHA = 0
CPHA = 1
CS
SHIFT DATA OUT (READ)
MODE 0
MODE 2
DATA LATCH/SAMPLE (WRITE)
SCLK WHEN CPOL = 0
SHIFT DATA OUT (READ)
DATA LATCH/SAMPLE (WRITE)
DATA LATCH/SAMPLE (WRITE)
MODE 1
MODE 3
SHIFT DATA OUT (READ)
DATA LATCH/SAMPLE (WRITE)
SHIFT DATA OUT (READ)
SCLK WHEN CPOL = 1
Figure 9. Serial Clock as a Function of Microcontroller Clock-Polarity Bit
DS1390–DS1394
Low-Voltage SPI/3-Wire RTCs with
Trickle Charger
21
Maxim Integrated
W/R
A6 A5 A4 A3 A2 A1
A0
D7 D6 D5 D4 D3 D2 D1 D0
CS
SCLK
(MODE 0)
SCLK
(MODE 1)
DIN
DOUT
HIGH IMPEDANCE
Figure 10. SPI Single-Byte Write
CS
SCLK
(MODE 0)
SCLK
(MODE 1)
DIN
DOUT
HIGH IMPEDANCE
W/R A6
A5 A4
A3
A2 A1
A0
D7 D6 D5 D4 D3 D2 D1 D0
Figure 11. SPI Single-Byte Read

DS1391U-3+

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Real Time Clock Low-V SPI/3-Wire With Trickle Charger
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union