| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Variables
DC2071AA.ino File Reference
Analog-to-Digital Converters (ADC) » LTC2373: 16/18-bit 1Msps 8 channel SAR ADC

Linear Technology DC2071A Demonstration Board. More...

## Detailed Description

Linear Technology DC2071A Demonstration Board.

LTC2373: 16/18-bit 1Msps 8 channel SAR ADC LTC2372: 16/18-bit 500ksps 8 channel SAR ADC LTC2374: 16 bit 1.6Msps 8 channel SAR ADC

Max SCK rate is 100MHz.

    NOTES
      Setup:
       Set the terminal baud rate to 115200 and select the newline terminator.
       Equipment required is a precision voltage source (null box) and a precision voltmeter (to monitor voltage source).
       No external power supply is required.
       Ensure JP1 is installed in the default position from the factory.

      How to test:
       The voltage source should be connected with positive and negative leads to the positive & negative ADC inputs. Ensure the differential voltage is within the
       range of -VREF to +VREF. Swapping input voltages results in a reversed polarity reading.

      How to calibrate:
       Enter menu item number "3 - Calibrate" and follow the prompts.
       Calibration is now stored in EEPROM. Upon startup the calibration values will be restored.

    USER INPUT DATA FORMAT:
     decimal : 1024
     hex     : 0x400
     octal   : 02000  (leading 0 "zero")
     binary  : B10000000000
     float   : 1024.0

http://www.linear.com/product/LTC2373-16 http://www.linear.com/product/LTC2373_18 http://www.linear.com/product/LTC2372-16 http://www.linear.com/product/LTC2372-18 http://www.linear.com/product/LTC2374-16

http://www.linear.com/product/LTC2373-16#demoboards http://www.linear.com/product/LTC2373_18#demoboards http://www.linear.com/product/LTC2372-16#demoboards http://www.linear.com/product/LTC2372-18#demoboards http://www.linear.com/product/LTC2374-16#demoboards

Copyright 2018(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
- The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
- Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file DC2071AA.ino.

Go to the source code of this file.

## Functions
static void | print_title ()
| Prints the title block when program first starts. More...
static void | print_prompt ()
| Prints main menu. More...
static void | print_user_command (uint8_t menu)
| Display selected differential channels. More...
static void | menu_1_read_adc ()
| Read channels in single-ended mode. More...
static void | menu_2_program_sequencer ()
| Program the sequencer. More...
static void | menu_3_read_sequencer ()
| Program the sequencer. More...
static void | menu_4_select_bits ()
| Select number of bits. More...
static void | menu_5_select_range ()
| Select range. More...
static void | menu_6_select_gain_compression ()
| Select gain compression. More...
static void | setup ()
| Initialize Linduino. More...
static void | loop ()
| Repeats Linduino loop. More...

## Variables
static uint8_t | adc_command
static uint8_t | user_command
static uint32_t | adc_code
static int32_t | display_code
static float | adc_voltage
static float | LTC2373_vref = 4.096
static uint8_t | LTC2373_range_select = LTC2373_RANGE_UNIPOLAR
| Default set for single-ended unipolar mode. More...
static uint8_t | LTC2373_gain_compression = LTC2373_NO_COMPRESSION
| Default set for no compression mode. More...
static uint8_t | LTC2373_bits = 18
| Default set for 18 bits. More...
static uint8_t | LTC2373_sequencer_bit = LTC2373_SEQUENCER_BIT
const uint8_t | COMMAND_SINGLE_ENDED [8]
| Lookup table to build the command for single-ended mode, input with respect to GND. More...
const uint8_t | COMMAND_DIFF [8]
| Lookup table to build the command for differential mode. More...

## Function Documentation

## ◆ loop()

static void loop | ( | void |  | ) |
| static

Repeats Linduino loop.

Definition at line 147 of file DC2071AA.ino.

## ◆ menu_1_read_adc()

static void menu_1_read_adc | ( |  | ) |
| static

Read channels in single-ended mode.

Returns
  void

Definition at line 190 of file DC2071AA.ino.

## ◆ menu_2_program_sequencer()

static void menu_2_program_sequencer | ( |  | ) |
| static

Program the sequencer.

Returns
  void

Definition at line 438 of file DC2071AA.ino.

## ◆ menu_3_read_sequencer()

static void menu_3_read_sequencer | ( |  | ) |
| static

Program the sequencer.

Returns
  void

Definition at line 481 of file DC2071AA.ino.

## ◆ menu_4_select_bits()

static void menu_4_select_bits | ( |  | ) |
| static

Select number of bits.

Returns
  void

Definition at line 537 of file DC2071AA.ino.

## ◆ menu_5_select_range()

static void menu_5_select_range | ( |  | ) |
| static

Select range.

Returns
  void

Definition at line 574 of file DC2071AA.ino.

## ◆ menu_6_select_gain_compression()

static void menu_6_select_gain_compression | ( |  | ) |
| static

Select gain compression.

Returns
  void

Definition at line 620 of file DC2071AA.ino.

## ◆ print_prompt()

static void print_prompt | ( |  | ) |
| static

Prints main menu.

Definition at line 671 of file DC2071AA.ino.

## ◆ print_title()

static void print_title | ( | void |  | ) |
| static

Prints the title block when program first starts.

Definition at line 655 of file DC2071AA.ino.

## ◆ print_user_command()

static void print_user_command | ( | uint8_t | menu | ) |
| static

Display selected differential channels.

Displaying single-ended channels is straightforward; not so with differential because the inputs can take either polarity.

Definition at line 687 of file DC2071AA.ino.

## ◆ setup()

static void setup | ( | void |  | ) |
| static

Initialize Linduino.

Definition at line 135 of file DC2071AA.ino.

## Variable Documentation

## ◆ adc_code

uint32_t adc_code
| static

Definition at line 113 of file DC2071AA.ino.

## ◆ adc_command

uint8_t adc_command
| static

Definition at line 111 of file DC2071AA.ino.

## ◆ adc_voltage

float adc_voltage
| static

Definition at line 115 of file DC2071AA.ino.

## ◆ COMMAND_DIFF

const uint8_t COMMAND_DIFF[8]

Initial value:
= {LTC2373_CH0_1, LTC2373_CH2_3, LTC2373_CH4_5, LTC2373_CH6_7,
LTC2373_CH1_0, LTC2373_CH3_2, LTC2373_CH5_4, LTC2373_CH7_6
}
LTC2373_CH5_4
#define LTC2373_CH5_4
Definition: LTC2373.h:110
LTC2373_CH7_6
#define LTC2373_CH7_6
Definition: LTC2373.h:113
LTC2373_CH6_7
#define LTC2373_CH6_7
Definition: LTC2373.h:112
LTC2373_CH2_3
#define LTC2373_CH2_3
Definition: LTC2373.h:106
LTC2373_CH3_2
#define LTC2373_CH3_2
Definition: LTC2373.h:107
LTC2373_CH1_0
#define LTC2373_CH1_0
Definition: LTC2373.h:104
LTC2373_CH0_1
#define LTC2373_CH0_1
Definition: LTC2373.h:103
LTC2373_CH4_5
#define LTC2373_CH4_5
Definition: LTC2373.h:109

Lookup table to build the command for differential mode.

Builds the command for differential mode

Definition at line 129 of file DC2071AA.ino.

## ◆ COMMAND_SINGLE_ENDED

const uint8_t COMMAND_SINGLE_ENDED[8]

Initial value:
= {LTC2373_CH0, LTC2373_CH1, LTC2373_CH2, LTC2373_CH3,
LTC2373_CH4, LTC2373_CH5, LTC2373_CH6, LTC2373_CH7
}
LTC2373_CH4
#define LTC2373_CH4
Definition: LTC2373.h:98
LTC2373_CH1
#define LTC2373_CH1
Definition: LTC2373.h:95
LTC2373_CH3
#define LTC2373_CH3
Definition: LTC2373.h:97
LTC2373_CH2
#define LTC2373_CH2
Definition: LTC2373.h:96
LTC2373_CH5
#define LTC2373_CH5
Definition: LTC2373.h:99
LTC2373_CH7
#define LTC2373_CH7
Definition: LTC2373.h:101
LTC2373_CH6
#define LTC2373_CH6
Definition: LTC2373.h:100
LTC2373_CH0
#define LTC2373_CH0
Definition: LTC2373.h:94

Lookup table to build the command for single-ended mode, input with respect to GND.

Builds the command for single-ended mode, input with respect to GND

Definition at line 124 of file DC2071AA.ino.

## ◆ display_code

int32_t display_code
| static

Definition at line 114 of file DC2071AA.ino.

## ◆ LTC2373_bits

uint8_t LTC2373_bits = 18
| static

Default set for 18 bits.

Definition at line 119 of file DC2071AA.ino.

## ◆ LTC2373_gain_compression

uint8_t LTC2373_gain_compression = LTC2373_NO_COMPRESSION
| static

Default set for no compression mode.

Definition at line 118 of file DC2071AA.ino.

## ◆ LTC2373_range_select

uint8_t LTC2373_range_select = LTC2373_RANGE_UNIPOLAR
| static

Default set for single-ended unipolar mode.

Definition at line 117 of file DC2071AA.ino.

## ◆ LTC2373_sequencer_bit

uint8_t LTC2373_sequencer_bit = LTC2373_SEQUENCER_BIT
| static

Definition at line 120 of file DC2071AA.ino.

## ◆ LTC2373_vref

float LTC2373_vref = 4.096
| static

Definition at line 116 of file DC2071AA.ino.

## ◆ user_command

uint8_t user_command
| static

Definition at line 112 of file DC2071AA.ino.