B&B Electronics 232DTT Manual Download Page 7

232DTT1795 Manual

Chapter 3

5

B&B Electronics  --  PO Box 1040  --  Ottawa, IL  61350

PH (815) 433-5100  --  FAX (815) 434-7094

Chapter 3.  232DTT Data Format

The DTT uses 9-bit, two’s complement format to represent

temperature data. The ninth bit is the sign bit. If this bit is a 0, the
temperature is above 0

°

 C. If the bit is 1, the temperature is less

than 0

°

 C. Each bit represents 1/2

°

 C.

Two’s complement format provides a way for digital devices

to handle negative numbers. To convert the two’s complement value
to a meaningful number representing temperature, follow these
steps:

1. Check bit nine. In our case this is the entire first character. If the

character is decimal 0 (NUL), then the value in the second
character is positive and no further complementing is necessary,
go to step 6. If character is decimal 1, then continue with step 2.

 
2. Use the NOT function of your programming language to invert

(or complement) the value in the second character.

 
3. We need to insure that we are only dealing with an eight bit

variable. You may be able to define this in your programming
language. To be sure, we can use the AND function to limit our
new value to only eight bits by ANDing the value from step 2
with FFh. This masks off all but the lowest eight bits.

 
4. Add a 1 to the value from step 3. This completes the two’s

complement portion of the conversion.

 
5. Multiply our new value by -1. This simply adds the “-” sign to our

temperature reading.

 

Table 2.  Temperature/Data Relationships

Temperature

DTT output

hex value

dec value

+125

°

 C

0 11111010

00 FAh

250

+25

°

 C

0 00110010

00 32h

50

1/2

°

 C

0 00000001

00 01h

1

0

°

 C

0 00000000

00 00 h

0

-1/2

°

 C

1 11111111

01 FFh

511

-25

°

 C

1 11001110

01 CEh

462

-55

°

 C

1 10010010

01 92h

402

Summary of Contents for 232DTT

Page 1: ...AX 815 434 7094 B B Electronics Mfg Co Inc P O Box 1040 Ottawa IL 61350 PH 815 433 5100 FAX 815 434 7094 Internet http www bb elec com sales bb elec com techsupt bb elec com B B Electronics April 1995...

Page 2: ...ICATIONS 1 RS 232 CONNECTIONS 2 CHAPTER 2 232DTT FUNCTIONS 3 DIGITAL THERMOMETER 3 PROGRAMMABLE THERMOSTAT 3 CHAPTER 3 232DTT DATA FORMAT 5 CHAPTER 4 232DTT COMMANDS 7 READ TEMPERATURE 7 READ STATUS 7...

Page 3: ...rt RTS DTR high Thermostat thresholds programmable in non volatile registers Status Register latches if thermostat outputs have tripped Packing List Examine the shipping carton and contents for physic...

Page 4: ...an external supply the supply should be connected only to specifically labeled power inputs power jack terminal block etc Connecting an external power supply to the handshake lines may damage the uni...

Page 5: ...it is powered the thermostat outputs will be serviced Three open collector outputs provide thermostatic controls These outputs are current sinking low when on high impedance high when off 1 THIGH Turn...

Page 6: ...il or any inductive load to the DTT outputs a reverse bias diode must be connected across the load to protect the DTT output against large voltages caused by the inductive load The DTT outputs can han...

Page 7: ...necessary go to step 6 If character is decimal 1 then continue with step 2 2 Use the NOT function of your programming language to invert or complement the value in the second character 3 We need to i...

Page 8: ...ge these steps look like this DTT data has been stored in CHAR1 and CHAR2 negative ASC CHAR1 ASCII val of sign char 1 or 0 reading ASC CHAR2 ASCII val of reading IF negative 1 THEN reading NOT reading...

Page 9: ...rguments none Response temperature reading in 9 bit two s complement format shown in boldface Dec Example 0RT 0 46 ASCII Example 0RT NUL Description The decimal 0 NUL followed by decimal 46 equivalent...

Page 10: ...36 ASCII Example 0RL NUL Description The TL register contains decimal 0 ASCII NUL and decimal 36 ASCII This converts to a temperature of 18 C When the current temperature is 18 C the low thermostat ou...

Page 11: ...r and will not change until this command is issued again After sending the Set Low Thermostat command delay for at least 10 ms to allow the DTT to program the register NOTE After programming the 232DT...

Page 12: ...ware is installed on your hard disk the following files should be located in the 232DTT directory 232DTT_W EXE VBRUN300 DLL and MSCOMM VBX To set up the 232DTT under windows follow the following steps...

Page 13: ...ng command the second character is a zero all commands must be in capital letters 0RT 4 The DTT will respond with two characters indicating temperature Room temperature is usually NUL followed by a ch...

Page 14: ...4A J 106 6A j 11 B VT ctrl K 43 2B 75 4B K 107 6B k 12 C FF ctrl L 44 2C 76 4C L 108 6C l 13 D CR ctrl M 45 2D 77 4D M 109 6D m 14 E SO ctrl N 46 2E 78 4E N 110 6E n 15 F SI ctrl O 47 2F 79 4F O 111 6...

Reviews: