LTC2411 - 24-Bit No Latency Delta Sigma ADC with Differential Input and Reference in MSOP

Features

  • 24-Bit ADC in an MS10 Package
  • Low Supply Current (200µA in Conversion Mode and 4µA in Autosleep Mode )
  • Differential Input and Differential Reference with GND to VCC Common Mode Range
  • 2ppm INL, No Missing Codes
  • 4ppm Full-Scale Error and 1ppm Offset
  • 0.29ppm Noise
  • No Latency: Digital Filter Settles in a Single Cycle. Each Conversion Is Accurate, Even After an Input Step
  • Single Supply 2.7V to 5.5V Operation
  • Internal Oscillator—No External Components Required
  • 110dB Min, Pin Selectable 50Hz/60Hz Notch Filter (LTC2411)
  • Simultaneous 50Hz/60Hz Rejection (LTC2411-1)
Designed for Automotive and Transportation Applications
AEC-Q100 generic family data available for specific packages


Typical Application

LTC2411 Typical Application
LTC2411 Typical Application

Description

The LTC®2411/LTC2411-1 are 2.7V to 5.5V micropower 24-bit differential Delta Sigma analog-to-digital converters with an integrated oscillator, 2ppm INL and 0.29ppm RMS noise. They use delta-sigma technology and provide single cycle settling time for multiplexed applications. Through a single pin, the LTC2411 can be configured for better than 110dB differential mode rejection at 50Hz or 60Hz ™2%, and the LTC2411-1 can provide better than 87dB input differential mode rejection over the range of 49Hz to 61.2Hz, or they can be driven by an external oscillator for a user-defined rejection frequency. The LTC2411 and LTC2411-1 are identical when driven by an external oscillator. The internal oscillator requires no external frequency setting components.

The converters accept any external differential reference voltage from 0.1V to VCC for flexible ratiometric and remote sensing measurement configurations. The full-scale differential input range is from –0.5VREF to 0.5VREF. The reference common mode voltage, VREFCM, and the input common mode voltage, VINCM, may be independently set anywhere within the GND to VCC range of the LTC2411/LTC2411-1. The DC common mode input rejection is better than 140dB.

The LTC2411/LTC2411-1 communicate through a flexible 3-wire digital interface that is compatible with SPI and MICROWIRE™ protocols.

 

Packaging

CAD Symbols and Footprints: The downloadable Zip file below contains the schematic symbol and PCB footprints.

For complete and up to date package information and drawings, please refer to our packaging page

Part Number Package Code Temp Package
Drawing
RoHS
LTC2411-1CMS#PBF MS-10 MS C 05-08-1661 Yes
LTC2411-1CMS#TRPBF MS-10 MS C 05-08-1661 Yes
LTC2411-1IMS#PBF MS-10 MS I 05-08-1661 Yes
LTC2411-1IMS#TRPBF MS-10 MS I 05-08-1661 Yes
LTC2411CMS#PBF MS-10 MS C 05-08-1661 Yes
LTC2411CMS#TRPBF MS-10 MS C 05-08-1661 Yes
LTC2411IMS#PBF MS-10 MS I 05-08-1661 Yes
LTC2411IMS#TRPBF MS-10 MS I 05-08-1661 Yes


LTC2411 Package Drawing

Order Info

  • Part numbers ending in PBF are lead free. Solder plated terminal finish (SnPb) versions are non-standard and special terms and conditions and pricing applies if available. Please contact LTC marketing for information.
  • Part numbers containing TR or TRM are shipped in tape and reel or 500 unit mini tape and reel, respectively
  • Please refer to our general ordering information or the product datasheet for more details

Package Variations and Pricing

Part Number Package Temp Price
(1-99)
Price
(1k)*
RoHS
LTC2411-1CMS#PBF MS-10 C $7.10 $5.50 Yes
LTC2411-1CMS#TRPBF MS-10 C $5.56 Yes
LTC2411-1IMS#PBF MS-10 I $8.10 $6.25 Yes
LTC2411-1IMS#TRPBF MS-10 I $6.31 Yes
LTC2411CMS#PBF MS-10 C $7.10 $5.50 Yes
LTC2411CMS#TRPBF MS-10 C $5.56 Yes
LTC2411IMS#PBF MS-10 I $8.10 $6.25 Yes
LTC2411IMS#TRPBF MS-10 I $6.31 Yes
Buy NowRequest Samples
* The USA list pricing shown is for BUDGETARY USE ONLY, shown in United States dollars (FOB USA per unit for the stated volume), and is subject to change. International prices may differ due to local duties, taxes, fees and exchange rates. For volume-specific price or delivery quotes, please contact your local Linear Technology sales office or authorized distributor.

Demo Boards

Linear Technology offers many demo boards free of charge to qualified customers. Contact your local sales office or distributor to inquire about a demo board. Certain demo boards are also available for sale via credit card on this website. Demo boards are for evaluation purposes only. It remains the customer’s responsibility to verify proper and reliable operation in the actual end application.

Part Number Description Price Documentation
DC358A LTC2411CMS | Differential Input, 24-Bit ADC (with Diskette, Requires Win95/98) $50.00
Buy Now
Click here to view our complete list of demo boards

Designed for Automotive and Transportation Applications

Please contact your local sales representative for more information regarding reliability reports and AEC-Q100 data or to inquire about parts that are not included. For more information, view our Automotive and Transportation page

Part Number Package Temp Price
(1-99)
Price
(1k)*
RoHS
LTC2411-1IMS#PBF MS-10 I $8.10 $6.25 Yes
LTC2411-1IMS#TRPBF MS-10 I $6.31 Yes
LTC2411IMS#PBF MS-10 I $8.10 $6.25 Yes
LTC2411IMS#TRPBF MS-10 I $6.31 Yes
Buy NowRequest Samples
* The USA list pricing shown is for BUDGETARY USE ONLY, shown in United States dollars (FOB USA per unit for the stated volume), and is subject to change. International prices may differ due to local duties, taxes, fees and exchange rates. For volume-specific price or delivery quotes, please contact your local Linear Technology sales office or authorized distributor.

Applications

  • Direct Sensor Digitizer
  • Weight Scales
  • Direct Temperature Measurement
  • Gas Analyzers
  • Strain Gauge Transducers
  • Instrumentation
  • Data Acquisition
  • Industrial Process Control
  • 6-Digit DVMs

Product Notifications

Please login to your MyLinear account for notifications of datasheet updates, new document releases and LTspice model announcements for your favorite products. If you do not have a MyLinear account you may Sign Up Now.

Forgot your password? Click here.
Need help? Email mylinear@linear.com with questions and comments.

Design Tools

Linduino

Linduino is an Arduino compatible platform for developing and distributing firmware libraries and code for SPI and I²C-compatible integrated circuits. The Linduino One board interfaces to more than 300 QuikEval demonstration cards, supporting a variety of product types including analog-to-digital converters (ADCs)digital-to-analog converters (DACs)power monitors, and more. Firmware libraries for individual devices are written in C and designed to be portable to a wide variety of processors and microcontrollers. Each library has a demonstration program that can be uploaded to the Linduino One platform to allow the circuit and software to be quickly and easily verified.

Click here for more information on Linduino

Code

Linduino is Linear Technology's Arduino compatible system for developing and distributing firmware libraries and example code for Linear Technology’s integrated circuits. The code below can be downloaded or copied and pasted into your project. Please visit the Linduino Home Page for demo board, manual and setup information.

This part is Family Supported: There is example code available for a part in this family. The code may require some changes to work with this specific part, however it still provides many good examples of how certain interactions should take place. The code below may rely on other drivers available in the full library.

Download LTC2418 - DC571A Linduino .INO File

/*!
Linear Technology DC571A Demonstration Board.
LTC2418: 24-bit No Latency Delta Sigma 16-channel ADC

@verbatim

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. No external power supply is required. Ensure all jumpers on 
    the demo board are installed in their default positions from the 
    factory.

  How to test Single-Ended mode:
    The voltage source should be connected to the ADC such that the negative
    lead is connected to ground. The positive lead may be connected to any 
    channel input. Ensure voltage is within analog input voltage range -0.3V to 
    +2.5V.

  How to test Differential Mode:
    The voltage source should be connected with positive and negative leads to
    paired channels. The voltage source negative output must also be connected to 
    the COM pin in order to provide a ground-referenced voltage. Ensure voltage is
    within analog input voltage range -0.3V to +2.5V. Swapping input voltages 
    results in a reversed polarity reading.

  How to calibrate:
    Apply 100mV to CH0 with respect to COM pin. Next, Measure this voltage with a 
    precise voltmeter and enter this value. (This takes the reading.) Apply a higher 
    voltage than the first voltage or approximately 2.40 volts to CH0. Anything
    above 2.40 is not reccomened. It is very likely to reach the ADC's full-scale
    and poduce invalide lsb and offset. Measure this voltage with a precise
    voltmeter and enter this value. 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

@endverbatim

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

http://www.linear.com/product/LTC2418#demoboards

REVISION HISTORY
$Revision: 1886 $
$Date: 2013-08-15 16:29:46 -0700 (Thu, 15 Aug 2013) $

Copyright (c) 2013, Linear Technology Corp.(LTC)
All rights reserved.

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

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
2. 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.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, 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.

The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of Linear Technology Corp.

The Linear Technology Linduino is not affiliated with the official Arduino team.
However, the Linduino is only possible because of the Arduino team's commitment
to the open-source community.  Please, visit http://www.arduino.cc and
http://store.arduino.cc , and consider a purchase that will help fund their
ongoing work.
 */

/*! @file
    @ingroup LTC2418
*/

#include <Arduino.h>
#include <stdint.h>
#include "Linduino.h"
#include "LT_SPI.h"
#include "LT_I2C.h"
#include "UserInterface.h"
#include "QuikEval_EEPROM.h"
#include "LTC2418.h"
#include <SPI.h>
#include <Wire.h>

// Function Declaration
void print_title();                                 // Print the title block
void print_prompt();                                // Prompt the user for an input command
void print_user_command(uint8_t menu);              // Display selected differential channels
void store_calibration();                           // store the ADC calibration to the EEPROM
int8_t restore_calibration();                       // read the calibration from EEPROM return 1 if successful, 0 if not

int8_t menu_1_read_single_ended();
int8_t menu_2_read_differential();
int8_t menu_3_calibrate();

// Global variables
static uint8_t demo_board_connected;                //!< Set to 1 if the board is connected
static float LTC2418_lsb = 5.9604652E-7;            //!< Ideal LSB voltage for a perfect part
static int32_t LTC2418_offset_code = 0;             //!< Ideal offset for a perfect part


//Constants
//! Lookup table to build the command for single-ended mode channels
const uint8_t BUILD_COMMAND_SINGLE_ENDED[16] = {LTC2418_CH0, LTC2418_CH1, LTC2418_CH2, LTC2418_CH3,
    LTC2418_CH4, LTC2418_CH5, LTC2418_CH6, LTC2418_CH7,
    LTC2418_CH8, LTC2418_CH9, LTC2418_CH10, LTC2418_CH11,
    LTC2418_CH12, LTC2418_CH13, LTC2418_CH14, LTC2418_CH15
                                               };   //!< Builds the command for single-ended mode

//! Lookup table to build the command for differential mode channels
const uint8_t BUILD_COMMAND_DIFF[16] = {LTC2418_P0_N1, LTC2418_P2_N3, LTC2418_P4_N5, LTC2418_P6_N7,
                                        LTC2418_P8_N9, LTC2418_P10_N11, LTC2418_P12_N13, LTC2418_P14_N15,
                                        LTC2418_P1_N0, LTC2418_P3_N2, LTC2418_P5_N4, LTC2418_P7_N6,
                                        LTC2418_P9_N8, LTC2418_P11_N10, LTC2418_P13_N12, LTC2418_P15_N14
                                       };           //!< Build the command for differential

const uint16_t MISO_TIMEOUT = 1000;                 //!< The MISO timeout (ms)

//! Initialize Linduino
void setup()
{
  char demo_name[6]="DC571";        // Demo Board Name stored in QuikEval EEPROM
  quikeval_SPI_init();              // Configure the spi port for 4MHz SCK
  quikeval_SPI_connect();           // Connect SPI to main data port
  quikeval_I2C_init();              // Configure the EEPROM I2C port for 100kHz
  Serial.begin(115200);             // Initialize the serial port to the PC
  print_title();
  demo_board_connected = discover_demo_board(demo_name);
  if (!(demo_board_connected))      // Resolves EEPROM string variation
  {
    Serial.print(F("Checking for string variation\n"));
    demo_name[0]='D';
    demo_name[1]='C';
    demo_name[2]='5';
    demo_name[3]='7';
    demo_name[4]='1';
    demo_name[5]='-';
    demo_board_connected = discover_demo_board(demo_name);
  }
  if (demo_board_connected)
  {
    restore_calibration();
    print_prompt();
  }
}

//! Repeats Linduino loop
void loop()
{
  int16_t user_command;                 // The user input command
  uint8_t acknowledge = 0; 
  if (demo_board_connected)
  {
    if (Serial.available())             // Check for user input
    {
      user_command = read_int();        // Read the user command
      if (user_command != 'm')
        Serial.println(user_command);   // Prints the user command to com port
      switch (user_command)
      {
        case 1:
          acknowledge |= menu_1_read_single_ended();
          break;
        case 2:
          acknowledge |= menu_2_read_differential();
          break;
        case 3:
          acknowledge |= menu_3_calibrate();
          break;
        default:
          Serial.println("Incorrect Option");
          break;
      }
      if(acknowledge)
        Serial.println(F("***** SPI ERROR ******"));
      Serial.print(F("\n*************************\n"));
      print_prompt();
    }
  }
}

// Function Definitions

//! Read channels in single-ended mode
//! @return 0 when m is entered into menu, 1 if timeout for EOC
int8_t menu_1_read_single_ended()
{
  uint8_t  adc_command; // The LTC2418 command byte
  int16_t user_command; // The user input command
  uint32_t adc_code;    // The LTC2418 code
  float adc_voltage;    // The LTC2418 voltage

  while (1)
  {
    Serial.print(F("*************************\n\n"));      // Display single-ended menu
    Serial.print(F("0-CH0  8-CH8\n"));
    Serial.print(F("1-CH1  9-CH9\n"));
    Serial.print(F("2-CH2  10-CH10\n"));
    Serial.print(F("3-CH3  11-CH11\n"));
    Serial.print(F("4-CH4  12-CH12\n"));
    Serial.print(F("5-CH5  13-CH13\n"));
    Serial.print(F("6-CH6  14-CH14\n"));
    Serial.print(F("7-CH7  15-CH15\n"));
    Serial.print(F("16-ALL\n"));
    Serial.print(F("m-Main Menu\n"));
    Serial.print(F("\nEnter a Command: "));
    user_command = read_int();                              // Read the single command
    if (user_command == 'm')
      return(0);
    else
      Serial.println(user_command);
    Serial.println();

    if (user_command == 16)
    {
      Serial.print(F("ALL\n"));
      adc_command = BUILD_COMMAND_SINGLE_ENDED[0];          // Build ADC command for channel 0
      
      if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // Check for EOC
        return(1);
      LTC2418_read(LTC2418_CS, adc_command, &adc_code);     // Throws out last reading

      for (int8_t x = 0; x < 15; x++)
      {
        adc_command = BUILD_COMMAND_SINGLE_ENDED[(x + 1) % 16]; // Read all channels in single-ended mode
        if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))        // Check for EOC
          return(1);
        LTC2418_read(LTC2418_CS, adc_command, &adc_code);
        adc_voltage = LTC2418_code_to_voltage(adc_code, LTC2418_lsb , LTC2418_offset_code);
        Serial.print(F("  ****"));
        Serial.print(F("CH"));
        Serial.print(x);
        Serial.print(F(": "));
        Serial.print(adc_voltage, 4);
        Serial.print(F("V\n"));
      }
    }
    else if (user_command != 'm')                           // Read selected channel
    {
      adc_command = BUILD_COMMAND_SINGLE_ENDED[user_command];
      Serial.print(F("\nADC Command: B"));
      Serial.println(adc_command, BIN);
      if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // Check for EOC
        return(1);
      LTC2418_read(LTC2418_CS, adc_command, &adc_code);     // Throws out last reading
      if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // Check for EOC
        return(1);
      LTC2418_read(LTC2418_CS, adc_command, &adc_code);
      Serial.print(F("Received Code: 0x"));
      Serial.println(adc_code, HEX);
      adc_voltage = LTC2418_code_to_voltage(adc_code, LTC2418_lsb , LTC2418_offset_code);
      Serial.print(F("  ****"));
      Serial.print(F("CH"));
      Serial.print(user_command);
      Serial.print(F(": "));
      Serial.print(adc_voltage, 4);
      Serial.print(F("V\n"));
    }
  }
}

//! Read channels in differential mode
//! @return 0 when m is entered into menu, 1 if timeout for EOC
int8_t menu_2_read_differential()
{
  int8_t y;             // Offset into differential channel array to select polarity
  uint8_t  adc_command; // The LTC2418 command byte
  int16_t user_command; // The user input command
  uint32_t adc_code;    // The LTC2418 code
  float adc_voltage;    // The LTC2418 voltage

  while (1)
  {
    // Display differential menu
    Serial.print(F("\n*************************\n\n"));
    Serial.print(F("0-0P-1N     8-1P-0N\n"));
    Serial.print(F("1-2P-3N     9-3P-2N\n"));
    Serial.print(F("2-4P-5N     10-5P-4N\n"));
    Serial.print(F("3-6P-7N     11-7P-6N\n"));
    Serial.print(F("4-8P-9N     12-9P-8N\n"));
    Serial.print(F("5-10P-11N   13-11P-10N\n"));
    Serial.print(F("6-12P_13N   14-13P-12N\n"));
    Serial.print(F("7-14P-15N   15-15P-14N\n"));
    Serial.print(F("16-ALL Even_P-Odd_N\n"));
    Serial.print(F("17-ALL Odd_P-Even_N\n"));
    Serial.print(F("m-Main Menu\n"));
    Serial.print(F("\nEnter a Command: "));
    user_command = read_int();
    if (user_command == 'm')
      return(0);
    Serial.println(user_command);
    Serial.println();

    if ((user_command == 16) || (user_command == 17))
    {
      if (user_command == 16)
      {
        Serial.print(F("ALL Even_P-Odd_N\n"));              // Cycles through options 0-7
        y = 0;
      }
      if (user_command == 17)
      {
        Serial.print(F("ALL Odd_P-Even_N\n"));              // Cycles through options 8-15
        y = 8;
      }
      adc_command = BUILD_COMMAND_DIFF[y];                  // Set up first channel
      if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // check for EOC
        return(1);
      LTC2418_read(LTC2418_CS, adc_command, &adc_code);     // Throws out last reading
      for (int8_t x = 0; x <= 7; x++)                       // Read all channels. All even channels are positive and odd channels are negative
      {
        adc_command = BUILD_COMMAND_DIFF[((x+1) % 8) + y];
        if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))    // Check for EOC
          return(1);
        LTC2418_read(LTC2418_CS, adc_command, &adc_code);
        adc_voltage = LTC2418_code_to_voltage(adc_code, LTC2418_lsb , LTC2418_offset_code);
        Serial.println();
        Serial.print(F("  ****"));
        print_user_command(x + y);
        Serial.print(F(": "));
        Serial.print(adc_voltage, 4);
        Serial.print(F("V\n"));
      }
    }
    else                                                    // Read selected channels
    {
      // Reads and displays a selected channel
      adc_command = BUILD_COMMAND_DIFF[user_command];
      Serial.print(F("ADC Command: B"));
      Serial.println(adc_command, BIN);
      if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // Check for EOC
        return(1);
      LTC2418_read(LTC2418_CS, adc_command, &adc_code);     // Throws out last reading
      if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // Check for EOC
        return(1);
      LTC2418_read(LTC2418_CS, adc_command, &adc_code);
      Serial.print(F("Received Code: 0x"));
      Serial.println(adc_code, HEX);
      adc_voltage = LTC2418_code_to_voltage(adc_code, LTC2418_lsb , LTC2418_offset_code);
      Serial.println();
      Serial.print(F("  ****"));
      Serial.print(F("CH"));
      Serial.print(user_command);
      Serial.print(F(": "));
      Serial.print(adc_voltage, 4);
      Serial.print(F("V"));
      Serial.println();
    }
  }
}

//! Calibrate ADC given two known inputs
//! @return 0 if successful, 1 if timeout for EOC
int8_t menu_3_calibrate()
{
  // Calibration
  float fs_voltage;     // Measured full-scale voltage
  float zero_voltage;   // Measured zero voltage
  uint32_t zero_code;   // Cal zero code
  uint32_t fs_code;     // Cal full scale code
  uint8_t  adc_command; // The LTC2418 command byte
  uint32_t adc_code;    // The LTC2418 code

  Serial.println("Apply  100mV to CH0 with respect to COM");
  Serial.println("or apply a voltage greater than GND for the");
  Serial.println("lower point in two point calibration");
  Serial.print("Enter the measured input voltage:");
  zero_voltage = read_float();
  Serial.println(zero_voltage,4);
  adc_command = BUILD_COMMAND_SINGLE_ENDED[0];          // Build ADC command byte for voltage input
  if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // Check for EOC
    return(1);
  LTC2418_read(LTC2418_CS, adc_command, &adc_code);     // Throw away previous reading
  delay(100);
  if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // Check for EOC
    return(1);
  LTC2418_read(LTC2418_CS, adc_command, &zero_code);    // Measure zero

  Serial.println("Apply ~2.40V input voltage to CH0");
  Serial.println("or apply a voltage greater that first");
  Serial.println("voltage and less than 2.40V.");
  Serial.print("Enter the measured input voltage: ");

  fs_voltage = read_float();
  Serial.println(fs_voltage, 4);
  adc_command = BUILD_COMMAND_SINGLE_ENDED[0];          // Build ADC command byte for voltage input
  if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // Check for EOC
    return(1);
  LTC2418_read(LTC2418_CS, adc_command, &adc_code);     // Throw away previous reading
  delay(100);
  if(LTC2418_EOC_timeout(LTC2418_CS, MISO_TIMEOUT))      // Check for EOC
    return(1);
  LTC2418_read(LTC2418_CS, adc_command, &fs_code);      // Measure full scale
  LTC2418_cal_voltage(zero_code, fs_code, zero_voltage, fs_voltage, &LTC2418_lsb , &LTC2418_offset_code);

  Serial.print("ADC offset : ");
  Serial.println(LTC2418_offset_code);
  Serial.print("ADC lsb : ");
  Serial.print(LTC2418_lsb*1.0e9, 4);
  Serial.println("nV (32-bits)");
  store_calibration();
  return(0);
}

//! Prints the title block when program first starts.
void print_title()
{
  Serial.print(F("\n*****************************************************************\n"));
  Serial.print(F("* DC571A Demonstration Program                                  *\n"));
  Serial.print(F("*                                                               *\n"));
  Serial.print(F("* This program demonstrates how to send data and receive data   *\n"));
  Serial.print(F("* from the 24-bit ADC.                                          *\n"));
  Serial.print(F("*                                                               *\n"));
  Serial.print(F("* Set the baud rate to 115200 and select the newline terminator.*\n"));
  Serial.print(F("*                                                               *\n"));
  Serial.print(F("*****************************************************************\n"));
}

//! Prints main menu.
void print_prompt()
{
  Serial.print(F("\n1-Read Single-Ended\n"));
  Serial.print(F("2-Read Differential\n"));
  Serial.print(F("3-Calibration\n"));
  Serial.println();
  Serial.print(F("Enter a command:"));
}


//! Display selected differential channels. Displaying Single-Ended channels is
//! straightforward; not so with differential because the inputs can take either polarity.
void print_user_command(uint8_t menu)
{
  switch (menu)
  {
    case 0:
      Serial.print("0P-1N");
      break;
    case 1:
      Serial.print("2P-3N");
      break;
    case 2:
      Serial.print("4P-5N");
      break;
    case 3:
      Serial.print("6P-7N");
      break;
    case 4:
      Serial.print("8P-9N");
      break;
    case 5:
      Serial.print("10P-11N");
      break;
    case 6:
      Serial.print("12P-13N");
      break;
    case 7:
      Serial.print("14P-15N");
      break;
    case 8:
      Serial.print("1P-0N");
      break;
    case 9:
      Serial.print("3P-2N");
      break;
    case 10:
      Serial.print("5P-4N");
      break;
    case 11:
      Serial.print("7P-6N");
      break;
    case 12:
      Serial.print("9P-8N");
      break;
    case 13:
      Serial.print("11P-10N");
      break;
    case 14:
      Serial.print("13P-12N");
      break;
    case 15:
      Serial.print("15P-14N");
      break;
  }
  Serial.print(": ");
}

//! Store measured calibration parameters to nonvolatile EEPROM on demo board
void store_calibration()
// store the ADC calibration to the EEPROM
{
  eeprom_write_int16(EEPROM_I2C_ADDRESS, EEPROM_CAL_KEY, EEPROM_CAL_STATUS_ADDRESS);          // Cal key
  eeprom_write_int32(EEPROM_I2C_ADDRESS, LTC2418_offset_code, EEPROM_CAL_STATUS_ADDRESS+2);   // Offset
  eeprom_write_float(EEPROM_I2C_ADDRESS, LTC2418_lsb, EEPROM_CAL_STATUS_ADDRESS+6);           // LSB
  Serial.println("Calibration Stored to EEPROM");
}

//! Read stored calibration parameters from nonvolatile EEPROM on demo board
//! @return return 1 if successful, 0 if not
int8_t restore_calibration()
{
  int16_t cal_key;
  // read the cal key from the EEPROM
  eeprom_read_int16(EEPROM_I2C_ADDRESS, &cal_key, EEPROM_CAL_STATUS_ADDRESS);
  if (cal_key == EEPROM_CAL_KEY)
  {
    // calibration has been stored, read offset and lsb
    eeprom_read_int32(EEPROM_I2C_ADDRESS, &LTC2418_offset_code, EEPROM_CAL_STATUS_ADDRESS+2);  // Offset
    eeprom_read_float(EEPROM_I2C_ADDRESS, &LTC2418_lsb, EEPROM_CAL_STATUS_ADDRESS+6);          // LSB
    Serial.println("Calibration Restored");
    return(1);
  }
  else
  {
    Serial.println("Calibration not found");
    return(0);
  }
}

Download LTC2418 Linduino .CPP File

/*!
LTC2418: LTC2418 - 16-Channel 24-Bit No Latency Delta-Sigma ADC

@verbatim

The LTC2414/LTC2418 are 8-/16-channel (4-/8-differential) micropower 24-bit 
delta-sigma analog-to-digital converters. They operate from 2.7V to 5.5V and 
include an integrated oscillator, 2ppm INL and 0.2ppm RMS noise. They use 
delta-sigma technology and provide single cycle settling time for multiplexed 
applications. Through a single pin, the LTC2414/LTC2418 can be configured for 
better than 110dB differential mode rejection at 50Hz or 60Hz +/-2%, or they can 
be driven by an external oscillator for a user-defined rejection frequency. The 
internal oscillator requires no external frequency setting components. 

@endverbatim

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

http://www.linear.com/product/LTC2418#demoboards

REVISION HISTORY
$Revision: 1861 $
$Date: 2013-08-13 09:48:57 -0700 (Tue, 13 Aug 2013) $

Copyright (c) 2013, Linear Technology Corp.(LTC)
All rights reserved.

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

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
2. 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.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, 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.

The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of Linear Technology Corp.

The Linear Technology Linduino is not affiliated with the official Arduino team.
However, the Linduino is only possible because of the Arduino team's commitment
to the open-source community.  Please, visit http://www.arduino.cc and
http://store.arduino.cc , and consider a purchase that will help fund their
ongoing work.
*/

//! @defgroup LTC2418 LTC2418: 16-Channel 24-Bit No Latency Delta-Sigma ADC

/*! @file
    @ingroup LTC2418
    Library for LTC2418: 16-Channel 24-Bit No Latency Delta-Sigma ADC
*/

#include <stdint.h>
#include <Arduino.h>
#include "Linduino.h"
#include "LT_SPI.h"
#include "LTC2418.h"
#include <SPI.h>

int8_t LTC2418_EOC_timeout(uint8_t cs, uint16_t miso_timeout)
// Checks for EOC with a specified timeout
{
  uint16_t timer_count = 0;             // Timer count for MISO
  output_low(cs);                       //! 1) Pull CS low
  while (1)                             //! 2) Wait for SDO (MISO) to go low
  {
    if (input(MISO) == 0) break;        //! 3) If SDO is low, break loop
    if (timer_count++>miso_timeout)     // If timeout, return 1 (failure)
    {
      output_high(cs);                  // Pull CS high
      return(1);
    }
    else
      delay(1);
  }
  return(0);
}
  
void LTC2418_read(uint8_t cs, uint8_t adc_command, uint32_t *adc_code)
// Reads the LTC2418
{
  LT_union_int32_4bytes data, command;
  command.LT_byte[3] = adc_command;
  command.LT_byte[2] = 0;
  command.LT_byte[1] = 0;
  command.LT_byte[0] = 0;
  
  output_low(cs);                                                       //! 1) Pull CS low
  spi_transfer_block(cs, command.LT_byte, data.LT_byte, (uint8_t)4);    //! 2) Transfer 4 bytes
  output_high(cs);                                                      //! 3) Pull CS high
  *adc_code = data.LT_int32;
}

float LTC2418_code_to_voltage(int32_t adc_code, float LTC2418_lsb , int32_t LTC2418_offset_code)
// Calculates the LTC2418 input bipolar voltage
{
  float adc_voltage;
  adc_code = adc_code>>6;                                           //! 1) Bit-shift ADC code to the right 6 bits
  adc_code -= 8388608;                                              //! 2) Convert ADC code from offset binary to binary
  adc_voltage=((float)adc_code+LTC2418_offset_code)*(LTC2418_lsb);  //! 3) Calculate voltage from ADC code, lsb, offset.
  return(adc_voltage);
}

void LTC2418_cal_voltage(int32_t zero_code, int32_t fs_code, float zero_voltage, float fs_voltage, float *LTC2418_lsb , int32_t *LTC2418_offset_code)
// Calibrate the lsb
{
  zero_code = zero_code >> 6;   //! 1) Bit-shift zero code to the right 6 bits
  zero_code -= 8388608;         //! 2) Convert zero code from offset binary to binary
  fs_code = fs_code >> 6;       //! 3) Bit-shift full scale code to the right 6 bits
  fs_code -= 8388608;           //! 4) Convert full scale code from offset binary to binary
  
  float temp_offset;
  *LTC2418_lsb = (fs_voltage-zero_voltage)/((float)(fs_code - zero_code));                              //! 5) Calculate the LSB
  
  temp_offset = (zero_voltage/ *LTC2418_lsb) - zero_code;                                               //! 6) Calculate Unipolar offset
  temp_offset = (temp_offset > (floor(temp_offset) + 0.5)) ? ceil(temp_offset) : floor(temp_offset);    //! 7) Round
  *LTC2418_offset_code = (int32_t)temp_offset;                                                          //! 8) Cast as int32_t
}

Download LTC2418 Linduino Header File

/*!
LTC2418: 16-Channel 24-Bit No Latency Delta-Sigma ADC

@verbatim

The LTC2414/LTC2418 are 8-/16-channel (4-/8-differential) micropower 24-bit 
delta-sigma analog-to-digital converters. They operate from 2.7V to 5.5V and 
include an integrated oscillator, 2ppm INL and 0.2ppm RMS noise. They use 
delta-sigma technology and provide single cycle settling time for multiplexed 
applications. Through a single pin, the LTC2414/LTC2418 can be configured for 
better than 110dB differential mode rejection at 50Hz or 60Hz +/-2%, or they can 
be driven by an external oscillator for a user-defined rejection frequency. The 
internal oscillator requires no external frequency setting components. 

SPI DATA FORMAT (MSB First):

            Byte #1                            Byte #2                           Byte #3                    Byte #4

Data Out :  !EOC DMY SIG D22 D21 D20 D19 D18   D17 D16 D15 D14 D13 D12 D11 D10   D9 D8 D7 D6 D5 D4 D3  D2   D1 D0 SGL OS S2 S1 S0 PAR
Data In  :  1    0   EN  SGL OS  S2  S1  S0    X   X   X   X   X   X   X   X     X  X  X  X  X  X   X  X    X  X  X   X  X  X  X  X

!EOC : End of Conversion Bit (Active Low)
DMY  : Dummy Bit (Always 0)
SIG  : Sign Bit (1-data positive, 0-data negative)
Dx   : Data Bits
EN   : Enable Bit (0-keep previous mode, 1-change mode)
SGL  : Enable Single-Ended Bit (0-differential, 1-single-ended)
OS   : ODD/Sign Bit
Sx   : Address Select Bit
PAR  : Parity Bit

Command Byte
1    0    EN   SGL  OS   S2   S1   S0   Comments
1    0    0    X    X    X    X    X    Keep Previous Mode
1    0    1    0    X    X    X    X    Differential Mode
1    0    1    1    X    X    X    X    Single-Ended Mode


Example Code:

Read Channel 0 in Single-Ended mode
    
    uint16_t miso_timeout = 1000;
    adc_command = LTC2418_CH0;                          // Build ADC command for channel 0
    
    if(LTC2418_EOC_timeout(LTC2418_CS, miso_timeout))    // Check for EOC
        return(1);
    LTC2418_read(LTC2418_CS, adc_command, &adc_code);   // Throws out last reading
    
    if(LTC2418_EOC_timeout(LTC2418_CS, miso_timeout))    // Check for EOC
        return(1);
    LTC2418_read(LTC2418_CS, adc_command, &adc_code);   // Obtains the current reading and stores to adc_code variable

    // Convert adc_code to voltage
    adc_voltage = LTC2418_code_to_voltage(adc_code, LTC2418_lsb , LTC2418_offset_code);

@endverbatim

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

http://www.linear.com/product/LTC2418#demoboards

REVISION HISTORY
$Revision: 1853 $
$Date: 2013-08-08 17:01:29 -0700 (Thu, 08 Aug 2013) $

Copyright (c) 2013, Linear Technology Corp.(LTC)
All rights reserved.

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

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
2. 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.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, 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.

The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of Linear Technology Corp.

The Linear Technology Linduino is not affiliated with the official Arduino team.
However, the Linduino is only possible because of the Arduino team's commitment
to the open-source community.  Please, visit http://www.arduino.cc and
http://store.arduino.cc , and consider a purchase that will help fund their
ongoing work.
*/

/*! @file
    @ingroup LTC2418
    Header for LTC2418: 16-Channel 24-Bit No Latency Delta-Sigma ADC
*/

#ifndef LTC2418_H
#define LTC2418_H

#include <SPI.h>

//! Define the SPI CS pin
#ifndef LTC2418_CS
#define LTC2418_CS QUIKEVAL_CS
#endif

//! @name LTC2418 Single-Ended configuration bytes
//! @{
//! Address bytes with enable sequence prepended
#define LTC2418_CH0            0xB0
#define LTC2418_CH1            0xB8
#define LTC2418_CH2            0xB1
#define LTC2418_CH3            0xB9
#define LTC2418_CH4            0xB2
#define LTC2418_CH5            0xBA
#define LTC2418_CH6            0xB3
#define LTC2418_CH7            0xBB
#define LTC2418_CH8            0xB4
#define LTC2418_CH9            0xBC
#define LTC2418_CH10           0xB5
#define LTC2418_CH11           0xBD
#define LTC2418_CH12           0xB6
#define LTC2418_CH13           0xBE
#define LTC2418_CH14           0xB7
#define LTC2418_CH15           0xBF
//! @}

//! @name LTC2418 Differential configuration bytes
//! @{
//! Address bytes with enable sequence prepended
#define LTC2418_P0_N1          0xA0
#define LTC2418_P1_N0          0xA8

#define LTC2418_P2_N3          0xA1
#define LTC2418_P3_N2          0xA9

#define LTC2418_P4_N5          0xA2
#define LTC2418_P5_N4          0xAA

#define LTC2418_P6_N7          0xA3
#define LTC2418_P7_N6          0xAB

#define LTC2418_P8_N9          0xA4
#define LTC2418_P9_N8          0xAC

#define LTC2418_P10_N11        0xA5
#define LTC2418_P11_N10        0xAD

#define LTC2418_P12_N13        0xA6
#define LTC2418_P13_N12        0xAE

#define LTC2418_P14_N15        0xA7
#define LTC2418_P15_N14        0xAF
//! @}

//! Checks for EOC with a specified timeout
//! @return 0=successful, 1=unsuccessful (exceeded timeout)
int8_t LTC2418_EOC_timeout(uint8_t cs,           //!< Chip Select pin 
                           uint16_t miso_timeout //!< Timeout (ms)
                          );

//! Reads the LTC2418 result and programs the configuration for the next conversion.
//! @return void
void LTC2418_read(uint8_t cs,           //!< Chip Select pin
                  uint8_t adc_command,  //!< Command byte
                  uint32_t *adc_code    //!< Returns raw 32-bit code read from ADC
                 );

//! Calculates the LTC2418 input bipolar voltage
//! @return Calculated voltage
float LTC2418_code_to_voltage(int32_t adc_code,           //!< Raw ADC code
                              float LTC2418_lsb,          //!< LSB value (volts)
                              int32_t LTC2418_offset_code //!< Offset (Code)
                             );

//! Calibrate the lsb
//! @return Void
void LTC2418_cal_voltage(int32_t zero_code,               //!< Offset (Code)
                         int32_t fs_code,                 //!< Code measured with full-scale input applied
                         float zero_voltage,              //!< Measured zero voltage
                         float fs_voltage,                //!< Measured full-scale voltage
                         float *LTC2418_lsb,              //!< Returns LSB value (volts)
                         int32_t *LTC2418_offset_code     //!< Returns Offset (Code)
                        );

#endif  // LTC2418_H

Technical Support