| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Macros | Variables
LTC24XX_general_test.ino File Reference

Copyright 2018(c) Analog Devices, Inc. More...

## Detailed Description

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 LTC24XX_general_test.ino.

Go to the source code of this file.

## Functions
static void | set_CS_decoder (uint8_t CS_addr)
static void | print_all (float *se_results, float *diff_results)
| Displays the the data in the arrays. More...
static void | test_LTC2400 (float vref, uint16_t eoc_timeout)
| Reads the LTC2400 and displays the results. More...
static void | test_LTC2412 (float vref, uint16_t eoc_timeout)
| Reads the LTC2412 and displays the results. More...
static void | test_LTC2418 (float vref, uint16_t eoc_timeout)
| Reads the LTC2418 and displays the results. More...
static void | test_LTC2420 (float vref, uint16_t eoc_timeout)
| Reads the LTC2420 and displays the results. More...
static void | test_LTC2436 (float vref, uint16_t eoc_timeout)
| Reads the LTC2436 and displays the results. More...
static void | test_LTC2439 (float vref, uint16_t eoc_timeout)
| Reads the LTC2439 and displays the results. More...
static void | test_LTC2449 (float vref, uint16_t eoc_timeout)
| Reads the LTC2449 and displays the results. More...
static void | test_LTC2494 (float vref, uint16_t eoc_timeout)
| Reads the LTC2494 and displays the results. More...
static void | test_LTC2495 (float vref, uint16_t eoc_timeout)
| Reads the LTC2495 and displays the results. More...
static void | test_LTC2496 (float vref, uint16_t eoc_timeout)
| Reads the LTC2496 and displays the results. More...
static void | test_LTC2497 (float vref, uint16_t eoc_timeout)
| Reads the LTC2497 and displays the results. More...
static void | test_LTC2498 (float vref, uint16_t eoc_timeout)
| Reads the LTC2498 and displays the results. More...
static void | test_LTC2499 (float vref, uint16_t eoc_timeout)
| Reads the LTC2499 and displays the results. More...
static void | test_all (float vref, uint16_t eoc_timeout)
| Sets the LTC6998, reads all the ADCs, and displays the results. More...
static void | setup ()
| Initialize Linduino. More...
static void | loop ()
| Repeats Linduino loop. More...

## Macros
#define | CS QUIKEVAL_CS
| The chip select. More...
#define | LTC2668_CS_ADDR 0
| Decoder address for the LTC2668 chip select. More...
#define | LTC2439_CS_ADDR 1
| Decoder address for the LTC2439 chip select. More...
#define | LTC2418_CS_ADDR 2
| Decoder address for the LTC2418 chip select. More...
#define | LTC2449_CS_ADDR 3
| Decoder address for the LTC2449 chip select. More...
#define | LTC2494_CS_ADDR 4
| Decoder address for the LTC2494 chip select. More...
#define | LTC2498_CS_ADDR 5
| Decoder address for the LTC2498 chip select. More...
#define | LTC2496_CS_ADDR 6
| Decoder address for the LTC2496 chip select. More...
#define | LTC2412_CS_ADDR 7
| Decoder address for the LTC2412 chip select. More...
#define | LTC2436_CS_ADDR 8
| Decoder address for the LTC2436 chip select. More...
#define | LTC2400_CS_ADDR 9
| Decoder address for the LTC2400 chip select. More...
#define | LTC2420_CS_ADDR 10
| Decoder address for the LTC2420 chip select. More...
#define | TEST_LTC2439
#define | TEST_LTC2418
#define | TEST_LTC2449
#define | TEST_LTC2494
#define | TEST_LTC2496
#define | TEST_LTC2498
#define | TEST_LTC2495
#define | TEST_LTC2497
#define | TEST_LTC2499
#define | TEST_LTC2436
#define | TEST_LTC2412
#define | TEST_LTC2400
#define | TEST_LTC2420
I2C Addresses
#define | LTC2495_ADDR 0b0010100
#define | LTC2497_ADDR 0b0100110
#define | LTC2499_ADDR 0b1010110

## Variables
const uint8_t | SINGLE_ENDED_CONFIG_ARRAY [16]
| Lookup table to build the command for single-ended mode. More...
const uint8_t | DIFF_CONFIG_ARRAY [16]
| Lookup table to build the command for differential mode. More...
const uint8_t | OSR_CONFIG_ARRAY [16]
| Lookup table to build the OSR command. More...
char | demo_name [] = "DCXXXX"
| Demo Board Name stored in QuikEval EEPROM. More...

## Function Documentation

## ◆ loop()

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

Repeats Linduino loop.

Definition at line 169 of file LTC24XX_general_test.ino.

## ◆ print_all()

static void print_all | ( | float * | se_results,
|  | float * | diff_results
| ) |  |
| static

Displays the the data in the arrays.

Definition at line 233 of file LTC24XX_general_test.ino.

## ◆ set_CS_decoder()

static void set_CS_decoder | ( | uint8_t | CS_addr | ) |
| static

Definition at line 262 of file LTC24XX_general_test.ino.

## ◆ setup()

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

Initialize Linduino.

Definition at line 148 of file LTC24XX_general_test.ino.

## ◆ test_all()

static void test_all | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Sets the LTC6998, reads all the ADCs, and displays the results.

Definition at line 751 of file LTC24XX_general_test.ino.

## ◆ test_LTC2400()

static void test_LTC2400 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2400 and displays the results.

Definition at line 299 of file LTC24XX_general_test.ino.

## ◆ test_LTC2412()

static void test_LTC2412 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2412 and displays the results.

Definition at line 326 of file LTC24XX_general_test.ino.

## ◆ test_LTC2418()

static void test_LTC2418 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2418 and displays the results.

Definition at line 359 of file LTC24XX_general_test.ino.

## ◆ test_LTC2420()

static void test_LTC2420 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2420 and displays the results.

Definition at line 397 of file LTC24XX_general_test.ino.

## ◆ test_LTC2436()

static void test_LTC2436 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2436 and displays the results.

Definition at line 424 of file LTC24XX_general_test.ino.

## ◆ test_LTC2439()

static void test_LTC2439 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2439 and displays the results.

Definition at line 457 of file LTC24XX_general_test.ino.

## ◆ test_LTC2449()

static void test_LTC2449 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2449 and displays the results.

Definition at line 495 of file LTC24XX_general_test.ino.

## ◆ test_LTC2494()

static void test_LTC2494 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2494 and displays the results.

Definition at line 533 of file LTC24XX_general_test.ino.

## ◆ test_LTC2495()

static void test_LTC2495 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2495 and displays the results.

Definition at line 571 of file LTC24XX_general_test.ino.

## ◆ test_LTC2496()

static void test_LTC2496 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2496 and displays the results.

Definition at line 606 of file LTC24XX_general_test.ino.

## ◆ test_LTC2497()

static void test_LTC2497 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2497 and displays the results.

Definition at line 644 of file LTC24XX_general_test.ino.

## ◆ test_LTC2498()

static void test_LTC2498 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2498 and displays the results.

Definition at line 680 of file LTC24XX_general_test.ino.

## ◆ test_LTC2499()

static void test_LTC2499 | ( | float | vref,
|  | uint16_t | eoc_timeout
| ) |  |
| static

Reads the LTC2499 and displays the results.

Definition at line 715 of file LTC24XX_general_test.ino.

## Macro Definition Documentation

## ◆ CS

#define CS QUIKEVAL_CS

The chip select.

Definition at line 61 of file LTC24XX_general_test.ino.

## ◆ LTC2400_CS_ADDR

#define LTC2400_CS_ADDR 9

Decoder address for the LTC2400 chip select.

Definition at line 72 of file LTC24XX_general_test.ino.

## ◆ LTC2412_CS_ADDR

#define LTC2412_CS_ADDR 7

Decoder address for the LTC2412 chip select.

Definition at line 70 of file LTC24XX_general_test.ino.

## ◆ LTC2418_CS_ADDR

#define LTC2418_CS_ADDR 2

Decoder address for the LTC2418 chip select.

Definition at line 65 of file LTC24XX_general_test.ino.

## ◆ LTC2420_CS_ADDR

#define LTC2420_CS_ADDR 10

Decoder address for the LTC2420 chip select.

Definition at line 73 of file LTC24XX_general_test.ino.

## ◆ LTC2436_CS_ADDR

#define LTC2436_CS_ADDR 8

Decoder address for the LTC2436 chip select.

Definition at line 71 of file LTC24XX_general_test.ino.

## ◆ LTC2439_CS_ADDR

#define LTC2439_CS_ADDR 1

Decoder address for the LTC2439 chip select.

Definition at line 64 of file LTC24XX_general_test.ino.

## ◆ LTC2449_CS_ADDR

#define LTC2449_CS_ADDR 3

Decoder address for the LTC2449 chip select.

Definition at line 66 of file LTC24XX_general_test.ino.

## ◆ LTC2494_CS_ADDR

#define LTC2494_CS_ADDR 4

Decoder address for the LTC2494 chip select.

Definition at line 67 of file LTC24XX_general_test.ino.

## ◆ LTC2495_ADDR

#define LTC2495_ADDR 0b0010100

Definition at line 78 of file LTC24XX_general_test.ino.

## ◆ LTC2496_CS_ADDR

#define LTC2496_CS_ADDR 6

Decoder address for the LTC2496 chip select.

Definition at line 69 of file LTC24XX_general_test.ino.

## ◆ LTC2497_ADDR

#define LTC2497_ADDR 0b0100110

Definition at line 79 of file LTC24XX_general_test.ino.

## ◆ LTC2498_CS_ADDR

#define LTC2498_CS_ADDR 5

Decoder address for the LTC2498 chip select.

Definition at line 68 of file LTC24XX_general_test.ino.

## ◆ LTC2499_ADDR

#define LTC2499_ADDR 0b1010110

Definition at line 80 of file LTC24XX_general_test.ino.

## ◆ LTC2668_CS_ADDR

#define LTC2668_CS_ADDR 0

Decoder address for the LTC2668 chip select.

Definition at line 63 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2400

#define TEST_LTC2400

Definition at line 97 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2412

#define TEST_LTC2412

Definition at line 95 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2418

#define TEST_LTC2418

Definition at line 84 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2420

#define TEST_LTC2420

Definition at line 98 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2436

#define TEST_LTC2436

Definition at line 94 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2439

#define TEST_LTC2439

Definition at line 83 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2449

#define TEST_LTC2449

Definition at line 85 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2494

#define TEST_LTC2494

Definition at line 86 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2495

#define TEST_LTC2495

Definition at line 90 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2496

#define TEST_LTC2496

Definition at line 87 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2497

#define TEST_LTC2497

Definition at line 91 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2498

#define TEST_LTC2498

Definition at line 88 of file LTC24XX_general_test.ino.

## ◆ TEST_LTC2499

#define TEST_LTC2499

Definition at line 92 of file LTC24XX_general_test.ino.

## Variable Documentation

## ◆ demo_name

char demo_name[] = "DCXXXX"

Demo Board Name stored in QuikEval EEPROM.

Definition at line 145 of file LTC24XX_general_test.ino.

## ◆ DIFF_CONFIG_ARRAY

const uint8_t DIFF_CONFIG_ARRAY[16]

Initial value:
= {LTC24XX_MULTI_CH_P0_N1, LTC24XX_MULTI_CH_P2_N3, LTC24XX_MULTI_CH_P4_N5, LTC24XX_MULTI_CH_P6_N7,
LTC24XX_MULTI_CH_P8_N9, LTC24XX_MULTI_CH_P10_N11, LTC24XX_MULTI_CH_P12_N13, LTC24XX_MULTI_CH_P14_N15,
LTC24XX_MULTI_CH_P1_N0, LTC24XX_MULTI_CH_P3_N2, LTC24XX_MULTI_CH_P5_N4, LTC24XX_MULTI_CH_P7_N6,
LTC24XX_MULTI_CH_P9_N8, LTC24XX_MULTI_CH_P11_N10, LTC24XX_MULTI_CH_P13_N12, LTC24XX_MULTI_CH_P15_N14
}
LTC24XX_MULTI_CH_P13_N12
#define LTC24XX_MULTI_CH_P13_N12
Definition: LTC24XX_general.h:225
LTC24XX_MULTI_CH_P1_N0
#define LTC24XX_MULTI_CH_P1_N0
Definition: LTC24XX_general.h:207
LTC24XX_MULTI_CH_P4_N5
#define LTC24XX_MULTI_CH_P4_N5
Definition: LTC24XX_general.h:212
LTC24XX_MULTI_CH_P9_N8
#define LTC24XX_MULTI_CH_P9_N8
Definition: LTC24XX_general.h:219
LTC24XX_MULTI_CH_P14_N15
#define LTC24XX_MULTI_CH_P14_N15
Definition: LTC24XX_general.h:227
LTC24XX_MULTI_CH_P3_N2
#define LTC24XX_MULTI_CH_P3_N2
Definition: LTC24XX_general.h:210
LTC24XX_MULTI_CH_P2_N3
#define LTC24XX_MULTI_CH_P2_N3
Definition: LTC24XX_general.h:209
LTC24XX_MULTI_CH_P10_N11
#define LTC24XX_MULTI_CH_P10_N11
Definition: LTC24XX_general.h:221
LTC24XX_MULTI_CH_P12_N13
#define LTC24XX_MULTI_CH_P12_N13
Definition: LTC24XX_general.h:224
LTC24XX_MULTI_CH_P5_N4
#define LTC24XX_MULTI_CH_P5_N4
Definition: LTC24XX_general.h:213
LTC24XX_MULTI_CH_P8_N9
#define LTC24XX_MULTI_CH_P8_N9
Definition: LTC24XX_general.h:218
LTC24XX_MULTI_CH_P7_N6
#define LTC24XX_MULTI_CH_P7_N6
Definition: LTC24XX_general.h:216
LTC24XX_MULTI_CH_P15_N14
#define LTC24XX_MULTI_CH_P15_N14
Definition: LTC24XX_general.h:228
LTC24XX_MULTI_CH_P11_N10
#define LTC24XX_MULTI_CH_P11_N10
Definition: LTC24XX_general.h:222
LTC24XX_MULTI_CH_P0_N1
#define LTC24XX_MULTI_CH_P0_N1
Definition: LTC24XX_general.h:206
LTC24XX_MULTI_CH_P6_N7
#define LTC24XX_MULTI_CH_P6_N7
Definition: LTC24XX_general.h:215

Lookup table to build the command for differential mode.

Build the command for differential mode

Definition at line 111 of file LTC24XX_general_test.ino.

## ◆ OSR_CONFIG_ARRAY

const uint8_t OSR_CONFIG_ARRAY[16]

Initial value:
= {LTC24XX_MULTI_CH_OSR_32768, LTC24XX_MULTI_CH_OSR_16384, LTC24XX_MULTI_CH_OSR_8192,
LTC24XX_MULTI_CH_OSR_4096, LTC24XX_MULTI_CH_OSR_2048, LTC24XX_MULTI_CH_OSR_1024, LTC24XX_MULTI_CH_OSR_512, LTC24XX_MULTI_CH_OSR_256,
LTC24XX_MULTI_CH_OSR_128, LTC24XX_MULTI_CH_OSR_64, LTC24XX_MULTI_CH_OSR_32768, LTC24XX_MULTI_CH_OSR_32768,
LTC24XX_MULTI_CH_OSR_32768, LTC24XX_MULTI_CH_OSR_32768, LTC24XX_MULTI_CH_OSR_32768, LTC24XX_MULTI_CH_OSR_32768
}
LTC24XX_MULTI_CH_OSR_32768
#define LTC24XX_MULTI_CH_OSR_32768
Definition: LTC24XX_general.h:251
LTC24XX_MULTI_CH_OSR_8192
#define LTC24XX_MULTI_CH_OSR_8192
Definition: LTC24XX_general.h:249
LTC24XX_MULTI_CH_OSR_256
#define LTC24XX_MULTI_CH_OSR_256
Definition: LTC24XX_general.h:244
LTC24XX_MULTI_CH_OSR_1024
#define LTC24XX_MULTI_CH_OSR_1024
Definition: LTC24XX_general.h:246
LTC24XX_MULTI_CH_OSR_64
#define LTC24XX_MULTI_CH_OSR_64
Definition: LTC24XX_general.h:242
LTC24XX_MULTI_CH_OSR_4096
#define LTC24XX_MULTI_CH_OSR_4096
Definition: LTC24XX_general.h:248
LTC24XX_MULTI_CH_OSR_16384
#define LTC24XX_MULTI_CH_OSR_16384
Definition: LTC24XX_general.h:250
LTC24XX_MULTI_CH_OSR_128
#define LTC24XX_MULTI_CH_OSR_128
Definition: LTC24XX_general.h:243
LTC24XX_MULTI_CH_OSR_512
#define LTC24XX_MULTI_CH_OSR_512
Definition: LTC24XX_general.h:245
LTC24XX_MULTI_CH_OSR_2048
#define LTC24XX_MULTI_CH_OSR_2048
Definition: LTC24XX_general.h:247

Lookup table to build the OSR command.

Build the command for different OSR modes

Definition at line 119 of file LTC24XX_general_test.ino.

## ◆ SINGLE_ENDED_CONFIG_ARRAY

const uint8_t SINGLE_ENDED_CONFIG_ARRAY[16]

Initial value:
= {LTC24XX_MULTI_CH_CH0, LTC24XX_MULTI_CH_CH1, LTC24XX_MULTI_CH_CH2, LTC24XX_MULTI_CH_CH3,
LTC24XX_MULTI_CH_CH4, LTC24XX_MULTI_CH_CH5, LTC24XX_MULTI_CH_CH6, LTC24XX_MULTI_CH_CH7,
LTC24XX_MULTI_CH_CH8, LTC24XX_MULTI_CH_CH9, LTC24XX_MULTI_CH_CH10, LTC24XX_MULTI_CH_CH11,
LTC24XX_MULTI_CH_CH12, LTC24XX_MULTI_CH_CH13, LTC24XX_MULTI_CH_CH14, LTC24XX_MULTI_CH_CH15
}
LTC24XX_MULTI_CH_CH3
#define LTC24XX_MULTI_CH_CH3
Definition: LTC24XX_general.h:185
LTC24XX_MULTI_CH_CH14
#define LTC24XX_MULTI_CH_CH14
Definition: LTC24XX_general.h:196
LTC24XX_MULTI_CH_CH8
#define LTC24XX_MULTI_CH_CH8
Definition: LTC24XX_general.h:190
LTC24XX_MULTI_CH_CH15
#define LTC24XX_MULTI_CH_CH15
Definition: LTC24XX_general.h:197
LTC24XX_MULTI_CH_CH13
#define LTC24XX_MULTI_CH_CH13
Definition: LTC24XX_general.h:195
LTC24XX_MULTI_CH_CH1
#define LTC24XX_MULTI_CH_CH1
Definition: LTC24XX_general.h:183
LTC24XX_MULTI_CH_CH6
#define LTC24XX_MULTI_CH_CH6
Definition: LTC24XX_general.h:188
LTC24XX_MULTI_CH_CH5
#define LTC24XX_MULTI_CH_CH5
Definition: LTC24XX_general.h:187
LTC24XX_MULTI_CH_CH0
#define LTC24XX_MULTI_CH_CH0
Definition: LTC24XX_general.h:182
LTC24XX_MULTI_CH_CH11
#define LTC24XX_MULTI_CH_CH11
Definition: LTC24XX_general.h:193
LTC24XX_MULTI_CH_CH2
#define LTC24XX_MULTI_CH_CH2
Definition: LTC24XX_general.h:184
LTC24XX_MULTI_CH_CH12
#define LTC24XX_MULTI_CH_CH12
Definition: LTC24XX_general.h:194
LTC24XX_MULTI_CH_CH7
#define LTC24XX_MULTI_CH_CH7
Definition: LTC24XX_general.h:189
LTC24XX_MULTI_CH_CH10
#define LTC24XX_MULTI_CH_CH10
Definition: LTC24XX_general.h:192
LTC24XX_MULTI_CH_CH9
#define LTC24XX_MULTI_CH_CH9
Definition: LTC24XX_general.h:191
LTC24XX_MULTI_CH_CH4
#define LTC24XX_MULTI_CH_CH4
Definition: LTC24XX_general.h:186

Lookup table to build the command for single-ended mode.

Builds the command for single-ended mode

Definition at line 104 of file LTC24XX_general_test.ino.