| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Enumerations | Variables
DC1410AA.ino File Reference
Analog-to-Digital Converters (ADC) » LTC2498: 24-Bit, 16-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation

Linear Technology DC1410A-A Demonstration Board. More...

## Detailed Description

Linear Technology DC1410A-A Demonstration Board.

LTC2498: 24-Bit, 16-Channel Delta Sigma ADC with SPI interface

    NOTES
      Setup:
       Set the terminal baud rate to 115200 and select the newline terminator. Equipment
       required is a precision voltage source and a precision voltmeter. Additionally,
       an external power supply is required to provide a negative voltage for Amp V-.
       Set it to anywhere from -1V to -5V. Set Amp V+ to Vcc. Ensure the COM and REF-
       pins are connected to ground. The REF+ pin should be connected to +5V.

      How Measure a Load Cell:
       The LTC2498 allowas a wide common mode range of 0V to Vcc. The LT1678 OPAMP common
       mode range is V- + 1.5 to V+ - 0.8V. Ensure the load cell sensor meets the requirments
       of the ADC and amplifier. After, set the desired gain and read in differential mode.

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

http://www.linear.com/product/LTC2498

http://www.linear.com/product/LTC2498#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 DC1410AA.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)
static uint8_t | menu_1_read_differential ()
| Read channels in differential mode. More...
static void | set_gain (uint8_t a_pin, uint8_t b_pin, uint8_t gain)
| Set the Mux select pins to the desired gain. More...
static void | init_gain_pins (uint8_t a_pin, uint8_t b_pin)
| initialize the MUX select pins More...
static void | menu_2_set_1X2X ()
| Set 1X or 2X mode. More...
static void | menu_3_set_channel_gain ()
| Allows the user to sets the desired gain. More...
static void | print_gain (uint8_t gain)
| Utility function to display the gain. More...
static void | setup ()
| Initialize Linduino. More...
static void | loop ()
| Repeats Linduino loop. More...

## Enumerations
enum | Av { unity, g8, g16, g32, unity, g8, g16, g32 }

## Variables
static uint8_t | demo_board_connected
| Set to 1 if the board is connected. More...
static uint8_t | two_x_mode = LTC2498_SPEED_1X
| The LTC2498 2X Mode settings. More...
static uint8_t | rejection_mode = LTC2498_R50_R60
| The LTC2498 rejection mode settings. More...
static float | LTC2498_vref = 5.0
| The LTC2498 ideal reference voltage. More...
static uint16_t | eoc_timeout = 250
| Timeout in ms. More...
static uint8_t | filt_flag = 1
| Keeps track when the filter needs to be rest. More...
static uint8_t | channel_gain [6] = {g32, g32, g32, g32, g32, g32}
| default is gain 32 More...
const uint8_t | read_command_seq []
| Lookup table for reads. More...
static uint8_t | read_gain_seq []
| lookup table for gain setting reads More...
const uint8_t | A_PIN = 4
| Gain MUX pins. More...
const uint8_t | B_PIN = 7
const float | smoothing_const = .7
| Exponential filter smothing constant. More...

## Function Documentation

## ◆ init_gain_pins()

static void init_gain_pins | ( | uint8_t | a_pin,
|  | uint8_t | b_pin
| ) |  |
| static

initialize the MUX select pins

Definition at line 352 of file DC1410AA.ino.

## ◆ loop()

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

Repeats Linduino loop.

Definition at line 153 of file DC1410AA.ino.

## ◆ menu_1_read_differential()

static uint8_t menu_1_read_differential | ( |  | ) |
| static

Read channels in differential mode.

Returns
  Returns 0=successful, 1=unsuccessful (exceeded timeout)

Definition at line 212 of file DC1410AA.ino.

## ◆ menu_2_set_1X2X()

static void menu_2_set_1X2X | ( |  | ) |
| static

Set 1X or 2X mode.

Definition at line 465 of file DC1410AA.ino.

## ◆ menu_3_set_channel_gain()

static void menu_3_set_channel_gain | ( |  | ) |
| static

Allows the user to sets the desired gain.

Definition at line 361 of file DC1410AA.ino.

## ◆ print_gain()

static void print_gain | ( | uint8_t | gain | ) |
| static

Utility function to display the gain.

Definition at line 445 of file DC1410AA.ino.

## ◆ print_prompt()

static void print_prompt | ( |  | ) |
| static

Prints main menu.

Definition at line 202 of file DC1410AA.ino.

## ◆ print_title()

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

Prints the title block when program first starts.

Definition at line 187 of file DC1410AA.ino.

## ◆ print_user_command()

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

## ◆ set_gain()

static void set_gain | ( | uint8_t | a_pin,
|  | uint8_t | b_pin,
|  | uint8_t | gain
| ) |  |
| static

Set the Mux select pins to the desired gain.

Definition at line 345 of file DC1410AA.ino.

## ◆ setup()

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

Initialize Linduino.

Definition at line 128 of file DC1410AA.ino.

## Enumeration Type Documentation

## ◆ Av

enum Av

Enumerator
unity |
g8 |
g16 |
g32 |
unity |
g8 |
g16 |
g32 |

Definition at line 97 of file DC1410AA.ino.

## Variable Documentation

## ◆ A_PIN

const uint8_t A_PIN = 4

Gain MUX pins.

Definition at line 121 of file DC1410AA.ino.

## ◆ B_PIN

const uint8_t B_PIN = 7

Definition at line 122 of file DC1410AA.ino.

## ◆ channel_gain

uint8_t channel_gain[6] = {g32, g32, g32, g32, g32, g32}
| static

default is gain 32

Definition at line 106 of file DC1410AA.ino.

## ◆ demo_board_connected

uint8_t demo_board_connected
| static

Set to 1 if the board is connected.

Definition at line 100 of file DC1410AA.ino.

## ◆ eoc_timeout

uint16_t eoc_timeout = 250
| static

Timeout in ms.

Definition at line 104 of file DC1410AA.ino.

## ◆ filt_flag

uint8_t filt_flag = 1
| static

Keeps track when the filter needs to be rest.

Definition at line 105 of file DC1410AA.ino.

## ◆ LTC2498_vref

float LTC2498_vref = 5.0
| static

The LTC2498 ideal reference voltage.

Definition at line 103 of file DC1410AA.ino.

## ◆ read_command_seq

const uint8_t read_command_seq[]

Initial value:
= { LTC2498_P12_N13,
LTC2498_P14_N15, LTC2498_P14_N15, LTC2498_P14_N15, LTC2498_P14_N15,
LTC2498_P0_N1, LTC2498_P2_N3, LTC2498_P4_N5, LTC2498_P6_N7,
LTC2498_P8_N9, LTC2498_P10_N11, LTC2498_P10_N11
}
LTC2498_P12_N13
#define LTC2498_P12_N13
Definition: LTC2498.h:176
LTC2498_P2_N3
#define LTC2498_P2_N3
Definition: LTC2498.h:161
LTC2498_P4_N5
#define LTC2498_P4_N5
Definition: LTC2498.h:164
LTC2498_P14_N15
#define LTC2498_P14_N15
Definition: LTC2498.h:179
LTC2498_P10_N11
#define LTC2498_P10_N11
Definition: LTC2498.h:173
LTC2498_P6_N7
#define LTC2498_P6_N7
Definition: LTC2498.h:167
LTC2498_P0_N1
#define LTC2498_P0_N1
Definition: LTC2498.h:158
LTC2498_P8_N9
#define LTC2498_P8_N9
Definition: LTC2498.h:170

Lookup table for reads.

Channel read sequence for the demo board

Definition at line 110 of file DC1410AA.ino.

## ◆ read_gain_seq

uint8_t read_gain_seq[]
| static

Initial value:
= {unity, unity, unity , g8, g16, g32, channel_gain[0], channel_gain[1], channel_gain[2], channel_gain[3],
channel_gain[4], channel_gain[5]
}
g16
Definition: DC1410AA.ino:97
g32
Definition: DC1410AA.ino:97
channel_gain
static uint8_t channel_gain[6]
default is gain 32
Definition: DC1410AA.ino:106
unity
Definition: DC1410AA.ino:97
g8
Definition: DC1410AA.ino:97

lookup table for gain setting reads

The gain sequence for the auto calibration

Definition at line 116 of file DC1410AA.ino.

## ◆ rejection_mode

uint8_t rejection_mode = LTC2498_R50_R60
| static

The LTC2498 rejection mode settings.

Definition at line 102 of file DC1410AA.ino.

## ◆ smoothing_const

const float smoothing_const = .7

Exponential filter smothing constant.

Definition at line 125 of file DC1410AA.ino.

## ◆ two_x_mode

uint8_t two_x_mode = LTC2498_SPEED_1X
| static

The LTC2498 2X Mode settings.

Definition at line 101 of file DC1410AA.ino.