Temperature, t, And t, Register format figure 2 – Rainbow Electronics DS1631 User Manual

Page 4: Operation—thermostat function

Advertising
background image

DS1631

4 of 14

TEMPERATURE, T

H

, and T

L

REGISTER FORMAT Figure 2

bit 15

bit 14

bit 13

bit 12

bit 11

bit 10

bit 9

bit 8

MS Byte

S

2

6

2

5

2

4

2

3

2

2

2

1

2

0

bit 7

bit 6

bit 5

bit 4

bit 3

bit 2

bit 1

bit 0

LS Byte

2

-1

2

-2

2

-3

2

-4

0

0

0

0

12-BIT RESOLUTION TEMPERATURE/DATA RELATIONSHIP Table 3

TEMPERATURE

(

°C)

DIGITAL OUTPUT

(BINARY)

DIGITAL OUTPUT

(HEX)

+125

0111 1101 0000 0000

7D00h

+25.0625

0001 1001 0001 0000

1910h

+10.125

0000 1010 0010 0000

0A20h

+0.5

0000 0000 1000 0000

0080h

0

0000 0000 0000 0000

0000h

-0.5

1111 1111 1000 0000

FF80h

-10.125

1111 0101 1110 0000

F5E0h

-25.0625

1110 0110 1111 0000

E6F0h

-55

1100 1001 0000 0000

C900h

OPERATION—THERMOSTAT FUNCTION

The DS1631 thermostat output (T

OUT

) is updated after every temperature conversion, and remains at the

updated value until the next conversion completes. T

OUT

is activated and deactivated based on user-

defined upper and lower trip points. When the measured temperature meets or exceeds the value stored in
the upper trip-point register (T

H

), T

OUT

will become active and stay active until the temperature falls

below the value stored in the lower trip-point register (T

L

) (see Figure 3). This allows the user to program

any amount of hysteresis into the output response. The active state of T

OUT

is user-programmable through

the polarity bit (POL) in the configuration register: POL = 1—T

OUT

is active high; POL = 0—T

OUT

is

active low.
The user-defined values in the T

H

and T

L

registers (see Figure 2) must be in two’s complement format

with the MSb (bit 15) containing the sign bit (S). The resolution of the T

H

and T

L

values is determined by

the R0 and R1 bits in the configuration register (see Table 4), so the T

H

and T

L

resolution will match the

output temperature resolution. For example, for 10-bit resolution bits 5 through 0 of the T

H

and T

L

registers will read out as 0 (even if 1s are written to these bits), and the converted temperature will be
compared to the 10 MSbs of T

H

and T

L

.

The T

H

and T

L

registers and the POL bit are stored in EEPROM; therefore, they are NV and can be

programmed prior to installation of the DS1631. Writing to and reading from the T

H

, T

L

, and

configuration registers is achieved using the Access TH, Access TL, and Access Config commands.
Another thermostat feature is the temperature high and low flags (THF and TLF) in the configuration
register. These bits provide a record of whether the temperature has been greater than T

H

or less than T

L

at anytime since the DS1631 was powered up. If the temperature ever exceeds the T

H

register value, the

THF bit in the configuration register will be set to 1, and if the temperature ever falls below the T

L

value,

the TLF bit in the configuration register will be set to 1. Once THF and/or TLF has been set, it will
remain set until over-written with a 0 by the user or until the power is cycled.

Advertising