beautypg.com

Temperature/data relationships table 2, Operation-programming, Register address structure table 3 – Rainbow Electronics DS1722 User Manual

Page 4

background image

DS1722

4 of 13

The resolution of the temperature conversion is configurable (8, 9, 10, 11, or 12 bits), with 9-bit readings
the default state. This equates to a temperature resolution of 1.0

°

C, 0.5

°

C, 0.25

°

C, 0.125

°

C, or 0.0625

°

C.

Following each conversion, thermal data is stored in the thermometer register in two’s complement
format; the information can be retrieved over the SPI or 3-wire interface with the address set to the
temperature register, 01h (LSB) and then 02h (MSB). Table 2 describes the exact relationship of output
data to measured temperature. The table assumes the DS1722 is configured for 12-bit resolution; if the
device is configured in a lower resolution mode, those bits will contain 0s. The data is transmitted
serially over the digital interface, MSb first for SPI communication and LSb first for 3-wire
communication. The MSb of the temperature register contains the “sign” (S) bit, denoting whether the
temperature is positive or negative. For Fahrenheit usage, a lookup table or conversion routine must be
used.

Temperature/Data Relationships Table 2

Address
Location

S

2

6

2

5

2

4

2

3

2

2

2

1

2

0

02h

MSb

(unit =

°

C)

LSb

2

-1

2

-2

2

-3

2

-4

0

0

0

0

01h

TEMPERATURE

DIGITAL OUTPUT

(BINARY)

DIGITAL OUTPUT

(HEX)

+120

°

C

0111 1000 0000 0000

7800h

+25.0625

°

C

0001 1001 0001 0000

1910h

+10.125

°

C

0000 1010 0010 0000

0A20h

+0.5

°

C

0000 0000 1000 0000

0080h

0

°

C

0000 0000 0000 0000

0000h

-0.5

°

C

1111 1111 1000 0000

FF80h

-10.125

°

C

1111 0101 1110 0000

F5E0h

-25.0625

°

C

1110 0110 1111 0000

E6F0h

-55

°

C

1100 1001 0000 0000

C900h

OPERATION-Programming

The area of interest in programming the DS1722 is the Configuration register. All programming is done
via the SPI or 3-wire communication interface by selecting the appropriate address of the desired register
location. Table 3 illustrates the addresses for the two registers (configuration and temperature) of the
DS1722.

Register Address Structure Table 3

Read Address

Write Address

Active Register

00h

80h

Configuration

01h

No access

Temperature LSB

02h

No access

Temperature MSB