| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

DC1011AA.ino
Go to the documentation of this file.
1 /*!
2 Linear Technology DC1011A-A Demonstration Board.
3 LTC2498: 24-Bit, 16-Channel Delta Sigma ADC with SPI interface
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 How to calibrate:
28 Apply 100mV CH0 with respect to COM. Next, measure this voltage with a precise
29 voltmeter and enter this value. (This takes the reading.) Now apply approximately
30 2.40 volts to CH0. Measure this voltage with a precise voltmeter and enter this
31 value. Calibration is now stored in EEPROM. Upon start-up the calibration values
32 will be restored.
33
34 USER INPUT DATA FORMAT:
35 decimal : 1024
36 hex : 0x400
37 octal : 02000 (leading 0 "zero")
38 binary : B10000000000
39 float : 1024.0
40
41 @endverbatim
42
43 http://www.linear.com/product/LTC2498
44
45 http://www.linear.com/product/LTC2498#demoboards
46
47
48 Copyright 2018(c) Analog Devices, Inc.
49
50 All rights reserved.
51
52 Redistribution and use in source and binary forms, with or without
53 modification, are permitted provided that the following conditions are met:
54 - Redistributions of source code must retain the above copyright
55 notice, this list of conditions and the following disclaimer.
56 - Redistributions in binary form must reproduce the above copyright
57 notice, this list of conditions and the following disclaimer in
58 the documentation and/or other materials provided with the
59 distribution.
60 - Neither the name of Analog Devices, Inc. nor the names of its
61 contributors may be used to endorse or promote products derived
62 from this software without specific prior written permission.
63 - The use of this software may or may not infringe the patent rights
64 of one or more patent holders. This license does not release you
65 from the requirement that you obtain separate licenses from these
66 patent holders to use this software.
67 - Use of the software either in source or binary form, must be run
68 on or directly connected to an Analog Devices Inc. component.
69
70 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
71 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
72 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
73 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
74 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
75 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
76 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
77 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
78 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
79 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
80
81 */
82
83 /*! @file
84 @ingroup LTC2498
85 */
86
87 #include <Arduino.h>
88 #include <stdint.h>
89 #include "Linduino.h"
90 #include "LT_SPI.h"
91 #include <SPI.h>
92 #include "UserInterface.h"
93 #include "LT_I2C.h"
94 #include "QuikEval_EEPROM.h"
95 #include "LTC24XX_general.h"
96 #include "LTC2498.h"
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 uint8_t menu_1_read_single_ended();
104 uint8_t menu_2_read_differential();
105 uint8_t menu_3_read_temperature();
106 void menu_4_set_1X2X();
107
108 // Global variables
109 static uint8_t demo_board_connected; //!< Set to 1 if the board is connected
110 static uint8_t two_x_mode = LTC2498_SPEED_1X; //!< The LTC2498 2X Mode settings
111 static uint8_t rejection_mode = LTC2498_R50_R60; //!< The LTC2498 rejection mode settings
112 static float LTC2498_vref = 5.0; //!< The LTC2498 ideal reference voltage
113 static uint16_t eoc_timeout = 250; //!< timeout in ms
114 // Constants
115
116 //! Lookup table to build the command for single-ended mode
117 const uint8_t BUILD_COMMAND_SINGLE_ENDED[16] = {LTC2498_CH0, LTC2498_CH1, LTC2498_CH2, LTC2498_CH3,
118 LTC2498_CH4, LTC2498_CH5, LTC2498_CH6, LTC2498_CH7,
119 LTC2498_CH8, LTC2498_CH9, LTC2498_CH10, LTC2498_CH11,
120 LTC2498_CH12, LTC2498_CH13, LTC2498_CH14, LTC2498_CH15
121 }; //!< Builds the command for single-ended mode
122
123 //! Lookup table to build the command for differential mode
124 const uint8_t BUILD_COMMAND_DIFF[16] = {LTC2498_P0_N1, LTC2498_P2_N3, LTC2498_P4_N5, LTC2498_P6_N7,
125 LTC2498_P8_N9, LTC2498_P10_N11, LTC2498_P12_N13, LTC2498_P14_N15,
126 LTC2498_P1_N0, LTC2498_P3_N2, LTC2498_P5_N4, LTC2498_P7_N6,
127 LTC2498_P9_N8, LTC2498_P11_N10, LTC2498_P13_N12, LTC2498_P15_N14
128 }; //!< Build the command for differential mode
129
130 //! Lookup table to build 1X / 2X bits
131 const uint8_t BUILD_1X_2X_COMMAND[2] = {LTC2498_SPEED_1X, LTC2498_SPEED_2X}; //!< Build the command for 1x or 2x mode
132
133 //! Initialize Linduino
134 void setup()
135 {
136 char demo_name[]="DC1011"; // Demo Board Name stored in QuikEval EEPROM
137 quikeval_SPI_init(); // Configure the spi port for 4MHz SCK
138 quikeval_SPI_connect(); // Connect SPI to main data port
139 quikeval_I2C_init(); // Configure the EEPROM I2C port for 100kHz
140 Serial.begin(115200); // Initialize the serial port to the PC
141 print_title();
142
143 demo_board_connected = discover_demo_board(demo_name);
144 if (demo_board_connected)
145 {
146 print_prompt();
147 }
148 else
149 {
150 Serial.println(F("EEPROM not detected, will attempt to proceed"));
151 demo_board_connected = 1;
152 print_prompt();
153 }
154 quikeval_SPI_connect(); //Initialize for SPI
155 }
156
157 //! Repeats Linduino loop
158 void loop()
159 {
160 int16_t user_command; // The user input command
161 uint8_t ack_EOC = 0; // Keeps track of the EOC timeout
162 if (demo_board_connected)
163 {
164 if (Serial.available()) // Check for user input
165 {
166 user_command = read_int(); // Read the user command
167 if (user_command != 'm')
168 Serial.println(user_command); // Prints the user command to com port
169 Serial.flush();
170 switch (user_command)
171 {
172 case 1:
173 ack_EOC |= menu_1_read_single_ended();
174 break;
175 case 2:
176 ack_EOC |= menu_2_read_differential();
177 break;
178 case 3:
179 ack_EOC |= menu_3_read_temperature();
180 break;
181 case 4:
182 menu_4_set_1X2X();
183 break;
184 default:
185 Serial.println(F("Incorrect Option"));
186 }
187 if (ack_EOC)
188 Serial.println(F("\n******SPI ERROR******\n"));
189 Serial.print(F("\n*************************\n"));
190 print_prompt();
191 }
192 }
193 }
194
195 // Function Definitions
196
197 //! Prints the title block when program first starts.
198 void print_title()
199 {
200 Serial.print(F("\n*****************************************************************\n"));
201 Serial.print(F("* DC1011A-A Demonstration Program *\n"));
202 Serial.print(F("* *\n"));
203 Serial.print(F("* This program demonstrates how to send data and receive data *\n"));
204 Serial.print(F("* from the 24-bit ADC. *\n"));
205 Serial.print(F("* *\n"));
206 Serial.print(F("* *\n"));
207 Serial.print(F("* Set the baud rate to 115200 and select the newline terminator.*\n"));
208 Serial.print(F("* *\n"));
209 Serial.print(F("*****************************************************************\n"));
210 }
211
212 //! Prints main menu.
213 void print_prompt()
214 {
215 Serial.print(F("\n1-Read Single-Ended\n"));
216 Serial.print(F("2-Read Differential\n"));
217 Serial.print(F("3-Read Temperature\n"));
218 Serial.print(F("4-2X Mode Settings\n"));
219 Serial.print(F("Enter a Command: "));
220 }
221
222 //! Display selected differential channels. Displaying single-ended channels is
223 //! straightforward; not so with differential because the inputs can take either polarity.
224 void print_user_command(uint8_t menu)
225 {
226 switch (menu)
227 {
228 case 0:
229 Serial.print(F("0P-1N"));
230 break;
231 case 1:
232 Serial.print(F("2P-3N"));
233 break;
234 case 2:
235 Serial.print(F("4P-5N"));
236 break;
237 case 3:
238 Serial.print(F("6P-7N"));
239 break;
240 case 4:
241 Serial.print(F("8P-9N"));
242 break;
243 case 5:
244 Serial.print(F("10P-11N"));
245 break;
246 case 6:
247 Serial.print(F("12P-13N"));
248 break;
249 case 7:
250 Serial.print(F("14P-15N"));
251 break;
252 case 8:
253 Serial.print(F("1P-0N"));
254 break;
255 case 9:
256 Serial.print(F("3P-2N"));
257 break;
258 case 10:
259 Serial.print(F("5P-4N"));
260 break;
261 case 11:
262 Serial.print(F("7P-6N"));
263 break;
264 case 12:
265 Serial.print(F("9P-8N"));
266 break;
267 case 13:
268 Serial.print(F("11P-10N"));
269 break;
270 case 14:
271 Serial.print(F("13P-12N"));
272 break;
273 case 15:
274 Serial.print(F("15P-14N"));
275 break;
276 }
277 Serial.print(F(": "));
278 }
279
280 //! Read channels in single-ended mode
281 //! @return Returns 0=successful, 1=unsuccessful (exceeded timeout)
282 uint8_t menu_1_read_single_ended()
283 {
284 uint8_t adc_command_high; // The LTC2498 command high byte
285 uint8_t adc_command_low; // The LTC2498 command low byte
286 int16_t user_command; // The user input command
287 int32_t adc_code = 0; // The LTC2498 code
288 float adc_voltage = 0; // The LTC2498 voltage
289
290 while (1)
291 {
292 Serial.print(F("*************************\n\n"));
293 Serial.print(F("0-CH0 8-CH8\n"));
294 Serial.print(F("1-CH1 9-CH9\n"));
295 Serial.print(F("2-CH2 10-CH10\n"));
296 Serial.print(F("3-CH3 11-CH11\n"));
297 Serial.print(F("4-CH4 12-CH12\n"));
298 Serial.print(F("5-CH5 13-CH13\n"));
299 Serial.print(F("6-CH6 14-CH14\n"));
300 Serial.print(F("7-CH7 15-CH15\n"));
301 Serial.print(F("16-ALL\n"));
302 Serial.print(F("m-Main Menu\n"));
303 Serial.print(F("Enter a Command: "));
304
305 user_command = read_int(); // Read the single command
306 if (user_command == 'm')
307 break;
308 Serial.println(user_command);
309
310 if (user_command == 16)
311 {
312 Serial.print(F("ALL\n"));
313 adc_command_high = BUILD_COMMAND_SINGLE_ENDED[0]; // Build ADC command for channel 0
314 adc_command_low = rejection_mode | two_x_mode;
315 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
316 return 1;
317 LTC2498_read(LTC2498_CS, adc_command_high, adc_command_low, &adc_code); // Throws out last reading
318
319 for (int8_t x = 0; x <= 15; x++) // Read all channels in single-ended mode
320 {
321
322
323 adc_command_high = BUILD_COMMAND_SINGLE_ENDED[(x + 1) % 16];
324 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
325 return 1;
326 LTC2498_read(LTC2498_CS, adc_command_high, adc_command_low, &adc_code);
327 adc_voltage = LTC2498_code_to_voltage(adc_code, LTC2498_vref);
328
329 Serial.print(F(" ****"));
330 Serial.print(F("CH"));
331 Serial.print(x);
332 Serial.print(F(": "));
333 Serial.print(adc_voltage, 4);
334 Serial.print(F("V\n\n"));
335 }
336 }
337 else
338 {
339 adc_command_high = BUILD_COMMAND_SINGLE_ENDED[user_command];
340 adc_command_low = rejection_mode | two_x_mode;
341 Serial.print(F("ADC Command: 0x"));
342 Serial.println((adc_command_high<<8) | adc_command_low, HEX);
343
344 quikeval_SPI_connect();
345 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
346 return 1;
347 LTC2498_read(LTC2498_CS, adc_command_high, adc_command_low, &adc_code); // Throws out last reading
348 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
349 return 1;
350 LTC2498_read(LTC2498_CS, adc_command_high, adc_command_low, &adc_code); // Now we're ready to read the desired data
351
352 Serial.print(F("Received Code: 0x"));
353 Serial.println(adc_code, HEX);
354 adc_voltage = LTC2498_code_to_voltage(adc_code, LTC2498_vref);
355 Serial.print(F(" ****"));
356 Serial.print(F("CH"));
357 Serial.print(user_command);
358 Serial.print(F(": "));
359 Serial.print(adc_voltage, 4);
360 Serial.print(F("V\n\n"));
361 }
362 }
363 return 0;
364 }
365
366 //! Read channels in differential mode
367 //! @return Returns 0=successful, 1=unsuccessful (exceeded timeout)
368 uint8_t menu_2_read_differential()
369 {
370 int8_t y; // Offset into differential channel array to select polarity
371 uint8_t adc_command_high; // The LTC2498 command high byte
372 uint8_t adc_command_low; // The LTC2498 command low byte
373 int16_t user_command; // The user input command
374 int32_t adc_code = 0; // The LTC2498 code
375 float adc_voltage; // The LTC2498 voltage
376
377 while (1)
378 {
379 Serial.print(F("\n*************************\n\n")); // Display differential menu
380 Serial.print(F("0-0P-1N 8-1P-0N\n"));
381 Serial.print(F("1-2P-3N 9-3P-2N\n"));
382 Serial.print(F("2-4P-5N 10-5P-4N\n"));
383 Serial.print(F("3-6P-7N 11-7P-6N\n"));
384 Serial.print(F("4-8P-9N 12-9P-8N\n"));
385 Serial.print(F("5-10P-11N 13-11P-10N\n"));
386 Serial.print(F("6-12P_13N 14-13P-12N\n"));
387 Serial.print(F("7-14P-15N 15-15P-14N\n"));
388 Serial.print(F("16-ALL Even_P-Odd_N\n"));
389 Serial.print(F("17-ALL Odd_P-Even_N\n"));
390 Serial.print(F("m-Main Menu\n"));
391
392 user_command = read_int(); // Read the single command
393 if (user_command == 'm')
394 break;
395 Serial.println(user_command);
396
397 if ((user_command == 16) || (user_command == 17))
398 {
399 if (user_command == 16)
400 {
401 Serial.print(F("ALL Even_P-Odd_N\n")); // Cycles through options 0-7
402 y = 0;
403 }
404 if (user_command == 17)
405 {
406 Serial.print(F("ALL Odd_P-Even_N\n")); // Cycles through options 8-15
407 y = 8;
408 }
409
410 adc_command_high = BUILD_COMMAND_DIFF[y]; // Build the channel 0 and 1 for differential mode
411 adc_command_low = rejection_mode | two_x_mode;
412
413 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
414 return 1;
415 LTC2498_read(LTC2498_CS, adc_command_high, adc_command_low, &adc_code); // Throws out reading
416 for (int8_t x = 0; x < 8; x++) // Read all channels in differential mode. All even channels are positive and odd channels are negative
417 {
418
419
420
421
422 adc_command_high = BUILD_COMMAND_DIFF[((x + 1) % 8) + y];
423
424 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
425 return 1;
426 LTC2498_read(LTC2498_CS, adc_command_high, adc_command_low, &adc_code);
427
428 Serial.print(F("Received Code: 0x"));
429 Serial.println((adc_command_high<<8) | adc_command_low, HEX);
430 adc_voltage = LTC2498_code_to_voltage(adc_code, LTC2498_vref);
431 Serial.print(F("\n ****"));
432 print_user_command(x + y);
433 Serial.print(F(": "));
434 Serial.print(adc_voltage, 4);
435 Serial.print(F("V\n"));
436
437 }
438 }
439 else
440 {
441 // Reads and displays a selected channel
442 adc_command_high = BUILD_COMMAND_DIFF[user_command];
443 adc_command_low = rejection_mode | two_x_mode;
444 Serial.print(F("ADC Command: 0x"));
445 Serial.println((adc_command_high<<8) | adc_command_low, HEX);
446
447 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
448 return 1;
449 LTC2498_read(LTC2498_CS, adc_command_high, adc_command_low, &adc_code); // Throws out last reading
450
451
452
453 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
454 return 1;
455 LTC2498_read(LTC2498_CS, adc_command_high, adc_command_low, &adc_code); // Now we're ready to read the desired data
456
457 Serial.print(F("Received Code: 0x"));
458 Serial.println(adc_code, HEX);
459 adc_voltage = LTC2498_code_to_voltage(adc_code, LTC2498_vref);
460 Serial.print(F("\n ****"));
461 print_user_command(user_command);
462 Serial.print(adc_voltage, 4);
463 Serial.print(F("V\n"));
464
465 }
466 }
467 return 0;
468 }
469
470 //! Read Temperature
471 //! @return Returns 0=successful, 1=unsuccessful (exceeded timeout)
472 uint8_t menu_3_read_temperature()
473 {
474 uint8_t adc_command_high; // The LTC2498 command high byte
475 uint8_t adc_command_low; // The LTC2498 command low byte
476
477 int32_t adc_code = 0; // The LTC2498 code
478 float adc_voltage; // The LTC2498 voltage
479
480 //Command byte for temperature read
481 adc_command_high = BUILD_COMMAND_DIFF[0]; // Any channel can be selected
482 adc_command_low = LTC2498_INTERNAL_TEMP | rejection_mode;
483
484 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
485 return 1;
486 LTC2498_read(LTC2498_CS,adc_command_high, adc_command_low, &adc_code); // Throws out last reading
487 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
488 return 1;
489 LTC2498_read(LTC2498_CS,adc_command_high, adc_command_low, &adc_code); // Now we're ready to read the desired data
490
491 Serial.print(F("Received Code: 0x"));
492 Serial.println(adc_code, HEX);
493 adc_voltage = LTC2498_code_to_voltage(adc_code, LTC2498_vref);
494 Serial.print(F("\n ****"));
495 Serial.print(adc_voltage, 4);
496 Serial.print(F("V\n"));
497 Serial.print(F("This equals to: "));
498 float temperature = (adc_voltage/93.5e-6);
499 Serial.print(temperature, DEC);
500 Serial.print(F(" K\n"));
501 return 0;
502 }
503
504 //! Set 1X or 2X mode
505 void menu_4_set_1X2X()
506 {
507 int16_t user_command; // The user input command
508
509 // 2X Mode
510 Serial.print(F("2X Mode Settings\n\n"));
511 Serial.print(F("0-Disable\n"));
512 Serial.print(F("1-Enable\n"));
513 Serial.print(F("Enter a Command: "));
514 user_command = read_int();
515 Serial.println(user_command);
516
517 if (user_command == 0)
518 {
519 two_x_mode = LTC2498_SPEED_1X;
520 Serial.print(F("2X Mode Disabled\n"));
521 }
522 else
523 {
524 two_x_mode = LTC2498_SPEED_2X;
525 Serial.print(F("2X Mode Enabled\n"));
526 }
527 }
BUILD_COMMAND_DIFF
const uint8_t BUILD_COMMAND_DIFF[16]
Lookup table to build the command for differential mode.
Definition: DC1011AA.ino:124
user_command
unsigned char user_command
Definition: Serial_EEPROM_Test.ino:75
rejection_mode
static uint8_t rejection_mode
The LTC2498 rejection mode settings.
Definition: DC1011AA.ino:111
LTC2498_INTERNAL_TEMP
#define LTC2498_INTERNAL_TEMP
Definition: LTC2498.h:126
LTC2498_P7_N6
#define LTC2498_P7_N6
Definition: LTC2498.h:168
LTC2498_P12_N13
#define LTC2498_P12_N13
Definition: LTC2498.h:176
LTC2498_CH4
#define LTC2498_CH4
Definition: LTC2498.h:142
LTC2498_CH6
#define LTC2498_CH6
Definition: LTC2498.h:144
setup
static void setup()
Initialize Linduino.
Definition: DC1011AA.ino:134
Linduino.h
Header File for Linduino Libraries and Demo Code.
LTC2498.h
LTC2498: 24-Bit, 16-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation.
loop
static void loop()
Repeats Linduino loop.
Definition: DC1011AA.ino:158
LTC2498_CH5
#define LTC2498_CH5
Definition: LTC2498.h:143
LTC2498_EOC_timeout
int8_t LTC2498_EOC_timeout(uint8_t cs, uint16_t miso_timeout)
Checks for EOC with a specified timeout.
Definition: LTC2498.cpp:72
LTC2498_P2_N3
#define LTC2498_P2_N3
Definition: LTC2498.h:161
demo_board_connected
static uint8_t demo_board_connected
Set to 1 if the board is connected.
Definition: DC1011AA.ino:109
LTC2498_CH2
#define LTC2498_CH2
Definition: LTC2498.h:140
LTC2498_CH7
#define LTC2498_CH7
Definition: LTC2498.h:145
LTC2498_CH0
#define LTC2498_CH0
Definition: LTC2498.h:138
print_prompt
static void print_prompt()
Prints main menu.
Definition: DC1011AA.ino:213
adc_voltage
static float adc_voltage
Definition: DC2071AA.ino:115
LTC2498_P4_N5
#define LTC2498_P4_N5
Definition: LTC2498.h:164
LTC2498_CH9
#define LTC2498_CH9
Definition: LTC2498.h:147
BUILD_COMMAND_SINGLE_ENDED
const uint8_t BUILD_COMMAND_SINGLE_ENDED[16]
Lookup table to build the command for single-ended mode.
Definition: DC1011AA.ino:117
LTC24XX_general.h
LTC24XX General Library: Functions and defines for all SINC4 Delta Sigma ADCs.
LTC2498_vref
static float LTC2498_vref
The LTC2498 ideal reference voltage.
Definition: DC1011AA.ino:112
LTC2498_P15_N14
#define LTC2498_P15_N14
Definition: LTC2498.h:180
LTC2498_P14_N15
#define LTC2498_P14_N15
Definition: LTC2498.h:179
QuikEval_EEPROM.h
QuikEval EEPROM Library.
LTC2498_CH15
#define LTC2498_CH15
Definition: LTC2498.h:153
BUILD_1X_2X_COMMAND
const uint8_t BUILD_1X_2X_COMMAND[2]
Lookup table to build 1X / 2X bits.
Definition: DC1011AA.ino:131
LTC2498_read
void LTC2498_read(uint8_t cs, uint8_t adc_command_high, uint8_t adc_command_low, int32_t *adc_code)
Reads from LTC2498.
Definition: LTC2498.cpp:79
quikeval_SPI_init
void quikeval_SPI_init(void)
Configure the SPI port for 4Mhz SCK.
Definition: LT_SPI.cpp:151
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
LTC2498_P10_N11
#define LTC2498_P10_N11
Definition: LTC2498.h:173
LTC2498_P6_N7
#define LTC2498_P6_N7
Definition: LTC2498.h:167
LTC2498_P3_N2
#define LTC2498_P3_N2
Definition: LTC2498.h:162
LTC2498_SPEED_2X
#define LTC2498_SPEED_2X
Definition: LTC2498.h:125
LT_SPI.h
LT_SPI: Routines to communicate with ATmega328P&#39;s hardware SPI port.
LTC2498_P11_N10
#define LTC2498_P11_N10
Definition: LTC2498.h:174
eoc_timeout
static uint16_t eoc_timeout
timeout in ms
Definition: DC1011AA.ino:113
LTC2498_P0_N1
#define LTC2498_P0_N1
Definition: LTC2498.h:158
LTC2498_CH12
#define LTC2498_CH12
Definition: LTC2498.h:150
LT_I2C.h
LT_I2C: Routines to communicate with ATmega328P&#39;s hardware I2C port.
LTC2498_CH13
#define LTC2498_CH13
Definition: LTC2498.h:151
two_x_mode
static uint8_t two_x_mode
The LTC2498 2X Mode settings.
Definition: DC1011AA.ino:110
LTC2498_CH8
#define LTC2498_CH8
Definition: LTC2498.h:146
demo_name
char demo_name[]
Demo Board Name stored in QuikEval EEPROM.
Definition: DC1880A.ino:97
quikeval_SPI_connect
void quikeval_SPI_connect()
Connect SPI pins to QuikEval connector through the Linduino MUX. This will disconnect I2C...
Definition: LT_SPI.cpp:138
UserInterface.h
LTC2498_SPEED_1X
#define LTC2498_SPEED_1X
Definition: LTC2498.h:124
read_int
int32_t read_int()
Definition: UserInterface.cpp:93
LTC2498_code_to_voltage
float LTC2498_code_to_voltage(int32_t adc_code, float vref)
Calculates the voltage corresponding to an adc code, given the reference (in volts) ...
Definition: LTC2498.cpp:85
LTC2498_P1_N0
#define LTC2498_P1_N0
Definition: LTC2498.h:159
menu_4_set_1X2X
static void menu_4_set_1X2X()
Set 1X or 2X mode.
Definition: DC1011AA.ino:505
x
int32_t x
Definition: LTC2492_Thermocouple_Meter.ino:119
LTC2498_P9_N8
#define LTC2498_P9_N8
Definition: LTC2498.h:171
LTC2498_CS
#define LTC2498_CS
Define the SPI CS pin.
Definition: LTC2498.h:116
LTC2498_CH1
#define LTC2498_CH1
Definition: LTC2498.h:139
LTC2498_CH10
#define LTC2498_CH10
Definition: LTC2498.h:148
LTC2498_P13_N12
#define LTC2498_P13_N12
Definition: LTC2498.h:177
quikeval_I2C_init
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
Definition: LT_I2C.cpp:394
LTC2498_CH14
#define LTC2498_CH14
Definition: LTC2498.h:152
LTC2498_CH3
#define LTC2498_CH3
Definition: LTC2498.h:141
print_user_command
static void print_user_command(uint8_t menu)
Display selected differential channels.
Definition: DC1011AA.ino:224
menu_2_read_differential
static uint8_t menu_2_read_differential()
Read channels in differential mode.
Definition: DC1011AA.ino:368
LTC2498_P8_N9
#define LTC2498_P8_N9
Definition: LTC2498.h:170
LTC2498_R50_R60
#define LTC2498_R50_R60
Definition: LTC2498.h:131
print_title
static void print_title()
Prints the title block when program first starts.
Definition: DC1011AA.ino:198
LTC2498_P5_N4
#define LTC2498_P5_N4
Definition: LTC2498.h:165
adc_code
static uint32_t adc_code
Definition: DC2071AA.ino:113
LTC2498_CH11
#define LTC2498_CH11
Definition: LTC2498.h:149
menu_1_read_single_ended
static uint8_t menu_1_read_single_ended()
Read channels in single-ended mode.
Definition: DC1011AA.ino:282
menu_3_read_temperature
static uint8_t menu_3_read_temperature()
Read Temperature.
Definition: DC1011AA.ino:472