Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board
configuration_constants_LTC2983.h
Go to the documentation of this file.
1 /*!
2 LTC2983: Multi-Sensor High Accuracy Digital Temperature Measurement System.
3 
4 @verbatim
5 
6 configuration_constants_LTC2983.h:
7 The configuration constants used to configure the LTC2983.
8 @endverbatim
9 
10 http://www.linear.com/product/LTC2983
11 
12 http://www.linear.com/product/LTC2983#demoboards
13 
14 
15 Copyright 2018(c) Analog Devices, Inc.
16 
17 All rights reserved.
18 
19 Redistribution and use in source and binary forms, with or without
20 modification, are permitted provided that the following conditions are met:
21  - Redistributions of source code must retain the above copyright
22  notice, this list of conditions and the following disclaimer.
23  - Redistributions in binary form must reproduce the above copyright
24  notice, this list of conditions and the following disclaimer in
25  the documentation and/or other materials provided with the
26  distribution.
27  - Neither the name of Analog Devices, Inc. nor the names of its
28  contributors may be used to endorse or promote products derived
29  from this software without specific prior written permission.
30  - The use of this software may or may not infringe the patent rights
31  of one or more patent holders. This license does not release you
32  from the requirement that you obtain separate licenses from these
33  patent holders to use this software.
34  - Use of the software either in source or binary form, must be run
35  on or directly connected to an Analog Devices Inc. component.
36 
37 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
38 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
39 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
40 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
41 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
43 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
44 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
46 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47 */
48 
49 
50 
51 /*! @file
52  @ingroup LTC2983
53  Header for LTC2983: Multi-Sensor High Accuracy Digital Temperature Measurement System
54 */
55 
56 
57 //**********************************************************************************************************
58 // -- SENSOR TYPES --
59 //**********************************************************************************************************
60 #define SENSOR_TYPE_LSB 27
61 // RTD
62 #define SENSOR_TYPE__RTD_PT_10 (uint32_t) 0xA << SENSOR_TYPE_LSB
63 #define SENSOR_TYPE__RTD_PT_50 (uint32_t) 0xB << SENSOR_TYPE_LSB
64 #define SENSOR_TYPE__RTD_PT_100 (uint32_t) 0xC << SENSOR_TYPE_LSB
65 #define SENSOR_TYPE__RTD_PT_200 (uint32_t) 0xD << SENSOR_TYPE_LSB
66 #define SENSOR_TYPE__RTD_PT_500 (uint32_t) 0xE << SENSOR_TYPE_LSB
67 #define SENSOR_TYPE__RTD_PT_1000 (uint32_t) 0xF << SENSOR_TYPE_LSB
68 #define SENSOR_TYPE__RTD_PT_1000_375 (uint32_t) 0x10 << SENSOR_TYPE_LSB
69 #define SENSOR_TYPE__RTD_NI_120 (uint32_t) 0x11 << SENSOR_TYPE_LSB
70 #define SENSOR_TYPE__RTD_CUSTOM (uint32_t) 0x12 << SENSOR_TYPE_LSB
71 // Sense Resistor
72 #define SENSOR_TYPE__SENSE_RESISTOR (uint32_t) 0x1D << SENSOR_TYPE_LSB
73 // -
74 #define SENSOR_TYPE__NONE (uint32_t) 0x0 << SENSOR_TYPE_LSB
75 // Direct ADC
76 #define SENSOR_TYPE__DIRECT_ADC (uint32_t) 0x1E << SENSOR_TYPE_LSB
77 // Thermistor
78 #define SENSOR_TYPE__THERMISTOR_44004_2P252K_25C (uint32_t) 0x13 << SENSOR_TYPE_LSB
79 #define SENSOR_TYPE__THERMISTOR_44005_3K_25C (uint32_t) 0x14 << SENSOR_TYPE_LSB
80 #define SENSOR_TYPE__THERMISTOR_44007_5K_25C (uint32_t) 0x15 << SENSOR_TYPE_LSB
81 #define SENSOR_TYPE__THERMISTOR_44006_10K_25C (uint32_t) 0x16 << SENSOR_TYPE_LSB
82 #define SENSOR_TYPE__THERMISTOR_44008_30K_25C (uint32_t) 0x17 << SENSOR_TYPE_LSB
83 #define SENSOR_TYPE__THERMISTOR_YSI_400_2P252K_25C (uint32_t) 0x18 << SENSOR_TYPE_LSB
84 #define SENSOR_TYPE__THERMISTOR_1003K_1K_25C (uint32_t) 0x19 << SENSOR_TYPE_LSB
85 #define SENSOR_TYPE__THERMISTOR_CUSTOM_STEINHART_HART (uint32_t) 0x1A << SENSOR_TYPE_LSB
86 #define SENSOR_TYPE__THERMISTOR_CUSTOM_TABLE (uint32_t) 0x1B << SENSOR_TYPE_LSB
87 // Thermocouple
88 #define SENSOR_TYPE__TYPE_J_THERMOCOUPLE (uint32_t) 0x1 << SENSOR_TYPE_LSB
89 #define SENSOR_TYPE__TYPE_K_THERMOCOUPLE (uint32_t) 0x2 << SENSOR_TYPE_LSB
90 #define SENSOR_TYPE__TYPE_E_THERMOCOUPLE (uint32_t) 0x3 << SENSOR_TYPE_LSB
91 #define SENSOR_TYPE__TYPE_N_THERMOCOUPLE (uint32_t) 0x4 << SENSOR_TYPE_LSB
92 #define SENSOR_TYPE__TYPE_R_THERMOCOUPLE (uint32_t) 0x5 << SENSOR_TYPE_LSB
93 #define SENSOR_TYPE__TYPE_S_THERMOCOUPLE (uint32_t) 0x6 << SENSOR_TYPE_LSB
94 #define SENSOR_TYPE__TYPE_T_THERMOCOUPLE (uint32_t) 0x7 << SENSOR_TYPE_LSB
95 #define SENSOR_TYPE__TYPE_B_THERMOCOUPLE (uint32_t) 0x8 << SENSOR_TYPE_LSB
96 #define SENSOR_TYPE__CUSTOM_THERMOCOUPLE (uint32_t) 0x9 << SENSOR_TYPE_LSB
97 // Off-Chip Diode
98 #define SENSOR_TYPE__OFF_CHIP_DIODE (uint32_t) 0x1C << SENSOR_TYPE_LSB
99 //**********************************************************************************************************
100 // -- RTD --
101 //**********************************************************************************************************
102 // rtd - rsense channel
103 #define RTD_RSENSE_CHANNEL_LSB 22
104 #define RTD_RSENSE_CHANNEL__NONE (uint32_t) 0x0 << RTD_RSENSE_CHANNEL_LSB
105 #define RTD_RSENSE_CHANNEL__1 (uint32_t) 0x1 << RTD_RSENSE_CHANNEL_LSB
106 #define RTD_RSENSE_CHANNEL__2 (uint32_t) 0x2 << RTD_RSENSE_CHANNEL_LSB
107 #define RTD_RSENSE_CHANNEL__3 (uint32_t) 0x3 << RTD_RSENSE_CHANNEL_LSB
108 #define RTD_RSENSE_CHANNEL__4 (uint32_t) 0x4 << RTD_RSENSE_CHANNEL_LSB
109 #define RTD_RSENSE_CHANNEL__5 (uint32_t) 0x5 << RTD_RSENSE_CHANNEL_LSB
110 #define RTD_RSENSE_CHANNEL__6 (uint32_t) 0x6 << RTD_RSENSE_CHANNEL_LSB
111 #define RTD_RSENSE_CHANNEL__7 (uint32_t) 0x7 << RTD_RSENSE_CHANNEL_LSB
112 #define RTD_RSENSE_CHANNEL__8 (uint32_t) 0x8 << RTD_RSENSE_CHANNEL_LSB
113 #define RTD_RSENSE_CHANNEL__9 (uint32_t) 0x9 << RTD_RSENSE_CHANNEL_LSB
114 #define RTD_RSENSE_CHANNEL__10 (uint32_t) 0xA << RTD_RSENSE_CHANNEL_LSB
115 #define RTD_RSENSE_CHANNEL__11 (uint32_t) 0xB << RTD_RSENSE_CHANNEL_LSB
116 #define RTD_RSENSE_CHANNEL__12 (uint32_t) 0xC << RTD_RSENSE_CHANNEL_LSB
117 #define RTD_RSENSE_CHANNEL__13 (uint32_t) 0xD << RTD_RSENSE_CHANNEL_LSB
118 #define RTD_RSENSE_CHANNEL__14 (uint32_t) 0xE << RTD_RSENSE_CHANNEL_LSB
119 #define RTD_RSENSE_CHANNEL__15 (uint32_t) 0xF << RTD_RSENSE_CHANNEL_LSB
120 #define RTD_RSENSE_CHANNEL__16 (uint32_t) 0x10 << RTD_RSENSE_CHANNEL_LSB
121 #define RTD_RSENSE_CHANNEL__17 (uint32_t) 0x11 << RTD_RSENSE_CHANNEL_LSB
122 #define RTD_RSENSE_CHANNEL__18 (uint32_t) 0x12 << RTD_RSENSE_CHANNEL_LSB
123 #define RTD_RSENSE_CHANNEL__19 (uint32_t) 0x13 << RTD_RSENSE_CHANNEL_LSB
124 #define RTD_RSENSE_CHANNEL__20 (uint32_t) 0x14 << RTD_RSENSE_CHANNEL_LSB
125 // rtd - num wires
126 #define RTD_NUM_WIRES_LSB 20
127 #define RTD_NUM_WIRES__2_WIRE (uint32_t) 0x0 << RTD_NUM_WIRES_LSB
128 #define RTD_NUM_WIRES__3_WIRE (uint32_t) 0x1 << RTD_NUM_WIRES_LSB
129 #define RTD_NUM_WIRES__4_WIRE (uint32_t) 0x2 << RTD_NUM_WIRES_LSB
130 #define RTD_NUM_WIRES__4_WIRE_KELVIN_RSENSE (uint32_t) 0x3 << RTD_NUM_WIRES_LSB
131 // rtd - excitation mode
132 #define RTD_EXCITATION_MODE_LSB 18
133 #define RTD_EXCITATION_MODE__NO_ROTATION_NO_SHARING (uint32_t) 0x0 << RTD_EXCITATION_MODE_LSB
134 #define RTD_EXCITATION_MODE__NO_ROTATION_SHARING (uint32_t) 0x1 << RTD_EXCITATION_MODE_LSB
135 #define RTD_EXCITATION_MODE__ROTATION_SHARING (uint32_t) 0x2 << RTD_EXCITATION_MODE_LSB
136 // rtd - excitation current
137 #define RTD_EXCITATION_CURRENT_LSB 14
138 #define RTD_EXCITATION_CURRENT__INVALID (uint32_t) 0x0 << RTD_EXCITATION_CURRENT_LSB
139 #define RTD_EXCITATION_CURRENT__5UA (uint32_t) 0x1 << RTD_EXCITATION_CURRENT_LSB
140 #define RTD_EXCITATION_CURRENT__10UA (uint32_t) 0x2 << RTD_EXCITATION_CURRENT_LSB
141 #define RTD_EXCITATION_CURRENT__25UA (uint32_t) 0x3 << RTD_EXCITATION_CURRENT_LSB
142 #define RTD_EXCITATION_CURRENT__50UA (uint32_t) 0x4 << RTD_EXCITATION_CURRENT_LSB
143 #define RTD_EXCITATION_CURRENT__100UA (uint32_t) 0x5 << RTD_EXCITATION_CURRENT_LSB
144 #define RTD_EXCITATION_CURRENT__250UA (uint32_t) 0x6 << RTD_EXCITATION_CURRENT_LSB
145 #define RTD_EXCITATION_CURRENT__500UA (uint32_t) 0x7 << RTD_EXCITATION_CURRENT_LSB
146 #define RTD_EXCITATION_CURRENT__1MA (uint32_t) 0x8 << RTD_EXCITATION_CURRENT_LSB
147 // rtd - standard
148 #define RTD_STANDARD_LSB 12
149 #define RTD_STANDARD__EUROPEAN (uint32_t) 0x0 << RTD_STANDARD_LSB
150 #define RTD_STANDARD__AMERICAN (uint32_t) 0x1 << RTD_STANDARD_LSB
151 #define RTD_STANDARD__JAPANESE (uint32_t) 0x2 << RTD_STANDARD_LSB
152 #define RTD_STANDARD__ITS_90 (uint32_t) 0x3 << RTD_STANDARD_LSB
153 // rtd - custom address
154 #define RTD_CUSTOM_ADDRESS_LSB 6
155 // rtd - custom length-1
156 #define RTD_CUSTOM_LENGTH_1_LSB 0
157 // rtd - custom values
158 #define RTD_CUSTOM_VALUES_LSB 31
159 //**********************************************************************************************************
160 // -- Sense Resistor --
161 //**********************************************************************************************************
162 // sense resistor - value
163 #define SENSE_RESISTOR_VALUE_LSB 0
164 //**********************************************************************************************************
165 // -- Direct ADC --
166 //**********************************************************************************************************
167 // Direct ADC - differential?
168 #define DIRECT_ADC_DIFFERENTIAL_LSB 26
169 #define DIRECT_ADC_DIFFERENTIAL (uint32_t) 0x0 << DIRECT_ADC_DIFFERENTIAL_LSB
170 #define DIRECT_ADC_SINGLE_ENDED (uint32_t) 0x1 << DIRECT_ADC_DIFFERENTIAL_LSB
171 //**********************************************************************************************************
172 // -- Thermistor --
173 //**********************************************************************************************************
174 // thermistor - rsense channel
175 #define THERMISTOR_RSENSE_CHANNEL_LSB 22
176 #define THERMISTOR_RSENSE_CHANNEL__NONE (uint32_t) 0x0 << THERMISTOR_RSENSE_CHANNEL_LSB
177 #define THERMISTOR_RSENSE_CHANNEL__1 (uint32_t) 0x1 << THERMISTOR_RSENSE_CHANNEL_LSB
178 #define THERMISTOR_RSENSE_CHANNEL__2 (uint32_t) 0x2 << THERMISTOR_RSENSE_CHANNEL_LSB
179 #define THERMISTOR_RSENSE_CHANNEL__3 (uint32_t) 0x3 << THERMISTOR_RSENSE_CHANNEL_LSB
180 #define THERMISTOR_RSENSE_CHANNEL__4 (uint32_t) 0x4 << THERMISTOR_RSENSE_CHANNEL_LSB
181 #define THERMISTOR_RSENSE_CHANNEL__5 (uint32_t) 0x5 << THERMISTOR_RSENSE_CHANNEL_LSB
182 #define THERMISTOR_RSENSE_CHANNEL__6 (uint32_t) 0x6 << THERMISTOR_RSENSE_CHANNEL_LSB
183 #define THERMISTOR_RSENSE_CHANNEL__7 (uint32_t) 0x7 << THERMISTOR_RSENSE_CHANNEL_LSB
184 #define THERMISTOR_RSENSE_CHANNEL__8 (uint32_t) 0x8 << THERMISTOR_RSENSE_CHANNEL_LSB
185 #define THERMISTOR_RSENSE_CHANNEL__9 (uint32_t) 0x9 << THERMISTOR_RSENSE_CHANNEL_LSB
186 #define THERMISTOR_RSENSE_CHANNEL__10 (uint32_t) 0xA << THERMISTOR_RSENSE_CHANNEL_LSB
187 #define THERMISTOR_RSENSE_CHANNEL__11 (uint32_t) 0xB << THERMISTOR_RSENSE_CHANNEL_LSB
188 #define THERMISTOR_RSENSE_CHANNEL__12 (uint32_t) 0xC << THERMISTOR_RSENSE_CHANNEL_LSB
189 #define THERMISTOR_RSENSE_CHANNEL__13 (uint32_t) 0xD << THERMISTOR_RSENSE_CHANNEL_LSB
190 #define THERMISTOR_RSENSE_CHANNEL__14 (uint32_t) 0xE << THERMISTOR_RSENSE_CHANNEL_LSB
191 #define THERMISTOR_RSENSE_CHANNEL__15 (uint32_t) 0xF << THERMISTOR_RSENSE_CHANNEL_LSB
192 #define THERMISTOR_RSENSE_CHANNEL__16 (uint32_t) 0x10 << THERMISTOR_RSENSE_CHANNEL_LSB
193 #define THERMISTOR_RSENSE_CHANNEL__17 (uint32_t) 0x11 << THERMISTOR_RSENSE_CHANNEL_LSB
194 #define THERMISTOR_RSENSE_CHANNEL__18 (uint32_t) 0x12 << THERMISTOR_RSENSE_CHANNEL_LSB
195 #define THERMISTOR_RSENSE_CHANNEL__19 (uint32_t) 0x13 << THERMISTOR_RSENSE_CHANNEL_LSB
196 #define THERMISTOR_RSENSE_CHANNEL__20 (uint32_t) 0x14 << THERMISTOR_RSENSE_CHANNEL_LSB
197 // thermistor - differential?
198 #define THERMISTOR_DIFFERENTIAL_LSB 21
199 #define THERMISTOR_DIFFERENTIAL (uint32_t) 0x0 << THERMISTOR_DIFFERENTIAL_LSB
200 #define THERMISTOR_SINGLE_ENDED (uint32_t) 0x1 << THERMISTOR_DIFFERENTIAL_LSB
201 // thermistor - excitation mode
202 #define THERMISTOR_EXCITATION_MODE_LSB 19
203 #define THERMISTOR_EXCITATION_MODE__NO_SHARING_NO_ROTATION (uint32_t) 0x0 << THERMISTOR_EXCITATION_MODE_LSB
204 #define THERMISTOR_EXCITATION_MODE__SHARING_ROTATION (uint32_t) 0x1 << THERMISTOR_EXCITATION_MODE_LSB
205 #define THERMISTOR_EXCITATION_MODE__SHARING_NO_ROTATION (uint32_t) 0x2 << THERMISTOR_EXCITATION_MODE_LSB
206 // thermistor - excitation current
207 #define THERMISTOR_EXCITATION_CURRENT_LSB 15
208 #define THERMISTOR_EXCITATION_CURRENT__INVALID (uint32_t) 0x0 << THERMISTOR_EXCITATION_CURRENT_LSB
209 #define THERMISTOR_EXCITATION_CURRENT__250NA (uint32_t) 0x1 << THERMISTOR_EXCITATION_CURRENT_LSB
210 #define THERMISTOR_EXCITATION_CURRENT__500NA (uint32_t) 0x2 << THERMISTOR_EXCITATION_CURRENT_LSB
211 #define THERMISTOR_EXCITATION_CURRENT__1UA (uint32_t) 0x3 << THERMISTOR_EXCITATION_CURRENT_LSB
212 #define THERMISTOR_EXCITATION_CURRENT__5UA (uint32_t) 0x4 << THERMISTOR_EXCITATION_CURRENT_LSB
213 #define THERMISTOR_EXCITATION_CURRENT__10UA (uint32_t) 0x5 << THERMISTOR_EXCITATION_CURRENT_LSB
214 #define THERMISTOR_EXCITATION_CURRENT__25UA (uint32_t) 0x6 << THERMISTOR_EXCITATION_CURRENT_LSB
215 #define THERMISTOR_EXCITATION_CURRENT__50UA (uint32_t) 0x7 << THERMISTOR_EXCITATION_CURRENT_LSB
216 #define THERMISTOR_EXCITATION_CURRENT__100UA (uint32_t) 0x8 << THERMISTOR_EXCITATION_CURRENT_LSB
217 #define THERMISTOR_EXCITATION_CURRENT__250UA (uint32_t) 0x9 << THERMISTOR_EXCITATION_CURRENT_LSB
218 #define THERMISTOR_EXCITATION_CURRENT__500UA (uint32_t) 0xA << THERMISTOR_EXCITATION_CURRENT_LSB
219 #define THERMISTOR_EXCITATION_CURRENT__1MA (uint32_t) 0xB << THERMISTOR_EXCITATION_CURRENT_LSB
220 #define THERMISTOR_EXCITATION_CURRENT__AUTORANGE (uint32_t) 0xC << THERMISTOR_EXCITATION_CURRENT_LSB
221 // thermistor - custom address
222 #define THERMISTOR_CUSTOM_ADDRESS_LSB 6
223 // thermistor - custom length-1
224 #define THERMISTOR_CUSTOM_LENGTH_1_LSB 0
225 // thermistor - custom values
226 #define THERMISTOR_CUSTOM_VALUES_LSB 31
227 //**********************************************************************************************************
228 // -- Thermocouple --
229 //**********************************************************************************************************
230 // tc - cold junction ch
231 #define TC_COLD_JUNCTION_CH_LSB 22
232 #define TC_COLD_JUNCTION_CH__NONE (uint32_t) 0x0 << TC_COLD_JUNCTION_CH_LSB
233 #define TC_COLD_JUNCTION_CH__1 (uint32_t) 0x1 << TC_COLD_JUNCTION_CH_LSB
234 #define TC_COLD_JUNCTION_CH__2 (uint32_t) 0x2 << TC_COLD_JUNCTION_CH_LSB
235 #define TC_COLD_JUNCTION_CH__3 (uint32_t) 0x3 << TC_COLD_JUNCTION_CH_LSB
236 #define TC_COLD_JUNCTION_CH__4 (uint32_t) 0x4 << TC_COLD_JUNCTION_CH_LSB
237 #define TC_COLD_JUNCTION_CH__5 (uint32_t) 0x5 << TC_COLD_JUNCTION_CH_LSB
238 #define TC_COLD_JUNCTION_CH__6 (uint32_t) 0x6 << TC_COLD_JUNCTION_CH_LSB
239 #define TC_COLD_JUNCTION_CH__7 (uint32_t) 0x7 << TC_COLD_JUNCTION_CH_LSB
240 #define TC_COLD_JUNCTION_CH__8 (uint32_t) 0x8 << TC_COLD_JUNCTION_CH_LSB
241 #define TC_COLD_JUNCTION_CH__9 (uint32_t) 0x9 << TC_COLD_JUNCTION_CH_LSB
242 #define TC_COLD_JUNCTION_CH__10 (uint32_t) 0xA << TC_COLD_JUNCTION_CH_LSB
243 #define TC_COLD_JUNCTION_CH__11 (uint32_t) 0xB << TC_COLD_JUNCTION_CH_LSB
244 #define TC_COLD_JUNCTION_CH__12 (uint32_t) 0xC << TC_COLD_JUNCTION_CH_LSB
245 #define TC_COLD_JUNCTION_CH__13 (uint32_t) 0xD << TC_COLD_JUNCTION_CH_LSB
246 #define TC_COLD_JUNCTION_CH__14 (uint32_t) 0xE << TC_COLD_JUNCTION_CH_LSB
247 #define TC_COLD_JUNCTION_CH__15 (uint32_t) 0xF << TC_COLD_JUNCTION_CH_LSB
248 #define TC_COLD_JUNCTION_CH__16 (uint32_t) 0x10 << TC_COLD_JUNCTION_CH_LSB
249 #define TC_COLD_JUNCTION_CH__17 (uint32_t) 0x11 << TC_COLD_JUNCTION_CH_LSB
250 #define TC_COLD_JUNCTION_CH__18 (uint32_t) 0x12 << TC_COLD_JUNCTION_CH_LSB
251 #define TC_COLD_JUNCTION_CH__19 (uint32_t) 0x13 << TC_COLD_JUNCTION_CH_LSB
252 #define TC_COLD_JUNCTION_CH__20 (uint32_t) 0x14 << TC_COLD_JUNCTION_CH_LSB
253 // tc - differential?
254 #define TC_DIFFERENTIAL_LSB 21
255 #define TC_DIFFERENTIAL (uint32_t) 0x0 << TC_DIFFERENTIAL_LSB
256 #define TC_SINGLE_ENDED (uint32_t) 0x1 << TC_DIFFERENTIAL_LSB
257 // tc - open ckt detect?
258 #define TC_OPEN_CKT_DETECT_LSB 20
259 #define TC_OPEN_CKT_DETECT__NO (uint32_t) 0x0 << TC_OPEN_CKT_DETECT_LSB
260 #define TC_OPEN_CKT_DETECT__YES (uint32_t) 0x1 << TC_OPEN_CKT_DETECT_LSB
261 // tc - open ckt detect current
262 #define TC_OPEN_CKT_DETECT_CURRENT_LSB 18
263 #define TC_OPEN_CKT_DETECT_CURRENT__10UA (uint32_t) 0x0 << TC_OPEN_CKT_DETECT_CURRENT_LSB
264 #define TC_OPEN_CKT_DETECT_CURRENT__100UA (uint32_t) 0x1 << TC_OPEN_CKT_DETECT_CURRENT_LSB
265 #define TC_OPEN_CKT_DETECT_CURRENT__500UA (uint32_t) 0x2 << TC_OPEN_CKT_DETECT_CURRENT_LSB
266 #define TC_OPEN_CKT_DETECT_CURRENT__1MA (uint32_t) 0x3 << TC_OPEN_CKT_DETECT_CURRENT_LSB
267 // tc - custom address
268 #define TC_CUSTOM_ADDRESS_LSB 6
269 // tc - custom length-1
270 #define TC_CUSTOM_LENGTH_1_LSB 0
271 // tc - custom values
272 #define TC_CUSTOM_VALUES_LSB 31
273 //**********************************************************************************************************
274 // -- Off-Chip Diode --
275 //**********************************************************************************************************
276 // diode - differential?
277 #define DIODE_DIFFERENTIAL_LSB 26
278 #define DIODE_DIFFERENTIAL (uint32_t) 0x0 << DIODE_DIFFERENTIAL_LSB
279 #define DIODE_SINGLE_ENDED (uint32_t) 0x1 << DIODE_DIFFERENTIAL_LSB
280 // diode - num readings
281 #define DIODE_NUM_READINGS_LSB 25
282 #define DIODE_NUM_READINGS__2 (uint32_t) 0x0 << DIODE_NUM_READINGS_LSB
283 #define DIODE_NUM_READINGS__3 (uint32_t) 0x1 << DIODE_NUM_READINGS_LSB
284 // diode - averaging on?
285 #define DIODE_AVERAGING_ON_LSB 24
286 #define DIODE_AVERAGING_OFF (uint32_t) 0x0 << DIODE_AVERAGING_ON_LSB
287 #define DIODE_AVERAGING_ON (uint32_t) 0x1 << DIODE_AVERAGING_ON_LSB
288 // diode - current
289 #define DIODE_CURRENT_LSB 22
290 #define DIODE_CURRENT__10UA_40UA_80UA (uint32_t) 0x0 << DIODE_CURRENT_LSB
291 #define DIODE_CURRENT__20UA_80UA_160UA (uint32_t) 0x1 << DIODE_CURRENT_LSB
292 #define DIODE_CURRENT__40UA_160UA_320UA (uint32_t) 0x2 << DIODE_CURRENT_LSB
293 #define DIODE_CURRENT__80UA_320UA_640UA (uint32_t) 0x3 << DIODE_CURRENT_LSB
294 // diode - ideality factor(eta)
295 #define DIODE_IDEALITY_FACTOR_LSB 0
296 //**********************************************************************************************************
297 // -- GLOBAL CONFIGURATION CONSTANTS --
298 //**********************************************************************************************************
299 #define REJECTION__50_60_HZ (uint8_t) 0x0
300 #define REJECTION__60_HZ (uint8_t) 0x1
301 #define REJECTION__50_HZ (uint8_t) 0x2
302 #define TEMP_UNIT__C (uint8_t) 0x0
303 #define TEMP_UNIT__F (uint8_t) 0x4
304 //**********************************************************************************************************
305 // -- STATUS BYTE CONSTANTS --
306 //**********************************************************************************************************
307 #define SENSOR_HARD_FAILURE (uint8_t) 0x80
308 #define ADC_HARD_FAILURE (uint8_t) 0x40
309 #define CJ_HARD_FAILURE (uint8_t) 0x20
310 #define CJ_SOFT_FAILURE (uint8_t) 0x10
311 #define SENSOR_ABOVE (uint8_t) 0x8
312 #define SENSOR_BELOW (uint8_t) 0x4
313 #define ADC_RANGE_ERROR (uint8_t) 0x2
314 #define VALID (uint8_t) 0x1
315 //**********************************************************************************************************
316 // -- ADDRESSES --
317 //**********************************************************************************************************
318 #define COMMAND_STATUS_REGISTER (uint16_t) 0x0000
319 #define CH_ADDRESS_BASE (uint16_t) 0x0200
320 #define VOUT_CH_BASE (uint16_t) 0x0060
321 #define READ_CH_BASE (uint16_t) 0x0010
322 #define CONVERSION_RESULT_MEMORY_BASE (uint16_t) 0x0010
323 //**********************************************************************************************************
324 // -- MISC CONSTANTS --
325 //**********************************************************************************************************
326 #define WRITE_TO_RAM (uint8_t) 0x02
327 #define READ_FROM_RAM (uint8_t) 0x03
328 #define CONVERSION_CONTROL_BYTE (uint8_t) 0x80
329 
330 #define VOLTAGE (uint8_t) 0x01
331 #define TEMPERATURE (uint8_t) 0x02