Dallas DS1371U+ I2c, 32-bit binary counter Datasheet

DS1371
I C, 32-Bit Binary Counter
Watchdog Clock
2
www.maxim-ic.com
General Description
Features
The DS1371 is a 32-bit binary counter that is
designed to continuously count time in seconds.
An additional counter that can generate a
periodic alarm or serve as a watchdog timer is
also provided. If enabled as a watchdog timer,
the watchdog strobe input pin provides a
hardware reset of the counter. If disabled, this
counter can be used as 3 Bytes of generalpurpose RAM. A configurable output can be
used as an interrupt or provide a square wave at
one of four selectable frequencies. The device is
programmed serially through a I2C bidirectional
bus.
32-Bit Binary Counter
24-Bit Binary Counter Provides Periodic
Alarm, Watchdog Timer, or RAM
Strobe Input to Reset Watchdog Timer
Single Output Configurable as Interrupt or
Square Wave
I2C Serial Interface
Low-Voltage Operation
Operating Temperature Range:
-40°C to +85°C
Available in 8-Pin μSOP
Ordering Information
Applications
Servers
Point-of-Sale Equipment
Portable Instruments
Elapsed Time Measurements
PART
TEMP RANGE
PINPACKAGE
TOP
MARK
DS1371U
-40°C to +85°C
8 μSOP
1371
DS1371U+
-40°C to +85°C
8 μSOP
1371
+Denotes a lead-free/RoHS-compliant package. A + appears on the top
mark for lead-free packages.
Typical Operating Circuit
Pin Configuration
TOP VIEW
8
VCC
7
SQW/INT
3
6
SCL
4
5
SDA
X1
1
X2
2
WDS
GND
DS1371
μSOP
1 of 15
REV: 070607
DS1371
ABSOLUTE MAXIMUM RATINGS
Voltage Range on VCC Pin Relative to Ground………………………………………………………..-0.3V to +6.0V
Voltage Range on SDA, SCL, and WDS Relative to Ground…………………………………..-0.3V to (VCC +0.5V)
Operating Temperature Range (noncondensing)……………………………………………………...-40°C to +85°C
Storage Temperature Range………………………………………………………………………….-55°C to +125°C
Soldering Temperature…………………………………………………………………...See IPC/JEDEC J-STD-020
Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. These are stress ratings only,
and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the
specifications is not implied. Exposure to absolute maximum rating conditions for extended periods can affect device reliability.
RECOMMENDED DC OPERATING CONDITIONS
(TA = -40°C to +85°C)
PARAMETER
Supply Voltage (Note 1)
Input Logic 1 (Notes 2, 3)
Input Logic 0 (Notes 2, 3)
SYMBOL
MIN
TYP
MAX
UNITS
VCC
VIH
VIL
1.7
0.7 VCC
-0.3
3.3
5.5
VCC + 0.3
0.3VCC
V
V
V
DC ELECTRICAL CHARACTERISTICS
(VCC = 1.7V to 5.5V, TA = -40°C to +85°C, unless otherwise noted.) (Note 4)
PARAMETER
Supply Voltage (Note 1)
Oscillator Operating Voltage
Range (Note 1)
Input Leakage
I/O Leakage
SDA Logic 0 Output (Note 1)
SQW/INT Logic 0 Output
(Note 1)
Active Supply Current
Timekeeping Current
(Oscillator Enabled, INTCN = 1)
Timekeeping Current
(Oscillator Enabled, INTCN = 0)
Data Retention Current
(Oscillator Disabled)
SYMBOL
CONDITIONS
MIN
TYP
MAX
UNITS
VCC
1.7
5.5
V
VOSC
1.3
5.5
V
1
1
μA
μA
3
mA
ILI
ILO
IOLSDA
IOLSQW
(Note 2)
(Note 3)
VCC > 2V; VOL = 0.4V
VCC < 2V; VOL = 0.2VCC
VCC > 2V; VOL = 0.4V
1.7V < VCC < 2V;
VOL = 0.2VCC
1.3V < VCC < 1.7V;
VOL = 0.2VCC
3.0
3.0
250
μA
150
μA
ICCA
(Note 5)
IOSC0
(Notes 6, 7)
800
nA
IOSC1
(Notes 6, 7)
1300
nA
IDDR
(Note 6)
100
nA
2 of 15
100
mA
DS1371
AC ELECTRICAL CHARACTERISTICS
(VCC = 1.7V to 5.5V, TA = -40°C to +85°C, unless otherwise noted.) (Note 8)
PARAMETER
SCL Clock Frequency (Note 9)
Bus Free Time Between STOP and
START Conditions
Hold Time (repeated) START Condition
(Note 10)
SYMBOL
fSCL
tBUF
tHD:STA
Low Period of SCL Clock
tLOW
High Period of SCL Clock
tHIGH
Data Hold Time (Notes 11, 12)
tHD:DAT
Data Setup Time (Note 13)
tSU:DAT
Start Setup Time
tSU:STA
Rise Time of Both SDA and SCL
Signals (Note 9)
CONDITIONS
Fast mode
Standard mode
Fast mode
Standard mode
Fast mode
Standard mode
Fast mode
Standard mode
Fast mode
Standard mode
Fast mode
Standard mode
Fast mode
Standard mode
Fast mode
Standard mode
Fast mode
tR
MIN
100
0
1.3
4.7
0.6
4.0
1.3
4.7
0.6
4.0
0
0
100
250
0.6
4.7
20 +
0.1CB
20 +
0.1CB
20 +
0.1CB
20 +
0.1CB
0.6
4.7
TYP
MAX
400
100
kHz
μs
μs
μs
μs
0.9
0.9
μs
ns
μs
300
ns
B
Standard mode
UNITS
1000
B
Fall Time of Both SDA and SCL Signals
(Note 9)
Fast mode
tF
300
ns
B
Standard mode
300
B
Setup Time for STOP Condition
Capacitive Load for Each Bus Line
(Note 7)
Pulse Width of Spikes that Must be
Suppressed by the Input Filter (Note 14)
tSU:STO
Fast mode
Standard mode
μs
400
CB
B
TSP
Fast mode
30
pF
ns
Watchdog Strobe (WDS) Pulse Width
tWDS
100
ns
Oscillator Stop Flag (OSF) Delay
(Note 8)
tOSF
100
ms
Note 1: All voltages are referenced to ground.
Note 2: SCL and WDS only.
Note 3: SDA and SQW/INT.
Note 4: Limits at -40°C are guaranteed by design and not production tested.
Note 5: ICCA—SCL clocking at max frequency = 400kHz. WDS inactive.
2
Note 6: Specified with WDS input and I C bus inactive, SCL = SDA = VCC.
Note 7: Measured with a 32.768kHz crystal attached to the X1 and X2 pins.
Note 8: The parameter tOSF is the period of time the oscillator must be stopped in order for the OSF flag to be set over the voltage range of 1.3V
≤ VCC ≤ VCCMAX.
Note 9: A fast mode device can be used in a standard mode system, but the requirement tSU:DAT ≥ to 250ns must then be met. This is
automatically the case if the device does not stretch the LOW period of the SCL signal. If such a device does stretch the LOW period of
the SCL signal, it must output the next data bit to the SDA line tR MAX + tSU:DAT = 1000 + 250 = 1250ns before the SCL line is released.
Note 10: After this period, the first clock pulse is generated.
Note 11: A device must internally provide a hold time of at least 300ns for the SDA signal (referred to the VIHMIN of the SCL signal) in order to
bridge the undefined region of the falling edge of SCL.
Note 12: The maximum tHD:DAT has only to be met if the device does not stretch the LOW period (tLOW) of the SCL signal.
Note 13: CB—total capacitance of one bus line in pF.
Note 14: This parameter is not production tested.
B
3 of 15
DS1371
Typical Operating Characteristics
(VCC = 3.3V, TA = +25°C, unless otherwise noted.)
IOSCO vs. VCC
SQUARE-WAVE OFF
IOSC1 vs. VCC
SQUARE-WAVE ON
DS1371 toc02
900
850
SUPPLY CURRENT (nA)
550
SUPPLY CURRENT (nA)
950
DS1371 toc01
600
500
450
400
800
750
700
650
600
550
500
350
450
300
400
2.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
2.5
3.5
4.0
4.5
ICCA vs. VCC
SQUARE-WAVE ON
DS1371 toc03
SUPPLY CURRENT (µA)
650
600
550
500
-20
0
20
40
60
5.0
5.5
75
70
65
60
55
50
45
40
35
30
25
20
15
10
5
0
80
-40
-20
TEMPERATURE ( C)
0
20
40
60
80
TEMPERATURE ( C)
IOSC0 vs. WDS FREQUENCY
30
DS1371 toc06
OSCILLATOR FREQUENCY vs. VCC
DS1371 toc05
35
32767.76
25
FREQUENCY (Hz)
SUPPLY CURRENT (µA)
3.0
IOSC0 vs. TEMPERATURE
VCC = 3.3V
700
-40
2.0
VCC (V)
750
SUPPLY CURRENT (nA)
1.5
VCC (V)
DS1371 toc04
1.5
20
15
10
32767.71
32767.66
32767.61
5
0
0
200
400
600
800
3.767.56
1000
1.3
WDS FREQUENCY (kHz)
1.8
2.3
2.8
3.3
3.8
VCC (V)
4 of 15
4.3
4.8
5.3
DS1371
Figure 1. Timing Diagram
X1
÷4
X2
÷2
÷4096
32,768Hz
8192Hz
4096Hz
1Hz
GND
Alarm/
Watchdog
Stat/Ctrl
SDA
SCL
1Hz
WACE
Power
WDS
SQW/INT
SQW
M
U
X
CLR
Oscillator
DS1371
VCC
M
U
X
4096Hz
÷4096
1Hz
WD/ALM
M
U
X
32-Bit
Counter
24-Bit
Counter
AIE
INT
CLR
INTCN
I2C
Interface
Figure 2. Functional Diagram
5 of 15
N
DS1371
PIN DESCRIPTION
PIN
NAME
FUNCTION
1, 2
X1, X2
3
WDS
4
GND
These signals are connections for a standard 32.768kHz quartz crystal. The internal
oscillator circuitry is designed for operation with a crystal having a specified load
capacitance (CL) of 6pF. No external resistors or capacitors are required. For more
information about crystal selection and crystal layout considerations, refer to
Application Note 58: Crystal Considerations with Dallas Real-Time Clocks. The
DS1371 can also be driven by an external 32.768kHz oscillator. In this configuration,
the X1 pin is connected to the external oscillator signal and the X2 pin is floated.
Watchdog Input. A positive edge-triggered hardware interrupt input that restarts the
watchdog counter when this signal transitions from a low to a high. While WDS remains
at a static low or high, the watchdog counter continues to decrement.
Ground
5
SDA
I2C Serial Data. Input/output for I2C data.
6
SCL
7
SQW/INT
I2C Serial Clock. Input for I2C clock.
Square-Wave/Interrupt Output. This pin is used to output the programmable squarewave or alarm interrupt signal. It is open drain and requires an external pullup resistor.
8
VCC
Supply Voltage Terminal
Detailed Description
The DS1371 is a real-time clock (RTC) with a I2C serial interface that provides elapsed seconds from a
user-defined starting point in a 32-bit counter (Figure 2). A 24-bit counter can be configured as either a
watchdog counter or as an alarm counter. An on-chip oscillator circuit uses a customer-supplied
32.768kHz crystal to keep time.
Oscillator Circuit
The DS1371 uses an external 32.768kHz crystal. The oscillator circuit does not require any external
resistors or capacitors to operate (Figure 2). Table 1 specifies several crystal parameters for the external
crystal. Using a crystal with the specified characteristics, the startup time is usually less than one second.
Clock Accuracy
The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the match
between the capacitive load of the oscillator circuit and the capacitive load for which the crystal was
trimmed. Additional error is added by crystal frequency drift caused by temperature shifts. External
circuit noise coupled into the oscillator circuit can result in the clock running fast. Figure 3 shows a
typical PC board layout for isolation of the crystal and oscillator from noise. Refer to Application Note
58: Crystal Considerations with Dallas Real-Time Clocks for detailed information.
6 of 15
DS1371
Table 1. Crystal Specifications*
PARAMETER
SYMBOL
Nominal Frequency
Series Resistance
Load Capacitance
fO
ESR
CL
MIN
TYP
MAX
UNITS
50
kHz
kΩ
pF
32.768
6
*The crystal, traces, and crystal input pins should be isolated from RF generating signals. Refer to Application Note 58: Crystal Considerations
for Dallas Real-Time Clocks for additional specifications.
LOCAL GROUND PLANE (LAYER 2)
X1
CRYSTAL
X2
GND
Figure 3. Layout Example
7 of 15
DS1371
Address Map
Table 2 shows the address map for the registers of the DS1371. During a multibyte access, when the
address pointer reaches the end of the register space (08h), it wraps around to location 00h. On an I2C
START, STOP, or address pointer incrementing to location 00h, the current time is transferred to a
second set of registers. The time information is read from these secondary registers, while the clock may
continue to run. This eliminates the need to reread the registers in case of an update of the main registers
during a read.
Table 2. Address Map
ADDRESS
BIT 7
BIT 6
BIT 5
BIT 4
BIT 3
BIT 2
BIT 1
BIT 0
FUNCTION
00H
TOD COUNTER BYTE 0
Time-of-Day
Counter
01H
TOD COUNTER BYTE 1
Time-of-Day
Counter
02H
TOD COUNTER BYTE 2
Time-of-Day
Counter
03H
TOD COUNTER BYTE 3
Time-of-Day
Counter
04H
WD/ALM COUNTER BYTE 0
Watchdog/
Alarm Counter
05H
WD/ALM COUNTER BYTE 1
Watchdog/
Alarm Counter
06H
WD/ALM COUNTER BYTE 2
Watchdog/
Alarm Counter
07H
EOSC
WACE
WD/ALM
0
INTCN
RS2
RS1
AIE
Control
08H
OSF
0
0
0
0
0
0
AF
Status
Note: Unless otherwise specified, the state of the registers are not defined when power is first applied.
8 of 15
DS1371
Time-of-Day Counter
The time-of-day counter is a 32-bit up counter. The contents can be read or written by accessing the
address range 00h–03h. When the counter is read, the current time of day is latched into a register, which
is output on the serial data line while the counter continues to increment. Writing to the counter resets the
countdown chain for the time-of-day counter (Figure 2). The watchdog countdown chain is unaffected. If
the square-wave output is enabled and is set to 1Hz, the output resets when the countdown chain is reset.
Because the other square-wave frequencies are derived before the section of the countdown chain that is
reset, the other frequencies are unaffected by a write to the time-of-day counter.
Watchdog/Alarm Counter
If the counter is not needed, it can be disabled and used as a 24-bit cache of NV RAM by setting the
WACE bit in the control register to logic 0. If all 24 bits of the watchdog/alarm counter are written to
zero, the counter is disabled, independent of the WACE bit setting. When the watchdog counter is written
to a nonzero value, and WACE is written to logic 1, the function of the counter is determined by the
WD/ALM bit.
Note: The WDS input must be low when writing to the watchdog counter registers.
When the WD/ALM bit in the control register is set to a logic 0, the WD/ALM counter decrements every
second until it reaches zero. At this point, the AF bit in the status register is set to a 1 and the counter is
reloaded and restarted. AF remains set until cleared by writing it to a 0. If INTCN = AIE = 1, the
SQW/INT pin will go active whenever AF = 1.
Note: WACE must be set to a logic 1 after the alarm value is written.
When the WD/ALM bit is set to logic 1, the WD/ALM counter decrements every 1/4096 of a second
(approximately every 244μs) until it reaches zero. When any of the watchdog counters bytes are read, the
seed value is reloaded and the counter restarts. Writing to the watchdog counter updates the seed value
and reloads the counter with the new seed value. A low to high transition on the WDS input reloads and
restarts the counter with the seed value. When the counter reaches zero, the AF bit is set and the counter
stops. The AF bit remains set until cleared by writing it to 0. If INTCN and AIE are both at logic 1 when
the AF bit becomes set, the SQW/INT pin pulses low for 250ms. At the end of the 250ms pulse, the AF
bit is cleared and SQW/INT becomes high impedance.
Note: WACE must be toggled from a logic 0 to a logic 1 after the watchdog counter is written from a
zero to a nonzero value.
The 250ms pulse on SQW/INT cannot be truncated by writing either AF or AIE to zero during the low
time. If the WD/ALM counter is written during the 250ms pulse, the counter starts decrementing upon the
pulse completion.
9 of 15
DS1371
Special Purpose Registers
The DS1371 has two additional registers (07h–08h) that control the WD/ALM counter, square-wave
output, and interrupts.
Control Register (07h)
Bit #
Name
Default
7
EOSC
0
6
WACE
0
5
WD/ALM
0
4
0
0
3
INTCN
0
2
RS2
1
1
RS1
1
0
AIE
0
Bit 7: Enable Oscillator (EOSC). When set to logic 0, the oscillator is started. When set to logic 1, the
oscillator is stopped. When this bit is set to a logic 1, the oscillator is stopped and the DS1371 is placed
into a low-power standby mode (IDDR). This bit is clear (logic 0) when power is first applied.
Bit 6: WD/ALM Counter Enable (WACE). When set to logic 1, the WD/ALM counter is enabled.
When set to logic 0, the WD/ALM counter is disabled, and the 24-bits can be used as general-purpose
RAM. This bit is clear (logic 0) when power is first applied.
Bit 5: WD/ALM Counter Select (WD/ALM). When set to logic 0, the counter decrements every second
until it reaches 0 and is then reloaded and restarted. When set to logic 1, the WD/ALM counter
decrements every 1/4096 of a second (approximately every 244μs) until it reaches 0, sets the AF bit in the
status register, and stops. If any of the WD/ALM counter registers are read or written, or a rising edge on
the WDS pin occurs before the counter reaches 0, the counter is reloaded and restarted. This bit is clear
(logic 0) when power is first applied.
Bit 3: Interrupt Control (INTCN). This bit controls the SQW/INT signal. When the INTCN bit is set to
logic 0, a square wave is output on the SQW/INT pin whose frequency is defined by bits RS2 and RS1.
The oscillator must also be enabled for the square wave to be output. When the INTCN bit is set to logic
1, then this permits the alarm flag bit in the status register to assert SQW/INT (provided that the alarm is
also enabled). The alarm flag is always set, regardless of the state of the INTCN bit. The INTCN bit is set
to logic 0 when power is first applied.
Bits 2 and 1: Rate Select 1 and 2 (RS2 and RS1). These bits control the frequency of the square-wave
output when the square wave has been enabled. Table 3 shows the square-wave frequencies that can be
selected with the RS bits. These bits are both set (logic 1) when power is first applied.
Bit 0: Alarm Interrupt Enable (AIE). When set to logic 1, this bit permits the AF bit in the status
register to assert SQW/INT (when INTCN = 1). When set to logic 0 or INTCN is set to logic 0, the AF bit
does not initiate the SQW/INT signal. If the WD/ALM bit is set to a logic 1 and the AF flag is set, writing
AIE to a 0 does not truncate the 250ms pulse on the SQW/INT pin. The AIE bit is at logic 0 when power
is first applied.
Table 3. SQW/INT Operating Modes
WACE
X
X
X
X
1
1
WD/ALM
X
X
X
X
0
1
INTCN
0
0
0
0
1
1
AIE
X
X
X
X
1
1
RS2
0
0
1
1
X
X
10 of 15
RS1
0
1
0
1
X
X
SQW/INT OUTPUT
1Hz
4.096kHz
8.192kHz
32.768kHz
Alarm
WD
DS1371
Status Register (08h)
Bit #
Name
Default
7
OSF
1
6
0
0
5
0
0
4
0
0
3
0
0
2
0
0
1
0
0
0
AF
—
Bit 7: Oscillator Stop Flag (OSF). A logic 1 in this bit indicates that the oscillator either is stopped or
was stopped for some period and can be used to judge the validity of the timekeeping data. This bit is set
to logic 1 any time that the oscillator stops. The following are examples of conditions that can cause the
OSF bit to be set:
• The first time power is applied.
• The voltage present on VCC is insufficient to support oscillation.
• The EOSC bit is turned off.
• External influences on the crystal (e.g., noise, leakage, etc.)
• This bit remains at logic 1 until written to logic 0.
Bit 0: Alarm Flag (AF). A logic 1 in the AF bit indicates that the WD/ALM counter reached 0. If
INTCN is set to a 1, and WD/ALM is set to 0 and AIE is set to 1, the SQW/INT pin goes low and stays
low until AF is cleared. AF is cleared when written to logic 0. This bit can only be written to logic 0.
Attempting to write logic 1 leaves the value unchanged. If INTCN and WD/ALM are set to 1 and the AIE
is set to 1, the SQW/INT pin pulses low for 250ms when the WD/ALM counter reaches 0 and sets AF =
1. At the completion of the 250ms pulse, the DS1371 clears the AF bit to a 0. If the 250ms pulse is active,
writing AF to a 0 does not truncate the pulse.
I2C Serial Interface
The DS1371 supports a bidirectional I2C bus and data transmission protocol. A device that sends data
onto the bus is defined as a transmitter and a device receiving data as a receiver. The device that controls
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
generates the START and STOP conditions. The DS1371 operates as a slave on the I2C bus. Within the
I2C bus specifications a standard mode (100kHz clock rate) and a fast mode (400kHz clock rate) are
defined. The DS1371 works in both modes. Connections to the bus are made through the open-drain I/O
lines SDA and SCL.
The following bus protocol has been defined (Figure 4):
•
•
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 are 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.
11 of 15
DS1371
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.
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. Within the I2C bus specifications a standard mode
(100kHz clock rate) and a fast mode (400kHz clock rate) are defined.
Acknowledge: Each receiving device, when addressed, is obliged to generate an acknowledge
after the reception of each byte. The master device must generate an extra clock pulse, which is
associated with this acknowledge bit.
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. Setup and hold times must be taken into account. A master must signal an end of data
to the slave by not generating an acknowledge 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.
Figure 4. I2C Data Transfer Overview
12 of 15
DS1371
Figures 5 and 6 detail how data transfer is accomplished on the I2C 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 transfer from a slave transmitter to a master receiver. The first byte (the slave address)
is transmitted 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 “not acknowledge” is
returned.
The master device generates all of the serial clock pulses and the START and STOP conditions. A
transfer is ended with a STOP condition or with a repeated START condition. Since a repeated
START condition is also the beginning of the next serial transfer, the bus is not released.
The DS1371 can operate in the following two modes:
Slave receiver mode (DS1371 write mode). Serial data and clock are received through SDA and
SCL. After each byte is received, an acknowledge bit is transmitted. START and STOP conditions
are recognized as the beginning and end of a serial transfer. Address recognition is performed by
hardware after reception of the slave address and direction bit. The slave address byte is the first
byte received after the START condition is generated by the master. The slave address byte
contains the 7-bit DS1371 address, which is 1101000, followed by the direction bit (R/W), which
for a write is a 0. After receiving and decoding the slave address byte the DS1371 outputs an
acknowledge on SDA. After the DS1371 acknowledges the slave address + write bit, the master
transmits a word address to the DS1371. This sets the register pointer on the DS1371, with the
DS1371 acknowledging the transfer. The master may then transmit zero or more bytes of data,
with the DS1371 acknowledging each byte received. The register pointer increments after each
byte is transferred. The master generates a STOP condition to terminate the data write.
Slave transmitter mode (DS1371 read mode). The first byte is received and handled as in the
slave receiver mode. However, in this mode, the direction bit indicates that the transfer direction is
reversed. Serial data is transmitted on SDA by the DS1371 while the serial clock is input on SCL.
START and STOP conditions are recognized as the beginning and end of a serial transfer.
Address recognition is performed by hardware after reception of the slave address and direction
bit. The slave address byte is the first byte received after the START condition is generated by the
master. The slave address byte contains the 7-bit DS1371 address, which is 1101000, followed by
the direction bit (R/W), which for a read is a 1. After receiving and decoding the slave address
byte, the DS1371 outputs an acknowledge on SDA. The DS1371 then begins to transmit data
starting with the register address pointed to by the register pointer. If the register pointer is not
written to before the initiation of a read mode the first address that is read is the last one stored in
the register pointer. The DS1371 must receive a “not acknowledge” to end a read.
13 of 15
<Slave Address>
S
1101000
<RW>
DS1371
0
<Word Address (n)>
A XXXXXXXX
B - Block Select
S - Start
A - Acknowledge (ACK)
P - Stop
<Data(n)>
<Data(n+1)>
A XXXXXXXX
A XXXXXXXX
<Data(n+X)>
A ... XXXXXXXX
A P
Master to slave
DATA TRANSFERRED
(X+1 BYTES + ACKNOWLEDGE)
Slave to master
<Slave Address>
S
1101000
<RW>
Figure 5. I2C Write Protocol
1
<Data(n)>
<Data(n+1)>
A XXXXXXXX
B - Block Select
S - Start
A - Acknowledge (ACK)
P - STOP
A - Not Acknowledge (NACK)
<Data(n+2)>
A XXXXXXXX
Master to slave
Slave to master
A XXXXXXXX
<Data(n+X)>
A ... XXXXXXXX
A P
DATA TRANSFERRED
(X+1 BYTES + ACKNOWLEDGE); NOTE: LAST DATA BYTE IS
FOLLOWED BY A NOT ACKNOWLEDGE (A) SIGNAL)
S
1101000
0
<Word Address (n)>
A XXXXXXXX
<Data(n)>
XXXXXXXX
A Sr
<Data(n+1)>
A XXXXXXXX
B - Block Select
S - Start
Sr - Repeated Start
A - Acknowledge (ACK)
P - Stop
A - Not Acknowledge (NACK)
<Slave Address>
1101000
<RW>
<Slave Address>
<RW>
Figure 6. I2C Read Protocol
1
A
<Data(n+2)>
<Data(n+X)>
A XXXXXXXX
Master to slave
Slave to master
A ... XXXXXXXX
A P
DATA TRANSFERRED
(X+1 BYTES + ACKNOWLEDGE); NOTE: LAST DATA BYTE IS
FOLLOWED BY A NOT ACKNOWLEDGE (A) SIGNAL)
Figure 7. I2C Data Read (Write Pointer, Then Read) Protocol
Chip Information
TRANSISTOR COUNT: 11,036
PROCESS: CMOS
SUBSTRATE CONNECTED TO GROUND
Thermal Information
Theta-JA: 221°C/W
Theta-JC: 39°C/W
Package Information
For the latest package outline information, go to www.maxim-ic.com/DallasPackInfo.
PACKAGE
DOCUMENT NUMBER
8-pin μSOP
21-0036
14 of 15
DS1371
Revision History
REV DATE
DESCRIPTION
110502
Initial data sheet release.
(Page 14) In Figures 6 and 7, corrected the slave address and removed the second
“START.”
Changed all 2-wire references to I2C.
(Page 1) Added lead-free packages to the Ordering Information table.
(Page 2) Removed “A” from J-STD-020 (Soldering Temperature) reference.
Removed Figure 3 (oscillator circuit) and incorporated into new Figure 2 (page 5).
(Page 6) In Pin Description table, added sentence saying no external resistors or
capacitors are required for pins 1 and 2 (X1 and X2).
(Page 7) Removed guard ring from Figure 3 (formerly Figure 4).
(Page 9) Updated the Watchdog/Alarm Counter section.
(Page 10) In Table 3, added the control bits affecting SQW/INT output operation.
(Page 11) In the I2C Serial Interface section (formerly 2-Wire Serial Interface), added text
about the part working in fast and standard I2C modes.
(Page 14) Added package drawing information table.
(Page 1) Corrected top mark information in the Ordering Information table.
(Page 2) Changed IDDR max from 50nA to 100nA.
(Page 7) In Table 1, changed ESR max from 45kΩ to 50kΩ.
(Page 8) In Table 2, changed WD/ALM to WD/ALM for address 07h (Control Register).
(Page 2) Added “noncondensing” to Operating Temperature Range requirement in the
Absolute Maximum Ratings section.
(Page 14) Corrected/added I2C read and write protocol figures.
(Page 14) Changed package information document number to 21-0036.
051203
061406
022207
070607
15 of 15
Maxim/Dallas Semiconductor cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim/Dallas Semiconductor product.
No circuit patent licenses are implied. Maxim/Dallas Semiconductor reserves the right to change the circuitry and specifications without notice at any time.
Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408-737-7600
© 2007 Maxim Integrated Products
The Maxim logo is a registered trademark of Maxim Integrated Products, Inc. The Dallas logo is a registered trademark of Dallas Semiconductor Corporation.
Similar pages