| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

DC1012AA.ino
Go to the documentation of this file.
1 /*!
2 Linear Technology DC1012A-A Demonstration Board.
3 LTC2499: 24-Bit, 16-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation
4
5 @verbatim
6
7 NOTES
8 Setup:
9 Set the terminal baud rate to 115200 and select the newline terminator. Equipment
10 required is a precision voltage source and a precision voltmeter. Additionally,
11 an external power supply is required to provide a negative voltage for Amp V-.
12 Set it to anywhere from -1V to -5V. Set Amp V+ to Vcc. Ensure the COM and REF-
13 pins are connected to ground. The REF+ pin should be connected to +5V.
14
15 How to test Single-Ended mode:
16 The voltage source should be connected to the ADC such that the negative lead is
17 connected to the COM(common) pin. The positive lead may be connected to any
18 channel input. Ensure voltage is within analog input voltage range -0.3 to 2.5V.
19
20 How to test Differential Mode:
21 The voltage source should be connected with positive and negative leads to paired
22 channels. The voltage source negative output must also be connected to the COM
23 pin in order to provide a ground-referenced voltage. Ensure voltage is within
24 analog input voltage range -0.3V to +2.5V. Swapping input voltages results in a
25 reversed polarity reading.
26
27 USER INPUT DATA FORMAT:
28 decimal : 1024
29 hex : 0x400
30 octal : 02000 (leading 0 "zero")
31 binary : B10000000000
32 float : 1024.0
33
34 @endverbatim
35
36 http://www.linear.com/product/LTC2499
37
38 http://www.linear.com/product/LTC2499#demoboards
39
40
41 Copyright 2018(c) Analog Devices, Inc.
42
43 All rights reserved.
44
45 Redistribution and use in source and binary forms, with or without
46 modification, are permitted provided that the following conditions are met:
47 - Redistributions of source code must retain the above copyright
48 notice, this list of conditions and the following disclaimer.
49 - Redistributions in binary form must reproduce the above copyright
50 notice, this list of conditions and the following disclaimer in
51 the documentation and/or other materials provided with the
52 distribution.
53 - Neither the name of Analog Devices, Inc. nor the names of its
54 contributors may be used to endorse or promote products derived
55 from this software without specific prior written permission.
56 - The use of this software may or may not infringe the patent rights
57 of one or more patent holders. This license does not release you
58 from the requirement that you obtain separate licenses from these
59 patent holders to use this software.
60 - Use of the software either in source or binary form, must be run
61 on or directly connected to an Analog Devices Inc. component.
62
63 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
64 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
65 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
66 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
67 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
68 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
69 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
70 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
71 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
72 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
73
74 */
75
76 /*! @file
77 @ingroup LTC2499
78 */
79
80 #include <Arduino.h>
81 #include <stdint.h>
82 #include "Linduino.h"
83 #include <SPI.h>
84 #include "UserInterface.h"
85 #include "LTC24XX_general.h"
86 #include "LTC2499.h"
87 #include "USE_WIRE.h"
88 #include "LT_SPI.h"
89
90 #ifdef USEWIRE
91 #include "LT_I2C_Wire.h"
92 #include "QuikEval_EEPROM_Wire.h"
93 #else
94 #include "LT_I2C.h"
95 #include "QuikEval_EEPROM.h"
96 #endif
97
98 // Function Declaration
99 void print_title(); // Print the title block
100 void print_prompt(); // Prompt the user for an input command
101 void print_user_command(uint8_t menu); // Display selected differential channels
102
103 int8_t menu_1_read_single_ended();
104 int8_t menu_2_read_differential();
105 int8_t menu_3_read_temperature();
106 void menu_4_set_1X2X();
107 void menu_5_set_address();
108
109 // Global variables
110 static uint8_t demo_board_connected; //!< Set to 1 if the board is connected
111 static int16_t two_x_mode = LTC2499_SPEED_1X; //!< The LTC2499 2X Mode settings
112 static float LTC2499_vref = 2.5; //!< The LTC2499 reference voltage
113 static uint8_t rejection_mode = LTC2499_R50_R60; //!< The LTC2499 rejection mode
114 static uint8_t i2c_address = LTC2497_I2C_ADDRESS; //!< I2C address in 7 bit format for part
115 static uint16_t eoc_timeout = 300; //!< Timeout in ms
116
117 // Constants
118
119 //! Lookup table to build the command for single-ended mode
120 const uint16_t BUILD_COMMAND_SINGLE_ENDED[16] = {LTC2499_CH0, LTC2499_CH1, LTC2499_CH2, LTC2499_CH3,
121 LTC2499_CH4, LTC2499_CH5, LTC2499_CH6, LTC2499_CH7,
122 LTC2499_CH8, LTC2499_CH9, LTC2499_CH10, LTC2499_CH11,
123 LTC2499_CH12, LTC2499_CH13, LTC2499_CH14, LTC2499_CH15
124 }; //!< Builds the command for single-ended mode
125
126 //! Lookup table to build the command for differential mode
127 const uint16_t BUILD_COMMAND_DIFF[16] = {LTC2499_P0_N1, LTC2499_P2_N3, LTC2499_P4_N5, LTC2499_P6_N7,
128 LTC2499_P8_N9, LTC2499_P10_N11, LTC2499_P12_N13, LTC2499_P14_N15,
129 LTC2499_P1_N0, LTC2499_P3_N2, LTC2499_P5_N4, LTC2499_P7_N6,
130 LTC2499_P9_N8, LTC2499_P11_N10, LTC2499_P13_N12, LTC2499_P15_N14
131 }; //!< Build the command for differential mode
132
133
134 //! Lookup table to build 1X / 2X bits
135 const uint16_t BUILD_1X_2X_COMMAND[2] = {LTC2499_SPEED_1X, LTC2499_SPEED_2X}; //!< Build the command for 1x or 2x mode
136
137
138 //! Initialize Linduino
139 void setup()
140 {
141 char demo_name[]="DC1012"; // Demo Board Name stored in QuikEval EEPROM
142 quikeval_I2C_init(); // Configure the EEPROM I2C port for 100kHz
143 quikeval_I2C_connect(); // Connect I2C to main data port
144 Serial.begin(115200); // Initialize the serial port to the PC
145 print_title();
146
147 demo_board_connected = discover_demo_board(demo_name);
148 if (demo_board_connected)
149 {
150 print_prompt();
151 }
152 else
153 {
154 Serial.println(F("EEPROM not detected, will attempt to proceed"));
155 demo_board_connected = 1;
156 print_prompt();
157 }
158 }
159
160 //! Repeats Linduino loop
161 void loop()
162 {
163 int16_t user_command; // The user input command
164 uint8_t acknowledge = 0;
165 if (demo_board_connected)
166 {
167 if (Serial.available()) // Check for user input
168 {
169 user_command = read_int(); // Read the user command
170 if (user_command != 'm')
171 Serial.println(user_command); // Prints the user command to com port
172 Serial.flush();
173 switch (user_command)
174 {
175 case 1:
176 acknowledge |= menu_1_read_single_ended();
177 break;
178 case 2:
179 acknowledge |= menu_2_read_differential();
180 break;
181 case 3:
182 acknowledge |=menu_3_read_temperature();
183 break;
184 case 4:
185 menu_4_set_1X2X();
186 break;
187 case 5:
188 menu_5_set_address();
189 break;
190 default:
191 Serial.println(F("Incorrect Option"));
192 }
193 if (acknowledge)
194 Serial.println(F("***** I2C ERROR *****"));
195 Serial.print(F("\n*************************\n"));
196 print_prompt();
197 }
198 }
199 }
200
201 // Function Definitions
202
203 //! Prints the title block when program first starts.
204 void print_title()
205 {
206 Serial.print(F("\n*****************************************************************\n"));
207 Serial.print(F("* DC1012A-A Demonstration Program *\n"));
208 Serial.print(F("* *\n"));
209 Serial.print(F("* This program demonstrates how to send data and receive data *\n"));
210 Serial.print(F("* from the 24-bit ADC. *\n"));
211 Serial.print(F("* *\n"));
212 Serial.print(F("* *\n"));
213 Serial.print(F("* Set the baud rate to 115200 and select the newline terminator.*\n"));
214 Serial.print(F("* *\n"));
215 Serial.print(F("*****************************************************************\n"));
216 }
217
218 //! Prints main menu.
219 void print_prompt()
220 {
221 Serial.print(F("\n1-Read Single-Ended\n"));
222 Serial.print(F("2-Read Differential\n"));
223 Serial.print(F("3-Read Temperature\n"));
224 Serial.print(F("4-2X Mode Settings\n"));
225 Serial.print(F("5-Set I2C Address\n"));
226 Serial.print(F("Enter a Command: "));
227 }
228
229 //! Display selected differential channels. Displaying single-ended channels is
230 //! straightforward; not so with differential because the inputs can take either polarity.
231 void print_user_command(uint8_t menu)
232 {
233 switch (menu)
234 {
235 case 0:
236 Serial.print(F("0P-1N"));
237 break;
238 case 1:
239 Serial.print(F("2P-3N"));
240 break;
241 case 2:
242 Serial.print(F("4P-5N"));
243 break;
244 case 3:
245 Serial.print(F("6P-7N"));
246 break;
247 case 4:
248 Serial.print(F("8P-9N"));
249 break;
250 case 5:
251 Serial.print(F("10P-11N"));
252 break;
253 case 6:
254 Serial.print(F("12P-13N"));
255 break;
256 case 7:
257 Serial.print(F("14P-15N"));
258 break;
259 case 8:
260 Serial.print(F("1P-0N"));
261 break;
262 case 9:
263 Serial.print(F("3P-2N"));
264 break;
265 case 10:
266 Serial.print(F("5P-4N"));
267 break;
268 case 11:
269 Serial.print(F("7P-6N"));
270 break;
271 case 12:
272 Serial.print(F("9P-8N"));
273 break;
274 case 13:
275 Serial.print(F("11P-10N"));
276 break;
277 case 14:
278 Serial.print(F("13P-12N"));
279 break;
280 case 15:
281 Serial.print(F("15P-14N"));
282 break;
283 }
284 Serial.print(F(": "));
285 }
286
287 //! Read channels in single-ended mode
288 //! @return 0 if successful, 1 is failure
289 int8_t menu_1_read_single_ended()
290 {
291 uint8_t adc_command_high; // The LTC2499 command high byte
292 uint8_t adc_command_low; // The LTC2499 command high byte
293 int16_t user_command; // The user input command
294 int32_t adc_code = 0; // The LTC2499 code
295 float adc_voltage=0; // The LTC2499 voltage
296
297 while (1)
298 {
299 uint8_t ack = 0;
300
301 Serial.print(F("*************************\n\n"));
302 Serial.print(F("0-CH0 8-CH8\n"));
303 Serial.print(F("1-CH1 9-CH9\n"));
304 Serial.print(F("2-CH2 10-CH10\n"));
305 Serial.print(F("3-CH3 11-CH11\n"));
306 Serial.print(F("4-CH4 12-CH12\n"));
307 Serial.print(F("5-CH5 13-CH13\n"));
308 Serial.print(F("6-CH6 14-CH14\n"));
309 Serial.print(F("7-CH7 15-CH15\n"));
310 Serial.print(F("16-ALL\n"));
311 Serial.print(F("m-Main Menu\n"));
312 Serial.print(F("Enter a Command: "));
313
314 user_command = read_int(); // Read the single command
315 if (user_command == 'm')
316 return(0);
317 Serial.println(user_command);
318
319 if (user_command == 16)
320 {
321 Serial.print(F("ALL\n"));
322 adc_command_high = BUILD_COMMAND_SINGLE_ENDED[0]; // Build ADC command for channel 0
323 adc_command_low = rejection_mode| two_x_mode;
324 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout); // Throws out last reading
325
326 for (int8_t x = 0; x <= 15; x++) // Read all channels in single-ended mode
327 {
328
329 adc_command_high = BUILD_COMMAND_SINGLE_ENDED[(x + 1) % 16];
330
331 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout);
332 adc_voltage = LTC2499_code_to_voltage(adc_code, LTC2499_vref);
333 if (!ack)
334 {
335 Serial.print(F(" ****"));
336 Serial.print(F("CH"));
337 Serial.print(x);
338 Serial.print(F(": "));
339 Serial.print(adc_voltage, 4);
340 Serial.print(F("V\n\n"));
341 }
342 else
343 {
344 Serial.print(F(" ****"));
345 Serial.print(F("CH"));
346 Serial.print(x);
347 Serial.print(F(": "));
348 Serial.print(F("Error in read"));
349 return 1;
350 }
351 }
352 }
353 else
354 {
355 adc_command_high = BUILD_COMMAND_SINGLE_ENDED[user_command];
356 adc_command_low = rejection_mode | two_x_mode;
357 Serial.print(F("ADC Command: 0x"));
358 Serial.println((adc_command_high<<8)|adc_command_low, HEX);
359 Serial.print(F("I2C address is: "));
360 Serial.println(i2c_address,HEX);
361
362 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout); // Throws out last reading
363
364 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout); // Now we're ready to read the desired data
365 if (!ack)
366 {
367 Serial.print(F("Received Code: 0x"));
368 Serial.println(adc_code, HEX);
369 adc_voltage = LTC2499_code_to_voltage(adc_code, LTC2499_vref);
370 Serial.print(F(" ****"));
371 Serial.print(F("CH"));
372 Serial.print(user_command);
373 Serial.print(F(": "));
374 Serial.print(adc_voltage, 4);
375 Serial.print(F("V\n\n"));
376 }
377 else
378 {
379 Serial.println(F("Device NAK'd, please check address and try again"));
380 return 1;
381 }
382 }
383 }
384 return(0);
385 }
386
387 //! Read channels in differential mode
388 //! @return 0 if successful, 1 is failure
389 int8_t menu_2_read_differential()
390 {
391 int8_t y; // Offset into differential channel array to select polarity
392 uint8_t adc_command_high; // The LTC2499 command high byte
393 uint8_t adc_command_low; // The LTC2499 command high byte
394 int16_t user_command; // The user input command
395 int32_t adc_code = 0; // The LTC2499 code
396 float adc_voltage; // The LTC2499 voltage
397
398 while (1)
399 {
400 uint8_t ack = 0;
401
402 Serial.print(F("\n*************************\n\n")); // Display differential menu
403 Serial.print(F("0-0P-1N 8-1P-0N\n"));
404 Serial.print(F("1-2P-3N 9-3P-2N\n"));
405 Serial.print(F("2-4P-5N 10-5P-4N\n"));
406 Serial.print(F("3-6P-7N 11-7P-6N\n"));
407 Serial.print(F("4-8P-9N 12-9P-8N\n"));
408 Serial.print(F("5-10P-11N 13-11P-10N\n"));
409 Serial.print(F("6-12P_13N 14-13P-12N\n"));
410 Serial.print(F("7-14P-15N 15-15P-14N\n"));
411 Serial.print(F("16-ALL Even_P-Odd_N\n"));
412 Serial.print(F("17-ALL Odd_P-Even_N\n"));
413 Serial.print(F("m-Main Menu\n"));
414
415 user_command = read_int(); // Read the single command
416 if (user_command == 'm')
417 return(0);
418 Serial.println(user_command);
419
420 if ((user_command == 16) || (user_command == 17))
421 {
422 if (user_command == 16)
423 {
424 Serial.print(F("ALL Even_P-Odd_N\n")); // Cycles through options 0-7
425 y = 0;
426 }
427 if (user_command == 17)
428 {
429 Serial.print(F("ALL Odd_P-Even_N\n")); // Cycles through options 8-15
430 y = 8;
431 }
432
433 adc_command_high = BUILD_COMMAND_DIFF[y];
434 adc_command_low = rejection_mode | two_x_mode; // Build the channel 0 and 1 for differential mode
435
436 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout); // Throws out reading
437 for (int8_t x = 0; x < 8; x++) // Read all channels in differential mode. All even channels are positive and odd channels are negative
438 {
439
440 adc_command_high = BUILD_COMMAND_DIFF[((x + 1) % 8) + y];
441
442 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout);
443 if (!ack)
444 {
445 Serial.print(F("Received Code: 0x"));
446 Serial.println(adc_code, HEX);
447 adc_voltage = LTC2499_code_to_voltage(adc_code, LTC2499_vref);
448 Serial.print(F("\n ****"));
449 print_user_command(x + y);
450 Serial.print(F(": "));
451 Serial.print(adc_voltage, 4);
452 Serial.print(F("V\n"));
453 }
454 else
455 {
456 Serial.println(F("Device NAK'd, please check I2C address"));
457 return 1;
458 }
459 }
460 }
461 else
462 {
463 // Reads and displays a selected channel
464 adc_command_high = BUILD_COMMAND_DIFF[user_command];
465 adc_command_low = rejection_mode | two_x_mode;
466
467 Serial.print(F("ADC Command: 0x"));
468 Serial.println((adc_command_high<<8)|adc_command_low, HEX);
469
470 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout); // Throws out last reading
471
472 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout); // Now we're ready to read the desired data
473
474 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout);
475 if (!ack)
476 {
477 Serial.print(F("Received Code: 0x"));
478 Serial.println(adc_code, HEX);
479 adc_voltage = LTC2499_code_to_voltage(adc_code, LTC2499_vref);
480 Serial.print(F("\n ****"));
481 print_user_command(user_command);
482 Serial.print(adc_voltage, 4);
483 Serial.print(F("V\n"));
484 }
485 else
486 {
487 Serial.println(F("Device NAK'd, please check I2C address"));
488 return 1;
489 }
490 }
491 }
492 return(0);
493 }
494
495 //! Read Temperature
496 int8_t menu_3_read_temperature()
497 {
498 uint8_t adc_command_high; // The LTC2499 command high byte
499 uint8_t adc_command_low; // The LTC2499 command high byte
500 uint16_t ack = 0;
501 int32_t adc_code = 0; // The LTC2499 code
502 float adc_voltage; // The LTC2499 voltage
503
504 adc_command_high = BUILD_COMMAND_DIFF[0]; // Any channel can be used
505 adc_command_low = rejection_mode | LTC2499_INTERNAL_TEMP;
506
507 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout); // Throws out last reading
508
509 ack |= LTC2499_read(i2c_address, adc_command_high, adc_command_low, &adc_code, eoc_timeout); // Now we're ready to read the desired data
510 if (!ack)
511 {
512 Serial.print(F("Received Code: 0x"));
513 Serial.println(adc_code, HEX);
514 adc_voltage = LTC2499_code_to_voltage(adc_code, LTC2499_vref);
515 Serial.print(F("\n ****"));
516 Serial.print(adc_voltage, 4);
517 Serial.print(F("V\n"));
518 Serial.print(F("This equals to: "));
519 float temperature = (adc_voltage/93.5e-6);
520 Serial.print(temperature, DEC);
521 Serial.print(F(" K\n"));
522 }
523 else
524 {
525 Serial.println(F("Device NAK'd, please check I2C address"));
526 return 1;
527 }
528 return 0;
529 }
530
531 //! Set 1X or 2X mode
532 void menu_4_set_1X2X()
533 {
534 int16_t user_command; // The user input command
535
536 // 2X Mode
537 Serial.print(F("2X Mode Settings\n\n"));
538 Serial.print(F("0-Disable\n"));
539 Serial.print(F("1-Enable\n"));
540 Serial.print(F("Enter a Command: "));
541 user_command = read_int();
542 Serial.println(user_command);
543
544 if (user_command == 0)
545 {
546 two_x_mode = LTC2499_SPEED_1X;
547 Serial.print(F("2X Mode Disabled\n"));
548 }
549 else
550 {
551 two_x_mode = LTC2499_SPEED_2X;
552 Serial.print(F("2X Mode Enabled\n"));
553 }
554 }
555
556 //! Set the I2C 7 bit address
557 void menu_5_set_address()
558 {
559 int16_t user_command;
560 Serial.print(F("What is the I2C address of the part?\n"));
561 Serial.print(F("Please enter in 7-bit format, decimal\n"));
562
563 user_command =read_int();
564 Serial.println(user_command);
565 i2c_address = user_command&0x7F;
566 }
LTC2499_CH6
#define LTC2499_CH6
Definition: LTC2499.h:177
menu_5_set_address
static void menu_5_set_address()
Set the I2C 7 bit address.
Definition: DC1012AA.ino:557
LTC2499_P3_N2
#define LTC2499_P3_N2
Definition: LTC2499.h:195
LTC2499_CH13
#define LTC2499_CH13
Definition: LTC2499.h:184
print_title
static void print_title()
Prints the title block when program first starts.
Definition: DC1012AA.ino:204
user_command
unsigned char user_command
Definition: Serial_EEPROM_Test.ino:75
LTC2499_P7_N6
#define LTC2499_P7_N6
Definition: LTC2499.h:201
QuikEval_EEPROM_Wire.h
QuikEval EEPROM Library.
LTC2499_P15_N14
#define LTC2499_P15_N14
Definition: LTC2499.h:213
LTC2499_P1_N0
#define LTC2499_P1_N0
Definition: LTC2499.h:192
USE_WIRE.h
LTC2499_P5_N4
#define LTC2499_P5_N4
Definition: LTC2499.h:198
loop
static void loop()
Repeats Linduino loop.
Definition: DC1012AA.ino:161
LTC2499_CH14
#define LTC2499_CH14
Definition: LTC2499.h:185
Linduino.h
Header File for Linduino Libraries and Demo Code.
print_user_command
static void print_user_command(uint8_t menu)
Display selected differential channels.
Definition: DC1012AA.ino:231
LTC2499_INTERNAL_TEMP
#define LTC2499_INTERNAL_TEMP
Definition: LTC2499.h:159
setup
static void setup()
Initialize Linduino.
Definition: DC1012AA.ino:139
LTC2499_CH3
#define LTC2499_CH3
Definition: LTC2499.h:174
LTC2499_CH1
#define LTC2499_CH1
Definition: LTC2499.h:172
LTC2499_CH5
#define LTC2499_CH5
Definition: LTC2499.h:176
menu_1_read_single_ended
static int8_t menu_1_read_single_ended()
Read channels in single-ended mode.
Definition: DC1012AA.ino:289
LTC2499_P4_N5
#define LTC2499_P4_N5
Definition: LTC2499.h:197
LTC2499_read
uint8_t LTC2499_read(uint8_t i2c_address, uint8_t adc_command_high, uint8_t adc_command_low, int32_t *adc_code, uint16_t timeout)
Reads from LTC2499.
Definition: LTC2499.cpp:80
eoc_timeout
static uint16_t eoc_timeout
Timeout in ms.
Definition: DC1012AA.ino:115
LTC2499_SPEED_2X
#define LTC2499_SPEED_2X
Definition: LTC2499.h:158
LTC2499_CH4
#define LTC2499_CH4
Definition: LTC2499.h:175
LTC2499_P2_N3
#define LTC2499_P2_N3
Definition: LTC2499.h:194
print_prompt
static void print_prompt()
Prints main menu.
Definition: DC1012AA.ino:219
menu_3_read_temperature
static int8_t menu_3_read_temperature()
Read Temperature.
Definition: DC1012AA.ino:496
LTC2497_I2C_ADDRESS
#define LTC2497_I2C_ADDRESS
I2C address of the LTC2497.
Definition: LTC2497.h:128
BUILD_COMMAND_DIFF
const uint16_t BUILD_COMMAND_DIFF[16]
Lookup table to build the command for differential mode.
Definition: DC1012AA.ino:127
LTC2499_P14_N15
#define LTC2499_P14_N15
Definition: LTC2499.h:212
LTC2499_P10_N11
#define LTC2499_P10_N11
Definition: LTC2499.h:206
adc_voltage
static float adc_voltage
Definition: DC2071AA.ino:115
LTC2499_R50_R60
#define LTC2499_R50_R60
Definition: LTC2499.h:164
LTC2499_vref
static float LTC2499_vref
The LTC2499 reference voltage.
Definition: DC1012AA.ino:112
LTC24XX_general.h
LTC24XX General Library: Functions and defines for all SINC4 Delta Sigma ADCs.
LTC2499_CH10
#define LTC2499_CH10
Definition: LTC2499.h:181
LTC2499_CH11
#define LTC2499_CH11
Definition: LTC2499.h:182
LTC2499_CH9
#define LTC2499_CH9
Definition: LTC2499.h:180
LTC2499_P12_N13
#define LTC2499_P12_N13
Definition: LTC2499.h:209
LT_I2C_Wire.h
LT_I2C: Routines to communicate with ATmega328P&#39;s hardware I2C port.
menu_2_read_differential
static int8_t menu_2_read_differential()
Read channels in differential mode.
Definition: DC1012AA.ino:389
LTC2499_CH0
#define LTC2499_CH0
Definition: LTC2499.h:171
QuikEval_EEPROM.h
QuikEval EEPROM Library.
LTC2499_CH12
#define LTC2499_CH12
Definition: LTC2499.h:183
LTC2499_CH8
#define LTC2499_CH8
Definition: LTC2499.h:179
BUILD_COMMAND_SINGLE_ENDED
const uint16_t BUILD_COMMAND_SINGLE_ENDED[16]
Lookup table to build the command for single-ended mode.
Definition: DC1012AA.ino:120
LTC2499_P0_N1
#define LTC2499_P0_N1
Definition: LTC2499.h:191
two_x_mode
static int16_t two_x_mode
The LTC2499 2X Mode settings.
Definition: DC1012AA.ino:111
discover_demo_board
int8_t discover_demo_board(char *demo_name)
Read the ID string from the EEPROM and determine if the correct board is connected.
Definition: QuikEval_EEPROM.cpp:141
LT_SPI.h
LT_SPI: Routines to communicate with ATmega328P&#39;s hardware SPI port.
LTC2499_SPEED_1X
#define LTC2499_SPEED_1X
Definition: LTC2499.h:157
LT_I2C.h
LT_I2C: Routines to communicate with ATmega328P&#39;s hardware I2C port.
BUILD_1X_2X_COMMAND
const uint16_t BUILD_1X_2X_COMMAND[2]
Lookup table to build 1X / 2X bits.
Definition: DC1012AA.ino:135
demo_name
char demo_name[]
Demo Board Name stored in QuikEval EEPROM.
Definition: DC1880A.ino:97
menu_4_set_1X2X
static void menu_4_set_1X2X()
Set 1X or 2X mode.
Definition: DC1012AA.ino:532
UserInterface.h
LTC2499_P9_N8
#define LTC2499_P9_N8
Definition: LTC2499.h:204
read_int
int32_t read_int()
Definition: UserInterface.cpp:93
i2c_address
static uint8_t i2c_address
I2C address in 7 bit format for part.
Definition: DC1012AA.ino:114
LTC2499_P6_N7
#define LTC2499_P6_N7
Definition: LTC2499.h:200
x
int32_t x
Definition: LTC2492_Thermocouple_Meter.ino:119
LTC2499_CH15
#define LTC2499_CH15
Definition: LTC2499.h:186
LTC2499_P8_N9
#define LTC2499_P8_N9
Definition: LTC2499.h:203
LTC2499_code_to_voltage
float LTC2499_code_to_voltage(int32_t adc_code, float vref)
Calculates the voltage corresponding to an adc code, given the reference (in volts) ...
Definition: LTC2499.cpp:87
quikeval_I2C_init
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
Definition: LT_I2C.cpp:394
quikeval_I2C_connect
void quikeval_I2C_connect(void)
Switch MUX to connect I2C pins to QuikEval connector.
Definition: LT_I2C.cpp:401
rejection_mode
static uint8_t rejection_mode
The LTC2499 rejection mode.
Definition: DC1012AA.ino:113
LTC2499_P13_N12
#define LTC2499_P13_N12
Definition: LTC2499.h:210
LTC2499.h
LTC2499: 24-Bit, 16-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation.
LTC2499_CH2
#define LTC2499_CH2
Definition: LTC2499.h:173
demo_board_connected
static uint8_t demo_board_connected
Set to 1 if the board is connected.
Definition: DC1012AA.ino:110
adc_code
static uint32_t adc_code
Definition: DC2071AA.ino:113
LTC2499_P11_N10
#define LTC2499_P11_N10
Definition: LTC2499.h:207
LTC2499_CH7
#define LTC2499_CH7
Definition: LTC2499.h:178