Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board
DC939A.ino
Go to the documentation of this file.
1 
2 /*!
3 Linear Technology DC939A Demonstration Board.
4 LTC2484: 24-Bit Delta Sigma ADC with Easy Drive Input Current Cancellation.
5 
6 @verbatim
7 
8 NOTES
9  Setup:
10  Set the terminal baud rate to 115200 and select the newline terminator. Equipment
11  required is a precision voltage source and a precision voltmeter. No external
12  power supply is required. Ensure JP1 is in the +5V position.
13 
14  To Read data:
15  The voltage source should be connected with positive lead to IN+ and negative
16  lead to IN-. The voltage source negative output must also be connected to the GND
17  pin in order to provide a ground-referenced voltage. Ensure voltage is within
18  analog input voltage range -0.3V to +2.5V. Swapping input voltages results in a
19  reversed polarity reading.
20 
21  How to calibrate:
22  Short the inputs to ground to calibrate the offset. Next, hit ENTER (this takes
23  the reading). Now apply approximately 2.49 volts to +IN, with -IN connected to
24  ground. Measure this voltage with a precise voltmeter and enter this value.
25  Calibration is now stored in EEPROM. Upon startup the calibration values will be
26  restored.
27 
28  Explanation of Commands:
29 
30  **** MAIN MENU ****
31 
32  0- Read- By entering this a voltage at the +IN, -IN terminals will be read.
33  1- Set Rejection- Select this to access the Filter rejection menu. Follow
34  command cues to enable desired rejection profile of on-chip digital filters.
35  2- Select 2X Rate- This selection allows disabling of the autocalibration
36  feature to achieve a benefit of twice the output rate.
37  3- Calibrate Voltage- Follow the calibration cues to calibrate the device
38  voltage.
39  4- Calibrate Temperature- Select this and follow the cues if it is desired to
40  calibrate the integrated
41  temperature sensor.
42 
43 USER INPUT DATA FORMAT:
44  decimal : 1024
45  hex : 0x400
46  octal : 02000 (leading 0 "zero")
47  binary : B10000000000
48  float : 1024.0
49 
50 @endverbatim
51 
52 http://www.linear.com/product/LTC2484
53 
54 http://www.linear.com/product/LTC2484#demoboards
55 
56 
57 Copyright 2018(c) Analog Devices, Inc.
58 
59 All rights reserved.
60 
61 Redistribution and use in source and binary forms, with or without
62 modification, are permitted provided that the following conditions are met:
63  - Redistributions of source code must retain the above copyright
64  notice, this list of conditions and the following disclaimer.
65  - Redistributions in binary form must reproduce the above copyright
66  notice, this list of conditions and the following disclaimer in
67  the documentation and/or other materials provided with the
68  distribution.
69  - Neither the name of Analog Devices, Inc. nor the names of its
70  contributors may be used to endorse or promote products derived
71  from this software without specific prior written permission.
72  - The use of this software may or may not infringe the patent rights
73  of one or more patent holders. This license does not release you
74  from the requirement that you obtain separate licenses from these
75  patent holders to use this software.
76  - Use of the software either in source or binary form, must be run
77  on or directly connected to an Analog Devices Inc. component.
78 
79 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
80 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
81 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
82 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
83 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
84 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
85 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
86 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
87 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
88 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
89  */
90 
91 /*! @file
92  @ingroup LTC2484
93 */
94 
95 #include <Arduino.h>
96 #include <stdint.h>
97 #include "Linduino.h"
98 #include "LT_SPI.h"
99 #include "UserInterface.h"
100 #include "LT_I2C.h"
101 #include "QuikEval_EEPROM.h"
102 #include "LTC2484.h"
103 #include "LTC24XX_general.h"
104 #include <SPI.h>
105 #include <Wire.h>
106 
107 // Rejection Constants
108 #define REJECTION50_60 0 //!< 50-60Hz rejection
109 #define REJECTION50 1 //!< 50Hz rejection
110 #define REJECTION60 2 //!< 60Hz rejection
111 
112 // Function Declaration
113 void print_title(); // Print the title block
114 void print_prompt(); // Prompt the user for an input command
115 int8_t restore_calibration(); // Read the DAC calibration from EEPROM, Return 1 if successful, 0 if not
116 void store_calibration(); // Store the ADC calibration to the EEPROM
117 uint8_t build_adc_command(uint8_t temperature); // Build the ADC command byte
118 
119 uint8_t menu_0_read();
120 void menu_1_set_rejection();
121 void menu_2_set_1X_2X();
122 uint8_t menu_3_calibrate_voltage();
124 
125 // Global variables
126 static uint8_t demo_board_connected; //!< Set to 1 if the board is connected
127 static int8_t adc_rejection = REJECTION50_60; //!< The LTC2484 rejection
128 static int8_t adc_2x = 0; //!< The LTC2484 2x speed mode
129 
130 // Calibration variables
131 static float LTC2484_lsb = 9.3132258E-9; //!< Ideal LSB size, 5V/(2^29) for a 5V reference
132 static int32_t LTC2484_offset_code = 0; //!< Ideal offset
133 static float LTC2484_t0 = 27.0; //!< Nominal temperature
134 static float LTC2484_r0 = 45.097156E6; //!< ADC code at the nominal temperature (420mV default)
135 
136 const uint16_t MISO_TIMEOUT = 1000; //!< The MISO timeout (ms)
137 
138 //! Initialize Linduino
139 void setup()
140 // Setup the program
141 {
142  char demo_name[] = "DC939"; // Demo Board Name stored in QuikEval EEPROM
143 
144  quikeval_SPI_init(); // Configure the spi port for 4MHz SCK
145  quikeval_SPI_connect(); // Connect SPI to main data port
146  quikeval_I2C_init(); // Configure the EEPROM I2C port for 100kHz
147  Serial.begin(115200); // Initialize the serial port to the PC
148  print_title();
151  {
153  print_prompt();
154  }
155 }
156 
157 //! Repeats Linduino loop
158 void loop()
159 {
160  uint8_t user_command; // The user input command
161  uint8_t acknowledge = 0;
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  else
169  Serial.println(user_command);
170  delay(50); // Allow the print to finish
171  switch (user_command)
172  {
173  case 0:
174  acknowledge |= menu_0_read();
175  break;
176  case 1:
178  break;
179  case 2:
181  break;
182  case 3:
183  acknowledge |= menu_3_calibrate_voltage();
184  break;
185  case 4:
186  acknowledge |= menu_4_calibrate_temperature();
187  break;
188  default:
189  Serial.println("Incorrect Option");
190  break;
191  }
192  if (acknowledge)
193  Serial.println(F("***** SPI ERROR *****"));
194  Serial.println(F("*****************************************************************"));
195  print_prompt();
196  }
197  }
198 }
199 
200 // Function Definitions
201 
202 //! Prints the title block when program first starts.
204 {
205  Serial.println();
206  Serial.println(F("*****************************************************************"));
207  Serial.println(F("* DC939A Demonstration Program *"));
208  Serial.println(F("* *"));
209  Serial.println(F("* This program demonstrates how to send data and receive data *"));
210  Serial.println(F("* from the 24-bit delta-sigma ADC. *"));
211  Serial.println(F("* *"));
212  Serial.println(F("* *"));
213  Serial.println(F("* Set the baud rate to 115200 select the newline terminator. *"));
214  Serial.println(F("* *"));
215  Serial.println(F("*****************************************************************"));
216 }
217 
218 //! Prints main menu.
220 {
221  Serial.println(F("\nPresent Values:"));
222  Serial.print(F(" Rejection: "));
223  switch (adc_rejection)
224  {
225  case REJECTION50_60:
226  Serial.println(F("50-60Hz rejection"));
227  break;
228  case REJECTION50:
229  Serial.println(F("50Hz rejection"));
230  break;
231  case REJECTION60:
232  Serial.println(F("60Hz rejection"));
233  break;
234  }
235  Serial.print(F(" 2X Speed: "));
236  Serial.println(adc_2x, DEC);
237  Serial.print(F(" Offset Code="));
238  Serial.println(LTC2484_offset_code);
239  Serial.print(F(" LSB="));
240  Serial.print(LTC2484_lsb * 1.0e9, 4);
241  Serial.println(F("nV (32-bits)"));
242  Serial.print(F(" R0="));
243  Serial.println(LTC2484_r0, 0);
244  Serial.print(F(" T0="));
245  Serial.print(LTC2484_t0, 1);
246  Serial.println(F("C"));
247  Serial.println();
248  Serial.println(F("Command Summary:"));
249  Serial.println(F(" 0-Read"));
250  Serial.println(F(" 1-Set Rejection"));
251  Serial.println(F(" 2-Set 2X Speed"));
252  Serial.println(F(" 3-Calibrate Voltage"));
253  Serial.println(F(" 4-Calibrate Temperature"));
254  Serial.println();
255  Serial.print(F("Enter a command:"));
256 }
257 
258 //! Read stored calibration parameters from nonvolatile EEPROM on demo board
259 //! @return 0 if successful, 1 if failure
261 // Read the DAC calibration from EEPROM
262 {
263  int16_t cal_key;
264  // Read the cal key from the EEPROM
266  if (cal_key == EEPROM_CAL_KEY)
267  {
268  // Calibration has been stored, read offset and lsb
273  Serial.println(F("Calibration Restored"));
274  return (1);
275  }
276  else
277  {
278  Serial.println(F("Calibration not found"));
279  return (0);
280  }
281 }
282 
283 //! Store measured calibration parameters to nonvolatile EEPROM on demo board
285 // Store the ADC calibration to the EEPROM
286 {
292  Serial.println(F("Calibration Stored to EEPROM"));
293 }
294 
295 //! Construct ADC command from rejection, input, and 2X parameters
296 //! @return ADC command
297 uint8_t build_adc_command(uint8_t temperature)
298 // Build the ADC command byte
299 {
300  uint8_t adc_command = 0; // The LTC2484 command byte
301  adc_command = LTC2484_ENABLE; // Set ENABLE
302  switch (adc_rejection)
303  {
304  case REJECTION50_60: // Set REJECTION
305  adc_command |= LTC2484_REJECTION_50HZ_60HZ;
306  break;
307  case REJECTION50:
308  adc_command |= LTC2484_REJECTION_50HZ;
309  break;
310  case REJECTION60:
311  adc_command |= LTC2484_REJECTION_60HZ;
312  break;
313  }
314  if (temperature) // Set Temperature Input
315  {
316  adc_command |= LTC2484_TEMPERATURE_INPUT;
317  adc_command |= LTC2484_AUTO_CALIBRATION;
318  }
319  else
320  {
321  adc_command |= LTC2484_EXTERNAL_INPUT; // Set Voltage Input
322  if (adc_2x)
323  adc_command |= LTC2484_SPEED_2X; // Set 2X Speed
324  else
325  adc_command |= LTC2484_AUTO_CALIBRATION;
326  }
327  return(adc_command);
328 }
329 
330 //! Read ADC
331 //! @return 0 if successful, 1 if failure
332 uint8_t menu_0_read()
333 {
334  // Read values
335  int32_t adc_code = 0; // The LTC2484 code
336  float adc_voltage = 0.0; // The LTC2484 input voltage
337  float adc_temperature; // The LTC2484 temperature sensor value
338  uint8_t adc_command; // The LTC2484 command byte
339 
340  adc_command = build_adc_command(0); // Build ADC command byte for voltage input
341  if (LTC2484_EOC_timeout(LTC2484_CS, MISO_TIMEOUT)) // Check for EOC
342  return(1);
343  LTC2484_read(LTC2484_CS, adc_command, &adc_code); // Throw away last reading
344  adc_command = build_adc_command(1); // Build ADC command byte for temperature input
345  if (LTC2484_EOC_timeout(LTC2484_CS, MISO_TIMEOUT)) // Check for EOC
346  return(1);
347  LTC2484_read(LTC2484_CS, adc_command, &adc_code); // Read voltage
348  Serial.println(F("\nVoltage Measurement"));
349  Serial.print(F(" Received Code: 0x"));
350  Serial.println(adc_code, HEX);
351  Serial.print(F(" Voltage:"));
352  adc_voltage = LTC2484_code_to_voltage(adc_code, LTC2484_lsb, LTC2484_offset_code);
353  Serial.print(adc_voltage, 6);
354  Serial.println(F("V "));
355  adc_command = build_adc_command(1); // Build ADC command byte for voltage input
356  if (LTC2484_EOC_timeout(LTC2484_CS, MISO_TIMEOUT)) // Check for EOC
357  return(1);
358  LTC2484_read(LTC2484_CS, adc_command, &adc_code); // Read temperature
359  Serial.println(F("\nTemperature Measurement"));
360  Serial.print(F(" Received Code: 0x"));
361  Serial.println(adc_code, HEX);
362  Serial.print(F(" Sensor Voltage:"));
363  adc_voltage = LTC2484_code_to_voltage(adc_code, LTC2484_lsb, LTC2484_offset_code);
364  Serial.print(adc_voltage, 6);
365  Serial.println(F("V"));
366  Serial.print(F(" Temperature:"));
367  adc_temperature = LTC2484_temperature(adc_code, LTC2484_t0, LTC2484_r0);
368  Serial.print(adc_temperature, 1);
369  Serial.println(F("C\n"));
370  return(0);
371 }
372 
373 //! Set rejection mode
375 {
376  uint8_t user_command; // The user input command
377 
378  // Set rejection
379  Serial.println(F("Rejection :"));
380  Serial.println(F(" 0: 50-60Hz rejection"));
381  Serial.println(F(" 1: 50Hz rejection"));
382  Serial.println(F(" 2: 60Hz rejection"));
383  Serial.println();
384  Serial.print(F("Select Rejection:"));
385  user_command = read_int(); // Read the user command
386  Serial.println(user_command);
387  switch (user_command)
388  {
389  case 1:
391  break;
392  case 2:
394  break;
395  default:
397  break;
398  }
399 }
400 
401 //! Select 1X or 2X mode
403 {
404  // Set 2X rate
405  uint8_t user_command; // The user input command
406 
407  Serial.println();
408  Serial.print(F("Select 2X Rate (0-OFF, 1-ON): "));
409  user_command = read_int(); // Read the user command
410  Serial.println(user_command);
411  switch (user_command)
412  {
413  case 0:
414  adc_2x = 0;
415  break;
416  case 1:
417  adc_2x = 1;
418  break;
419  default:
420  adc_2x = 0;
421  break;
422  }
423 }
424 
425 //! Calibrate ADC given two known inputs
426 //! @return 0 if successful, 1 if failure
428 {
429  // Calibrate voltage measurement
430  float zero_voltage; // Measured cal voltage
431  float fs_voltage; // Measured cal voltage
432  int32_t zero_code; // Cal zero code
433  int32_t fs_code; // Cal full scale code
434  uint8_t user_command; // The user input command
435  int32_t adc_code = 0; // The LTC2484 code
436  uint8_t adc_command; // The LTC2484 command byte
437 
438  Serial.println(F("Short the inputs to ground calibrate the offset."));
439  Serial.println(F("or apply a voltage for the lower point in two point calibration"));
440  Serial.print(F("Enter the measured input voltage:"));
441  zero_voltage = read_float();
442  Serial.println(zero_voltage, 6);
443 
444  adc_command = build_adc_command(0); // Build ADC command byte for voltage input
445  if (LTC2484_EOC_timeout(LTC2484_CS, MISO_TIMEOUT)) // Check for EOC
446  return(1);
447  LTC2484_read(LTC2484_CS, adc_command, &adc_code); // Throw away previous reading
448  if (LTC2484_EOC_timeout(LTC2484_CS, MISO_TIMEOUT)) // Check for EOC
449  return(1);
450  LTC2484_read(LTC2484_CS, adc_command, &zero_code); // Measure zero
451 
452  Serial.println(F("Apply ~2.40V to +IN"));
453  Serial.println(F("Enter the measured input voltage:"));
454  fs_voltage = read_float();
455 
456  adc_command = build_adc_command(0); // Build ADC command byte for voltage input
457  if (LTC2484_EOC_timeout(LTC2484_CS, MISO_TIMEOUT)) // Check for EOC
458  return(1);
459  LTC2484_read(LTC2484_CS, adc_command, &adc_code); // Throw away previous reading
460  if (LTC2484_EOC_timeout(LTC2484_CS, MISO_TIMEOUT)) // Check for EOC
461  return(1);
462  LTC2484_read(LTC2484_CS, adc_command, &fs_code); // Measure full scale
463 
464  LTC2484_cal_voltage(zero_code, fs_code, zero_voltage, fs_voltage, &LTC2484_lsb, &LTC2484_offset_code);
465 
466  Serial.print(F("ADC offset : "));
467  Serial.print(LTC2484_offset_code);
468  Serial.print(F(" ADC lsb : "));
469  Serial.print(LTC2484_lsb * 1.0e9, 4);
470  Serial.println(F("nV (32-bits)"));
472  return(0);
473 }
474 
475 //! Calibrate Temperature given two known inputs
476 //! @return 0 if successful, 1 if failure
478 {
479  float adc_cal_temperature; // Measured cal temperature
480  int32_t adc_code = 0; // The LTC2484 code
481  uint8_t adc_command; // The LTC2484 command byte
482 
483  Serial.println(F("Enter the actual temperature(C):"));
484  adc_cal_temperature = read_float();
485  adc_command = build_adc_command(1); // Build ADC command byte for temperature input
486  if (LTC2484_EOC_timeout(LTC2484_CS, MISO_TIMEOUT)) // Check for EOC
487  return(1);
488  LTC2484_read(LTC2484_CS, adc_command, &adc_code); // Throw away previous reading
489  if (LTC2484_EOC_timeout(LTC2484_CS, MISO_TIMEOUT)) // Check for EOC
490  return(1);
491  LTC2484_read(LTC2484_CS, adc_command, &adc_code); // Measure temperature
492  LTC2484_cal_temperature(adc_code, adc_cal_temperature, &LTC2484_t0, &LTC2484_r0); // Cal temperature
493  store_calibration(); // Store to eeprom
494  return(0);
495 }
static void loop()
Repeats Linduino loop.
Definition: DC939A.ino:158
static void setup()
Initialize Linduino.
Definition: DC939A.ino:139
uint8_t eeprom_read_int16(uint8_t i2c_address, int16_t *read_data, uint16_t address)
Read the two byte integer data from the EEPROM starting at address.
static int8_t adc_rejection
The LTC2484 rejection.
Definition: DC939A.ino:127
LTC2484: 24-Bit Delta Sigma ADC with Easy Drive Input Current Cancellation.
unsigned char user_command
static uint8_t adc_command
Definition: DC2071AA.ino:111
#define EEPROM_I2C_ADDRESS
#define LTC2484_TEMPERATURE_INPUT
Definition: LTC2484.h:161
#define LTC2484_AUTO_CALIBRATION
Definition: LTC2484.h:167
#define LTC2484_REJECTION_50HZ_60HZ
Definition: LTC2484.h:163
static void print_title()
Prints the title block when program first starts.
Definition: DC939A.ino:203
#define LTC2484_SPEED_2X
Definition: LTC2484.h:168
Header File for Linduino Libraries and Demo Code.
uint8_t eeprom_read_float(uint8_t i2c_address, float *read_data, uint16_t address)
Read the four byte float data from the EEPROM starting at address.
uint8_t eeprom_write_int32(uint8_t i2c_address, int32_t write_data, uint16_t address)
Write the 4 byte long data to the EEPROM starting at address.
static float LTC2484_t0
Nominal temperature.
Definition: DC939A.ino:133
static int32_t LTC2484_offset_code
Ideal offset.
Definition: DC939A.ino:132
static float LTC2484_r0
ADC code at the nominal temperature (420mV default)
Definition: DC939A.ino:134
static uint8_t menu_4_calibrate_temperature()
Calibrate Temperature given two known inputs.
Definition: DC939A.ino:477
#define REJECTION60
60Hz rejection
Definition: DC939A.ino:110
static float adc_voltage
Definition: DC2071AA.ino:115
float LTC2484_code_to_voltage(int32_t adc_code, float LTC2484_lsb, int32_t LTC2484_offset_code)
Calculates the LTC2484 input bipolar voltage.
Definition: LTC2484.cpp:96
LTC24XX General Library: Functions and defines for all SINC4 Delta Sigma ADCs.
float LTC2484_temperature(int32_t adc_code, float LTC2484_t0, float LTC2484_r0)
Calculate the LTC2484 temperature.
Definition: LTC2484.cpp:102
void LTC2484_cal_voltage(int32_t zero_code, int32_t fs_code, float zero_voltage, float fs_voltage, float *LTC2484_lsb, int32_t *LTC2484_offset_code)
Calibrate the lsb.
Definition: LTC2484.cpp:109
uint8_t eeprom_write_float(uint8_t i2c_address, float write_data, uint16_t address)
Write the 4 byte float data to the EEPROM starting at address.
uint8_t eeprom_write_int16(uint8_t i2c_address, int16_t write_data, uint16_t address)
Write the 2 byte integer data to the EEPROM starting at address.
void LTC2484_read(uint8_t cs, uint8_t adc_command, int32_t *adc_code)
Read LTC2484 result, program configuration for next conversion.
Definition: LTC2484.cpp:90
static void menu_1_set_rejection()
Set rejection mode.
Definition: DC939A.ino:374
QuikEval EEPROM Library.
static float LTC2484_lsb
Ideal LSB size, 5V/(2^29) for a 5V reference.
Definition: DC939A.ino:131
static uint8_t menu_3_calibrate_voltage()
Calibrate ADC given two known inputs.
Definition: DC939A.ino:427
void LTC2484_cal_temperature(int32_t adc_code, float temperature, float *LTC2484_t0, float *LTC2484_r0)
Calibrate temperature.
Definition: LTC2484.cpp:123
void quikeval_SPI_init(void)
Configure the SPI port for 4Mhz SCK.
Definition: LT_SPI.cpp:151
static int8_t adc_2x
The LTC2484 2x speed mode.
Definition: DC939A.ino:128
#define EEPROM_CAL_STATUS_ADDRESS
int8_t discover_demo_board(char *demo_name)
Read the ID string from the EEPROM and determine if the correct board is connected.
#define LTC2484_EXTERNAL_INPUT
Definition: LTC2484.h:160
#define REJECTION50
50Hz rejection
Definition: DC939A.ino:109
LT_SPI: Routines to communicate with ATmega328P&#39;s hardware SPI port.
static uint8_t demo_board_connected
Set to 1 if the board is connected.
Definition: DC939A.ino:126
static void menu_2_set_1X_2X()
Select 1X or 2X mode.
Definition: DC939A.ino:402
static void store_calibration()
Store measured calibration parameters to nonvolatile EEPROM on demo board.
Definition: DC939A.ino:284
#define LTC2484_REJECTION_50HZ
Definition: LTC2484.h:164
LT_I2C: Routines to communicate with ATmega328P&#39;s hardware I2C port.
int8_t LTC2484_EOC_timeout(uint8_t cs, uint16_t miso_timeout)
Checks for EOC with a specified timeout.
Definition: LTC2484.cpp:84
char demo_name[]
Demo Board Name stored in QuikEval EEPROM.
Definition: DC1880A.ino:97
void quikeval_SPI_connect()
Connect SPI pins to QuikEval connector through the Linduino MUX. This will disconnect I2C...
Definition: LT_SPI.cpp:138
uint8_t eeprom_read_int32(uint8_t i2c_address, int32_t *read_data, uint16_t address)
Read the four byte long data from the EEPROM starting at address.
#define REJECTION50_60
50-60Hz rejection
Definition: DC939A.ino:108
int32_t read_int()
float read_float()
static uint8_t menu_0_read()
Read ADC.
Definition: DC939A.ino:332
static uint8_t build_adc_command(uint8_t temperature)
Construct ADC command from rejection, input, and 2X parameters.
Definition: DC939A.ino:297
#define LTC2484_CS
define the SPI CS pin
Definition: LTC2484.h:151
#define LTC2484_REJECTION_60HZ
Definition: LTC2484.h:165
static void print_prompt()
Prints main menu.
Definition: DC939A.ino:219
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
Definition: LT_I2C.cpp:394
const uint16_t MISO_TIMEOUT
The MISO timeout (ms)
Definition: DC939A.ino:136
#define EEPROM_CAL_KEY
#define LTC2484_ENABLE
Definition: LTC2484.h:157
static uint32_t adc_code
Definition: DC2071AA.ino:113
static int8_t restore_calibration()
Read stored calibration parameters from nonvolatile EEPROM on demo board.
Definition: DC939A.ino:260