| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

DC1410AA.ino
Go to the documentation of this file.
1 /*!
2 Linear Technology DC1410A-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 Measure a Load Cell:
16 The LTC2498 allowas a wide common mode range of 0V to Vcc. The LT1678 OPAMP common
17 mode range is V- + 1.5 to V+ - 0.8V. Ensure the load cell sensor meets the requirments
18 of the ADC and amplifier. After, set the desired gain and read in differential mode.
19
20 USER INPUT DATA FORMAT:
21 decimal : 1024
22 hex : 0x400
23 octal : 02000 (leading 0 "zero")
24 binary : B10000000000
25 float : 1024.0
26
27 @endverbatim
28
29 http://www.linear.com/product/LTC2498
30
31 http://www.linear.com/product/LTC2498#demoboards
32
33
34 Copyright 2018(c) Analog Devices, Inc.
35
36 All rights reserved.
37
38 Redistribution and use in source and binary forms, with or without
39 modification, are permitted provided that the following conditions are met:
40 - Redistributions of source code must retain the above copyright
41 notice, this list of conditions and the following disclaimer.
42 - Redistributions in binary form must reproduce the above copyright
43 notice, this list of conditions and the following disclaimer in
44 the documentation and/or other materials provided with the
45 distribution.
46 - Neither the name of Analog Devices, Inc. nor the names of its
47 contributors may be used to endorse or promote products derived
48 from this software without specific prior written permission.
49 - The use of this software may or may not infringe the patent rights
50 of one or more patent holders. This license does not release you
51 from the requirement that you obtain separate licenses from these
52 patent holders to use this software.
53 - Use of the software either in source or binary form, must be run
54 on or directly connected to an Analog Devices Inc. component.
55
56 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
57 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
58 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
59 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
60 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
61 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
62 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
63 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
64 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
65 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66
67 */
68
69 /*! @file
70 @ingroup LTC2498
71 */
72
73 #include <Arduino.h>
74 #include <stdint.h>
75 #include "Linduino.h"
76 #include "LT_SPI.h"
77 #include <SPI.h>
78 #include "UserInterface.h"
79 #include "LT_I2C.h"
80 #include "QuikEval_EEPROM.h"
81 #include "LTC24XX_general.h"
82 #include "LTC2498.h"
83 #include "LTC24XX_general.h"
84
85 // Function Declaration
86 void print_title(); // Print the title block
87 void print_prompt(); // Prompt the user for an input command
88 void print_user_command(uint8_t menu); // Display selected differential channels
89
90 uint8_t menu_1_read_differential(); // Read the ADC in differential mode
91 void set_gain(uint8_t a_pin, uint8_t b_pin, uint8_t gain); // Drive the select pins to get desired gain
92 void init_gain_pins(uint8_t a_pin, uint8_t b_pin); // Initialize the MUX select pins
93 void menu_2_set_1X2X(); // Enables and disables 2X mode
94 void menu_3_set_channel_gain(); // Sets gains for indvidual channels
95 void print_gain(uint8_t gain); // Displays the current channel gain setting
96
97 enum Av {unity, g8, g16, g32}; // Gain options
98
99 // Global variables
100 static uint8_t demo_board_connected; //!< Set to 1 if the board is connected
101 static uint8_t two_x_mode = LTC2498_SPEED_1X; //!< The LTC2498 2X Mode settings
102 static uint8_t rejection_mode = LTC2498_R50_R60; //!< The LTC2498 rejection mode settings
103 static float LTC2498_vref = 5.0; //!< The LTC2498 ideal reference voltage
104 static uint16_t eoc_timeout = 250; //!< Timeout in ms
105 uint8_t filt_flag = 1; //!< Keeps track when the filter needs to be rest
106 uint8_t channel_gain[6] = {g32, g32, g32, g32, g32, g32}; //!< default is gain 32
107
108 // Constants
109 //! Lookup table for reads
110 const uint8_t read_command_seq[] = { LTC2498_P12_N13,
111 LTC2498_P14_N15, LTC2498_P14_N15, LTC2498_P14_N15, LTC2498_P14_N15,
112 LTC2498_P0_N1, LTC2498_P2_N3, LTC2498_P4_N5, LTC2498_P6_N7,
113 LTC2498_P8_N9, LTC2498_P10_N11, LTC2498_P10_N11
114 }; //!< Channel read sequence for the demo board
115 //! lookup table for gain setting reads
116 uint8_t read_gain_seq[] = {unity, unity, unity , g8, g16, g32, channel_gain[0], channel_gain[1], channel_gain[2], channel_gain[3],
117 channel_gain[4], channel_gain[5]
118 }; //!< The gain sequence for the auto calibration
119
120 //! Gain MUX pins
121 const uint8_t A_PIN = 4;
122 const uint8_t B_PIN = 7;
123
124 //! Exponential filter smothing constant
125 const float smoothing_const = .7;
126
127 //! Initialize Linduino
128 void setup()
129 {
130 init_gain_pins(A_PIN, B_PIN);
131
132 char demo_name[] = "DC1410"; // Demo Board Name stored in QuikEval EEPROM
133 quikeval_SPI_init(); // Configure the spi port for 4MHz SCK
134 quikeval_SPI_connect(); // Connect SPI to main data port
135 quikeval_I2C_init(); // Configure the EEPROM I2C port for 100kHz
136 Serial.begin(115200); // Initialize the serial port to the PC
137 print_title();
138
139 demo_board_connected = discover_demo_board(demo_name);
140 if (demo_board_connected)
141 {
142 print_prompt();
143 }
144 else
145 {
146 Serial.println(F("EEPROM not detected, will attempt to proceed"));
147 print_prompt();
148 }
149 quikeval_SPI_connect(); // Initialize for SPI
150 }
151
152 //! Repeats Linduino loop
153 void loop()
154 {
155 int16_t user_command; // The user input command
156 uint8_t ack_EOC = 0; // Keeps track of the EOC timeout
157 if (Serial.available()) // Check for user input
158 {
159 user_command = read_int(); // Read the user command
160 if (user_command != 'm')
161 Serial.println(user_command); // Prints the user command to com port
162 Serial.flush();
163 switch (user_command)
164 {
165 case 1:
166 ack_EOC |= menu_1_read_differential();
167 break;
168 case 2:
169 menu_2_set_1X2X();
170 break;
171 case 3:
172 menu_3_set_channel_gain();
173 break;
174 default:
175 Serial.println(F("Incorrect Option"));
176 }
177 if (ack_EOC)
178 Serial.println(F("\n******SPI ERROR******\n"));
179 Serial.print(F("\n*************************\n"));
180 print_prompt();
181 }
182 }
183
184 // Function Definitions
185
186 //! Prints the title block when program first starts.
187 void print_title()
188 {
189 Serial.print(F("\n*****************************************************************\n"));
190 Serial.print(F("* DC1410A-A Demonstration Program *\n"));
191 Serial.print(F("* *\n"));
192 Serial.print(F("* This program demonstrates how to measure strain gauge or *\n"));
193 Serial.print(F("* other form of a Wheatstone bridge sensors with the LTC2498 *\n"));
194 Serial.print(F("* *\n"));
195 Serial.print(F("* *\n"));
196 Serial.print(F("* Set the baud rate to 115200 and select the newline terminator.*\n"));
197 Serial.print(F("* *\n"));
198 Serial.print(F("*****************************************************************\n"));
199 }
200
201 //! Prints main menu.
202 void print_prompt()
203 {
204 Serial.print(F("\n1-Read Differential\n"));
205 Serial.print(F("2-2X Mode Settings\n"));
206 Serial.print(F("3-Set Channel Gain\n"));
207 Serial.print(F("Enter a Command: "));
208 }
209
210 //! Read channels in differential mode
211 //! @return Returns 0=successful, 1=unsuccessful (exceeded timeout)
212 uint8_t menu_1_read_differential()
213 {
214 int8_t y; // Offset into differential channel array to select polarity
215 uint8_t adc_command_high; // The LTC2498 command high byte
216 uint8_t adc_command_low; // The LTC2498 command low byte
217 int16_t user_command; // The user input command
218 int32_t adc_code[12]; // The LTC2498 code
219 float adc_voltage; // The LTC2498 voltage
220 static float offset = 0.0;
221 static float gain_unity = 0.0;
222 static float gain_8 = 0.0;
223 static float gain_16 = 0.0;
224 static float gain_32 = 0.0;
225 static float gain_value[4];
226
227 adc_command_low = rejection_mode | two_x_mode;
228 do
229 {
230 for (int8_t i = 0; i <= 11; i++)
231 {
232 set_gain(A_PIN, B_PIN, read_gain_seq[i]); // Set the MUX to the desired gain
233 adc_command_high = read_command_seq[i]; // Set channel
234 // Ensure a conversions are complete
235 if (LTC2498_EOC_timeout(LTC2498_CS, eoc_timeout))
236 return 1;
237 // Read the LTC2498
238 LTC2498_read(LTC2498_CS, adc_command_high, adc_command_low, adc_code + i);
239 }
240 if (filt_flag)
241 {
242 // Reset the filter
243 filt_flag = 0;
244 offset = adc_code[1] - 536870912;
245 gain_unity = ((float)adc_code[2]) - 536870912;
246 gain_8 = ((float)adc_code[3] - 536870912) / gain_unity;
247 gain_16 = ((float)adc_code[4] - 536870912) / gain_unity;
248 gain_32 = ((float)adc_code[5] - 536870912) / gain_unity;
249 }
250 else
251 {
252 // IIR exponential filter
253 offset = (1.0 - smoothing_const) * ((float)adc_code[1] - 536870912) + smoothing_const * offset;
254
255 if (two_x_mode)
256 {
257 gain_unity = ((float)adc_code[2]) - offset - 536870912;
258 gain_value[1] = ((float)adc_code[3] - offset - 536870912) / gain_unity;
259 gain_16 = ((float)adc_code[4] - offset - 536870912) / gain_unity;
260 gain_32 = ((float)adc_code[5] - offset - 536870912) / gain_unity;
261 }
262 else
263 {
264 gain_unity = ((float)adc_code[2]) - 536870912;
265 gain_8 = (1.0 - smoothing_const) * (((float)adc_code[3] - 536870912) / gain_unity) + smoothing_const * gain_8;
266 gain_16 = (1.0 - smoothing_const) * (((float)adc_code[4] - 536870912) / gain_unity) + smoothing_const * gain_16;
267 gain_32 = (1.0 - smoothing_const) * (((float)adc_code[5] - 536870912) / gain_unity) + smoothing_const * gain_32;
268 }
269 }
270
271 gain_value[0] = 1; // Assume ideal unity gain
272 gain_value[1] = gain_8;
273 gain_value[2] = gain_16;
274 gain_value[3] = gain_32;
275
276 Serial.println(F("\n**********"));
277 Serial.print(F(" Offset: "));
278 Serial.print(offset, 6);
279 Serial.print(F(" "));
280 Serial.print(LTC2498_code_to_voltage((int32_t)offset + 536870912, LTC2498_vref) * 1000, 4);
281 Serial.println(F(" mV"));
282 Serial.print(F(" G8: "));
283 Serial.println(gain_8, 6);
284 Serial.print(F(" G16: "));
285 Serial.println(gain_16, 6);
286 Serial.print(F(" G32: "));
287 Serial.println(gain_32, 6);
288 Serial.println();
289
290 Serial.println(F("CH ADC Code Gain Comp Voltage (mV)"));
291 Serial.print(F("P0-N1: 0x"));
292 Serial.print(adc_code[6], HEX);
293 Serial.print(" ");
294 Serial.print(gain_value[channel_gain[0]], 6);
295 Serial.print(F(" "));
296 Serial.println(1000 * LTC24XX_diff_code_to_calibrated_voltage(adc_code[6], LTC2498_vref / 536870911, offset) / gain_value[channel_gain[0]], 6);
297
298 Serial.print(F("P2-N3: 0x"));
299 Serial.print(adc_code[7], HEX);
300 Serial.print(F(" "));
301 Serial.print(gain_value[channel_gain[1]], 6);
302 Serial.print(" ");
303 Serial.println(1000 * LTC24XX_diff_code_to_calibrated_voltage(adc_code[7], LTC2498_vref / 536870911, offset) / gain_value[channel_gain[1]], 6);
304
305 Serial.print(F("P4-N5: 0x"));
306 Serial.print(adc_code[8], HEX);
307 Serial.print(F(" "));
308 Serial.print(gain_value[channel_gain[2]], 6);
309 Serial.print(" ");
310 Serial.println(1000 * LTC24XX_diff_code_to_calibrated_voltage(adc_code[8], LTC2498_vref / 536870911, offset) / gain_value[channel_gain[2]], 6);
311
312 Serial.print(F("P6-N7: 0x"));
313 Serial.print(adc_code[9], HEX);
314 Serial.print(F(" "));
315 Serial.print(gain_value[channel_gain[3]], 6);
316 Serial.print(" ");
317 Serial.println(1000 * LTC24XX_diff_code_to_calibrated_voltage(adc_code[9], LTC2498_vref / 536870911, offset) / gain_value[channel_gain[3]], 6);
318
319 Serial.print(F("P8-N9: 0x"));
320 Serial.print(adc_code[10], HEX);
321 Serial.print(F(" "));
322 Serial.print(gain_value[channel_gain[4]], 6);
323 Serial.print(" ");
324 Serial.println(1000 * LTC24XX_diff_code_to_calibrated_voltage(adc_code[10], LTC2498_vref / 536870911, offset) / gain_value[channel_gain[4]], 6);
325
326 Serial.print(F("P10-N11: 0x"));
327 Serial.print(adc_code[11], HEX);
328 Serial.print(F(" "));
329 Serial.print(gain_value[channel_gain[5]], 6);
330 Serial.print(" ");
331 Serial.println(1000 * LTC24XX_diff_code_to_calibrated_voltage(adc_code[11], LTC2498_vref / 536870911, offset) / gain_value[channel_gain[5]], 6);
332
333 Serial.println();
334 Serial.println(F("Enter any character to exit"));
335
336 }
337 while (Serial.available() == 0);
338 while (Serial.available())
339 Serial.read();
340 Serial.flush();
341 return 0;
342 }
343
344 //! Set the Mux select pins to the desired gain
345 void set_gain(uint8_t a_pin, uint8_t b_pin, uint8_t gain)
346 {
347 digitalWrite(a_pin, gain & 0b01);
348 digitalWrite(b_pin, gain & 0b10);
349 }
350
351 //! initialize the MUX select pins
352 void init_gain_pins(uint8_t a_pin, uint8_t b_pin)
353 {
354 pinMode(a_pin, OUTPUT);
355 pinMode(b_pin, OUTPUT);
356 digitalWrite(a_pin, LOW);
357 digitalWrite(b_pin, LOW);
358 }
359
360 //! Allows the user to sets the desired gain
361 void menu_3_set_channel_gain()
362 {
363 int16_t user_command; // The user input cammand
364 while (1)
365 {
366 // Display gain settings
367 Serial.print(F("\nCurrent Gain Settings:\n"));
368 Serial.print(F(" CH 0P-1N gain: "));
369 print_gain(channel_gain[0]);
370 Serial.print(F(" CH 2P-3N gain: "));
371 print_gain(channel_gain[1]);
372 Serial.print(F(" CH 4P-5N gain: "));
373 print_gain(channel_gain[2]);
374 Serial.print(F(" CH 6P-7N gain: "));
375 print_gain(channel_gain[3]);
376 Serial.print(F(" CH 8P-9N gain: "));
377 print_gain(channel_gain[4]);
378 Serial.print(F(" CH 10P-11N gain: "));
379 print_gain(channel_gain[5]);
380
381 Serial.print(F("\n\n"));
382 Serial.print(F("Channel Select\n"));
383 Serial.print(F(" 0-0P-1N 3-6P-7N\n"));
384 Serial.print(F(" 1-2P-3N 4-8P-9N\n"));
385 Serial.print(F(" 2-4P-5N 5-10P-11N\n"));
386 Serial.print(F(" 6-ALL\n"));
387 Serial.print(F("m-Main Menu\n"));
388 Serial.print(F("Enter a Command: "));
389
390 user_command = read_int(); // Read the single command
391 uint8_t channel = user_command;
392 if (user_command == 'm')
393 {
394 Serial.println(F("m"));
395 break;
396 }
397 Serial.println(user_command);
398 if (user_command > 6)
399 Serial.println(F("Incorrect Option"));
400 else
401 {
402 if (user_command == 6)
403 {
404 Serial.print(F("\nGain Options\n"));
405 Serial.print(F(" 0-Unity Gain\n"));
406 Serial.print(F(" 1-Gain of 8\n"));
407 Serial.print(F(" 2-Gain of 16\n"));
408 Serial.print(F(" 3-Gain of 32\n"));
409 Serial.print(F("Enter a Command: "));
410 user_command = read_int(); // Read the single command
411 Serial.println(user_command);
412 if (user_command < 0 || user_command > 3)
413 Serial.print(F("Incorrect Gain Option"));
414 else
415 {
416 for (uint8_t i = 0; i <= 5; i++)
417 {
418 channel_gain[i] = user_command;
419 }
420 }
421 }
422 else
423 {
424 Serial.print(F("\nGain Options\n"));
425 Serial.print(F(" 0-Unity Gain\n"));
426 Serial.print(F(" 1-Gain of 8\n"));
427 Serial.print(F(" 2-Gain of 16\n"));
428 Serial.print(F(" 3-Gain of 32\n"));
429 Serial.print(F("Enter a Command: "));
430 user_command = read_int(); // Read the single command
431 Serial.println(user_command);
432 if (user_command < 0 || user_command > 3)
433 Serial.print(F("Incorrect Gain Option"));
434 else
435 channel_gain[channel] = user_command;
436 }
437 }
438 }
439 for (int8_t i = 0; i <= 5; i++)
440 read_gain_seq[i + 6] = channel_gain[i];
441 filt_flag = 1;
442 }
443
444 //! Utility function to display the gain
445 void print_gain(uint8_t gain)
446 {
447 switch (gain)
448 {
449 case unity:
450 Serial.print(F("Unity\n"));
451 break;
452 case g8:
453 Serial.print(F("8\n"));
454 break;
455 case g16:
456 Serial.print(F("16\n"));
457 break;
458 case g32:
459 Serial.print(F("32\n"));
460 break;
461 }
462 }
463
464 //! Set 1X or 2X mode
465 void menu_2_set_1X2X()
466 {
467 int16_t user_command; // The user input command
468
469 // 2X Mode
470 Serial.print(F("2X Mode Settings\n\n"));
471 Serial.print(F("0-Disable\n"));
472 Serial.print(F("1-Enable\n"));
473 Serial.print(F("Enter a Command: "));
474 user_command = read_int();
475 Serial.println(user_command);
476
477 if (user_command == 0)
478 {
479 two_x_mode = LTC2498_SPEED_1X;
480 Serial.print(F("2X Mode Disabled\n"));
481 }
482 else
483 {
484 two_x_mode = LTC2498_SPEED_2X;
485 Serial.print(F("2X Mode Enabled\n"));
486 }
487 filt_flag = 1;
488 }
print_prompt
static void print_prompt()
Prints main menu.
Definition: DC1410AA.ino:202
user_command
unsigned char user_command
Definition: Serial_EEPROM_Test.ino:75
LTC2498_P12_N13
#define LTC2498_P12_N13
Definition: LTC2498.h:176
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.
filt_flag
static uint8_t filt_flag
Keeps track when the filter needs to be rest.
Definition: DC1410AA.ino:105
g16
Definition: DC1410AA.ino:97
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
channel
static uint8_t channel
LTC2305 Channel selection.
Definition: DC1444A.ino:127
menu_1_read_differential
static uint8_t menu_1_read_differential()
Read channels in differential mode.
Definition: DC1410AA.ino:212
g32
Definition: DC1410AA.ino:97
channel_gain
static uint8_t channel_gain[6]
default is gain 32
Definition: DC1410AA.ino:106
LTC2498_vref
static float LTC2498_vref
The LTC2498 ideal reference voltage.
Definition: DC1410AA.ino:103
LTC24XX_diff_code_to_calibrated_voltage
float LTC24XX_diff_code_to_calibrated_voltage(int32_t adc_code, float LTC2449_lsb, int32_t LTC2449_offset_code)
Calculates the voltage corresponding to an ADC code, given lsb weight (in volts) and the calibrated A...
Definition: LTC24XX_general.cpp:409
B_PIN
const uint8_t B_PIN
Definition: DC1410AA.ino:122
adc_voltage
static float adc_voltage
Definition: DC2071AA.ino:115
rejection_mode
static uint8_t rejection_mode
The LTC2498 rejection mode settings.
Definition: DC1410AA.ino:102
LTC2498_P4_N5
#define LTC2498_P4_N5
Definition: LTC2498.h:164
print_title
static void print_title()
Prints the title block when program first starts.
Definition: DC1410AA.ino:187
smoothing_const
const float smoothing_const
Exponential filter smothing constant.
Definition: DC1410AA.ino:125
LTC24XX_general.h
LTC24XX General Library: Functions and defines for all SINC4 Delta Sigma ADCs.
A_PIN
const uint8_t A_PIN
Gain MUX pins.
Definition: DC1410AA.ino:121
menu_3_set_channel_gain
static void menu_3_set_channel_gain()
Allows the user to sets the desired gain.
Definition: DC1410AA.ino:361
Av
Av
Definition: DC1410AB.ino:97
loop
static void loop()
Repeats Linduino loop.
Definition: DC1410AA.ino:153
LTC2498_P14_N15
#define LTC2498_P14_N15
Definition: LTC2498.h:179
QuikEval_EEPROM.h
QuikEval EEPROM Library.
menu_2_set_1X2X
static void menu_2_set_1X2X()
Set 1X or 2X mode.
Definition: DC1410AA.ino:465
read_gain_seq
static uint8_t read_gain_seq[]
lookup table for gain setting reads
Definition: DC1410AA.ino:116
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
eoc_timeout
static uint16_t eoc_timeout
Timeout in ms.
Definition: DC1410AA.ino:104
LTC2498_P10_N11
#define LTC2498_P10_N11
Definition: LTC2498.h:173
LTC2498_P6_N7
#define LTC2498_P6_N7
Definition: LTC2498.h:167
demo_board_connected
static uint8_t demo_board_connected
Set to 1 if the board is connected.
Definition: DC1410AA.ino:100
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.
read_command_seq
const uint8_t read_command_seq[]
Lookup table for reads.
Definition: DC1410AA.ino:110
LTC2498_P0_N1
#define LTC2498_P0_N1
Definition: LTC2498.h:158
unity
Definition: DC1410AA.ino:97
LT_I2C.h
LT_I2C: Routines to communicate with ATmega328P&#39;s hardware I2C port.
print_user_command
static void print_user_command(uint8_t menu)
setup
static void setup()
Initialize Linduino.
Definition: DC1410AA.ino:128
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
g8
Definition: DC1410AA.ino:97
print_gain
static void print_gain(uint8_t gain)
Utility function to display the gain.
Definition: DC1410AA.ino:445
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_CS
#define LTC2498_CS
Define the SPI CS pin.
Definition: LTC2498.h:116
quikeval_I2C_init
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
Definition: LT_I2C.cpp:394
i
static int i
Definition: DC2430A.ino:184
LTC2498_P8_N9
#define LTC2498_P8_N9
Definition: LTC2498.h:170
LTC2498_R50_R60
#define LTC2498_R50_R60
Definition: LTC2498.h:131
two_x_mode
static uint8_t two_x_mode
The LTC2498 2X Mode settings.
Definition: DC1410AA.ino:101
init_gain_pins
static void init_gain_pins(uint8_t a_pin, uint8_t b_pin)
initialize the MUX select pins
Definition: DC1410AA.ino:352
adc_code
static uint32_t adc_code
Definition: DC2071AA.ino:113
set_gain
static void set_gain(uint8_t a_pin, uint8_t b_pin, uint8_t gain)
Set the Mux select pins to the desired gain.
Definition: DC1410AA.ino:345