General 2-Wire Information
● All data is transmitted MSb rst over the 2-wire bus.
●One bit of data is transmitted on the 2-wire bus each
SCL period.
●A pullup resistor is required on the SDA line and,
when the bus is idle, both SDA and SCL must remain
in a logic-high state.
●All bus communication must be initiated with a START
condition and terminated with a STOP condition. Dur-
ing a START or STOP is the only time SDA is allowed
to change states while SCL is high. At all other times,
changes on the SDA line can only occur when SCL is
low: SDA must remain stable when SCL is high.
●After every 8-bit (1-byte) transfer, the receiving device
must answer with an ACK (or NACK), which takes
one SCL period. Therefore, nine clocks are required
for every one-byte data transfer.
Initiating 2-Wire Communication
To initiate 2-wire communication, the master generates a
START followed by a control byte containing the DS1631,
DS1631A, or DS1731 slave address. The R/W bit of the
control byte must be a 0 (“write”) since the master next
writes a command byte. The DS1631/DS1631A/DS1731
responds with an ACK after receiving the control byte.
This must be followed by a command byte from the mas-
ter, which indicates what type of operation is to be per-
formed. The DS1631/DS1631A/DS1731 again respond
with an ACK after receiving the command byte.
If the command byte is a Start Convert T or Stop Convert
T command (see Figure 9), the transaction is finished,
and the master must issue a STOP to signal the end of
the communication sequence. If the command byte indi-
cates a write or read operation, additional actions must
occur as explained in the following sections.
2-Wire Writes
The master can write data to the DS1631/DS1631A/
DS1731 by issuing an Access Config, Access TH, or
Access TL command following the control byte (see
Figures 9b and 9d). Since the R/W bit in the control byte
was a 0 (“write”), the DS1631/DS1631A/DS1731 are
already prepared to receive data. Therefore, after receiv-
ing an ACK in response to the command byte, the master
device can immediately begin transmitting data. When
writing to the configuration register, the master must
send one byte of data, and when writing to the TH or TL
registers the master must send two bytes of data. After
receiving each data byte, the DS1631/DS1631A/DS1731
respond with an ACK, and the transaction is finished with
a STOP from the master.
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 trans-
mitted 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 fol-
lowed 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 com-
mand 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 TH register.
Access TL [ A2h ]
Reads or writes the 2-byte TL 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
High-Precision Digital
Thermometer and Thermostat
www.maximintegrated.com Maxim Integrated
│
10