DS1721
10 of 17
SLAVE ADDRESS
A control byte is the 1st byte received following the START condition from the master device. The
control byte consists of a 4-bit control code; for the DS1721, this is set as 1001 binary for read and write
operations. The next 3 bits of the control byte are the device select bits (A2, A1, A0). They are used by
the master device to select which of eight devices are to be accessed. The set bits are in effect the 3 least
significant bits of the slave address. The last bit of the control byte (R/ W) defines the operation to be
performed. When set to a 1 a read operation is selected, and when set to a 0 a write operation is selected.
Following the START condition, the DS1721 monitors the SDA bus checking the device type identifier
being transmitted. Upon receiving the 1001 code and appropriate device select bits, the slave device
outputs an acknowledge signal on the SDA line.
COMMAND SET
Data and control information is read from and written to the DS1721 in the format shown in Figure 6. To
write to the DS1721, the master will issue the slave address of the DS1721 and the R/ W bit will be set to
"0". After receiving an acknowledge, the bus master provides a command protocol. After receiving this
protocol, the DS1721 will issue an acknowledge and the master may send data to the DS1721. If the
DS1721 is to be read, the master must send the command protocol as before then issue a repeated START
condition and the control byte again, this time with the R/ W bit set to "1" to allow reading of the data
from the DS1721. The command set for the DS1721 as shown in Table 4 is as follows:
Read Temperature [AAh]
This command reads the last temperature conversion result from the Thermometer Register in the format
described in the “OPERATION-Measuring Temperature” section. If one’s application can accept
thermometer resolution of only 1.0°C, the master only must read the first data byte and follow with a
NACK and STOP. For higher resolution, both bytes must be read.
Access TH [A1h]
If R/ W is "0", this command writes to the TH register. After issuing this command, the next 2 bytes
written to the DS1721, in the format described for thermostat set-points, will set the high temperature
threshold for operation of the TOUT output. If R/ W is "1", the value stored in this register is read back.
Access TL [A2h]
If R/ W is "0", this command writes to the TL register. After issuing this command, the next 2 bytes
written to the DS1721, in the format described for thermostat set-points, will set the high temperature
threshold for operation of the TOUT output. If R/ W is "1", the value stored in this register is read back.
Access Config [ACh]
If R/ W is "0", this command writes to the configuration register. After issuing this command, the next
data byte value is to be written into the configuration register. If R/ W is "1", the next data byte read is the
value stored in the configuration register.
Start Convert T [51h]
This command begins a temperature conversion. No further data is required. In one-shot mode, the
temperature conversion will be performed and stored and then the DS1721 will remain idle. In continuous
mode, this command will initiate continuous conversions.