DS1631/DS1631A/DS1731
13 of 15
2-WIRE READS
The master can read data from the DS1631/DS1631A/DS1731 by issuing an Access Config, Access TH,
Access TL, or Read Temperature command following the control byte (see Figures 9c and 9e). After
receiving an ACK in response to the command, the master must generate a repeated START followed by
a control byte with the same slave address as the first control byte. However, this time the R/
W¯¯ bit must
be a 1, which tells the DS1631/DS1631A/DS1731 that a “read” is being performed. After the
DS1631/DS1631A/DS1731 send an ACK in response to this control byte, it begins transmitting the
requested data on the next clock cycle. One byte of data will be transmitted when reading from the
configuration register after which the master must respond with a NACK followed by a STOP. For two-
byte reads (i.e., from the Temperature, T
H
, or T
L
register), the master must respond to the first data byte
with an ACK and to the second byte with a NACK followed by a STOP. If only the most significant byte
of data is needed, the master can issue a NACK followed by a STOP after reading the first data byte.
COMMAND SET
The DS1631/DS1631A/DS1731 command set is detailed below:
Start Convert T [ 51h ]
Initiates temperature conversions. If the part is in one-shot mode (1SHOT = 1), only one conversion is
performed. In continuous mode (1SHOT = 0), continuous temperature conversions are performed until a
Stop Convert T command is issued.
Stop Convert T [ 22h ]
Stops temperature conversions when the device is in continuous conversion mode (1SHOT = 0).
Read Temperature [ AAh ]
Reads last converted temperature value from the 2-byte temperature register.
Access TH [ A1h ]
Reads or writes the 2-byte T
H
register.
Access TL [ A2h ]
Reads or writes the 2-byte T
L
register.
Access Config [ ACh ]
Reads or writes the 1-byte configuration register.
Software POR [ 54h ]
Initiates a software power-on-reset (POR), which stops temperature conversions and resets all registers
and logic to their power-up states. The software POR allows the user to simulate cycling the power
without actually powering down the device.
DS1631/DS1631A/DS1731
14 of 15
Figure 9 (a, b, c, d, e). 2-WIRE INTERFACE TIMING
THERM = DS1631, DS1631A, or DS1731
C2
a) Issue a "Start Convert T” or “Stop Convert T” Command
S
11
00
A2 A1 A0
W
AC7C6C5C4 A
C3
C1 C0
P
Control Byte
Command Byte
START
STOP
ACK
(THERM)
SCL
SDA
ACK
(THERM)
d) Write to the T
H
or T
L
Register
A2 A1 A0 C2
SCL
SDA
S 1
1
0
0W
A
Control Byte
START
ACK
(THERM)
A
C7 C6 C5 C4
C3
C1 C0
Command Byte ACK
(THERM)
D4
D6 D5
D3
D2 D0D7D6 D5 D4
D3
D2 D1 D0
D7
A
D1
P
LS Data Byte
(from Master)
A
MS Data Byte
(from Master)
STOP
ACK
(THERM)
ACK
(THERM)
e) Read From the Temperature, T
H
, or T
L
Register
AD2D1D0D6 D5 D4
D3
D7
A2 A1 A0
00
AC4
C3
C2 C1C7 C6 C5A2 A1 A0
A
ACK
(THERM)
Repeat
START
A
SCL
SDA
S 11
00
W
Control Byte
START
C0
Command Byte
S 11
R
Control Byte MS Data Byte
(from THERM)
ACK
(THERM)
ACK
(THERM)
ACK
(Master)
D5
N
D6 D4
D3
D2 D1 D0 P
LS Data Byte
(from THERM)
STOP
D7
NACK
(Master)
(THERM)
(THERM)
AD2D6 D5 D4
D3
D1 D0A0
W
AA1 1 0 1 0
1
100AD7A2
b) Write to the Configuration Register
S1 100
Control ByteSTART
SCL
SDA
ACK
Command Byte
P
Data Byte
(from Master)
STOP
ACK
ACK
(THERM)
NA1S1 1
00
A2 A1 A0
W
010 A
1
100
D6 D5
D4
D3
D2 D1 D0
P
D7
S1
1
00
A2 A1 A0
R
A
c) Read From the Configuration Register
ACK
(THERM)
Repeat
START
SCL
SDA
Control Byte
START
Command Byte
Data Byte
(from THERM)
STOP
NACK
(Master)
Control Byte
ACK
(THERM)
ACK
(THERM)
DS1631/DS1631A/DS1731
15 of 15
OPERATION EXAMPLE
In this example, the master configures the DS1631/DS1631A/DS1731 (A
1
A
2
A
3
= 000) for continuous
conversions and thermostatic function.
MASTER
MODE
THERMETER*
MODE
DATA
(MSb first)
COMMENTS
TX RX START START condition from MASTER.
TX RX 90h
MASTER sends control byte with R/W¯¯ = 0.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX ACh MASTER sends Access Config command.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX 02h
MASTER writes a data byte to the configuration register to
put the THERMOMETER in continuous conversion mode
and set the T
OUT
polarity to active high.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX STOP STOP condition from MASTER.
TX RX START START condition from MASTER.
TX RX 90h
MASTER sends control byte with R/W¯¯ = 0.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX A1h MASTER sends Access TH command.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX 28h MASTER sends most significant data byte for T
H
= +40°C.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX 00h MASTER sends least significant data byte for T
H
= +40°C.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX STOP STOP condition from MASTER.
TX RX START START condition from MASTER.
TX RX 90h
MASTER sends control byte with R/W¯¯ = 0.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX A2h MASTER sends Access TL command.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX 0Ah MASTER sends most significant data byte for T
L
= +10°C.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX 00h MASTER sends least significant data byte for T
L
= +10°C.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX STOP STOP condition from MASTER.
TX RX START START condition from MASTER.
TX RX 90h
MASTER sends control byte with R/
W¯¯ = 0.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX 51h MASTER sends Start Convert T command.
RX TX ACK Acknowledge bit from THERMOMETER.
TX RX STOP STOP condition from MASTER.
*THERMOMETER = DS1631, DS1631A, or DS1731

DS1631S

Mfr. #:
Manufacturer:
Description:
SENSOR DIGITAL -55C-125C 8SOIC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet