DS1721
10 of 17
SLAVE ADDRESS
A control byte is the 1
st
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.
DS1721
11 of 17
Stop Convert T [22h]
This command stops temperature conversion. No further data is required. This command may be used to
halt a DS1721 in continuous conversion mode. After issuing this command, the current temperature
measurement will be completed, stored and the DS1721 will remain idle until a Start Convert T is issued
to resume conversions.
DS1721 COMMAND SET Table 4
INSTRUCTION DESCRIPTION PROTOCOL
2-WIRE BUS DATA
AFTER ISSUING
PROTOCOL
NOTES
REGISTER COMMANDS
Access
Configuration
Writes to/Reads from 8-bit
configuration/status register
ACh 1 data byte 1
Access TH
Writes to/Reads from
12-bit TH register
A1h 1 or 2 data bytes 1, 3
Access TL
Writes to/Reads from
12-bit TL register
A2h 1 or 2 data bytes 1, 3
CONVERSION COMMANDS
Start Convert T
Initiates temperature
conversion
51h idle 2
Stop Convert T
Terminates continuous
conversions
22h idle 2
Read
Temperature
Reads 12-bit
Temperature register
AAh Read 1 or 2 data bytes 3
NOTES:
1. Data direction depends upon R/ W bit in the 2-wire control byte.
2. In continuous conversion mode, a Stop Convert T command will halt continuous conversion. To
restart, the Start Convert T command must be issued. In one-shot mode, a Start Convert T command
must be issued for every temperature reading desired.
3. If the user only desires 8-bit thermometer readings, the master need only read 1 data byte and follow
with a NACK and STOP. If higher resolution is required, 2 bytes must be read.
DS1721
12 of 17
SAMPLE COMMAND SEQUENCE Table 5
Example: After power-up, initiates a temperature conversion, bus master reads temperature
BUS MASTER
MODE
DS1721
MODE
DATA (MSB
FIRST)
COMMENTS
TX RX START Bus Master initiates a START condition
TX RX <address, 0>
Bus Master sends DS1721 address; R/
W = 0
RX TX ACK DS1721 generates acknowledge bit
TX RX 51h Bus Master sends start convert T protocol
RX TX ACK DS1721 generates acknowledge bit
TX RX START Bus Master initiates a repeated START condition
TX RX <address, 0>
Bus Master sends DS1721 address; R/
W = 0
RX TX ACK DS1721 generates acknowledge bit
TX RX AAh Bus Master sends read temperature protocol
RX TX ACK DS1721 generates acknowledge bit
TX RX START Bus Master initiates a repeated START condition
TX RX <address, 1>
Bus Master sends DS1721 address; R/ W =1
RX TX ACK DS1721 generates acknowledge bit
RX TX <1 data byte> DS1721 transmits MSB of temperature
TX RX ACK Bus Master generates acknowledge bit
RX TX <1 data byte> DS1721 transmits LSB of temperature

DS1721S

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