LTC2492 - 24-Bit 2-/4-Channel Delta Sigma ADC with Easy Drive Input Current Cancellation

Features

  • Up to 2 Differential or 4 Single-Ended Inputs
  • Easy Drive™ Technology Enables Rail-to-Rail Inputs with Zero Differential Input Current
  • Directly Digitizes High Impedance Sensors with Full Accuracy
  • 600nVRMS Noise
  • Integrated High Accuracy Temperature Sensor
  • GND to VCC Input/Reference Common Mode Range
  • Programmable 50Hz, 60Hz, or Simultaneous 50Hz/60Hz Rejection Mode
  • 2ppm INL, No Missing Codes
  • 1ppm Offset and 15ppm Full-Scale Error
  • 2x Speed Mode/Reduced Power Mode (15Hz Using Internal Oscillator and 80μA at 7.5Hz Output)
  • No Latency: Digital Filter Settles in a Single Cycle, Even After a New Channel is Selected
  • Single Supply 2.7V to 5.5V Operation (0.8mW)
  • Internal Oscillator
  • Tiny DFN 4mm × 3mm Package
Designed for Automotive and Transportation Applications
AEC-Q100 generic family data available for specific packages


Typical Application

LTC2492 Typical Application
LTC2492 Typical Application

Description

The LTC2492 is a 4-channel (2-channel differential), 24-bit, No Latency ΔΣ ADC with Easy Drive technology. The patented sampling scheme eliminates dynamic input current errors and the shortcomings of on-chip buffering through automatic cancellation of differential input current. This allows large external source impedances and rail-to-rail input signals to be directly digitized while maintaining exceptional DC accuracy.

The LTC2492 includes a high accuracy temperature sensor and an integrated oscillator. This device can be configured to measure an external signal (from combinations of 4 analog input channels operating in single-ended or differential modes) or its internal temperature sensor. It can be programmed to reject line frequencies of 50Hz, 60Hz, or simultaneous 50Hz/60Hz and configured to double its output rate. The integrated temperature sensor offers 1/30th°C resolution and 2°C absolute accuracy.

The LTC2492 allows a wide common mode input range (0V to VCC), independent of the reference voltage. Any combination of single-ended or differential inputs can be selected and the first conversion after a new channel selection is valid.

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
LTC2492CDE#PBF 4x3 DFN-14 DE C 05-08-1708 Yes
LTC2492CDE#TRPBF 4x3 DFN-14 DE C 05-08-1708 Yes
LTC2492IDE#PBF 4x3 DFN-14 DE I 05-08-1708 Yes
LTC2492IDE#TRPBF 4x3 DFN-14 DE I 05-08-1708 Yes


LTC2492 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
LTC2492CDE#PBF 4x3 DFN-14 C $4.32 $2.95 Yes
LTC2492CDE#TRPBF 4x3 DFN-14 C $4.38 $3.01 Yes
LTC2492IDE#PBF 4x3 DFN-14 I $5.18 $3.54 Yes
LTC2492IDE#TRPBF 4x3 DFN-14 I $5.24 $3.60 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
DC1009A-A LTC2492 24-bit, 2-ch ADC, req. DC590 $50.00
Buy Now

Companion Boards

Part Number Description Price Documentation
DC590B Isolated USB Serial Controller for Linear Technology QuikEval-Compatible Demo Boards $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
LTC2492IDE#PBF 4x3 DFN-14 I $5.18 $3.54 Yes
LTC2492IDE#TRPBF 4x3 DFN-14 I $5.24 $3.60 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
  • Direct Temperature Measurement
  • Instrumentation
  • Industrial Process Control

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 Code Supported: There is example code available for this part. The code below may rely on other drivers available in the full library.

Download LTC2492 - DC1009AA.ino File

/*!
Linear Technology DC1009A-A Demonstration Board.
LTC2492: 24-Bit, 4-Channel Delta Sigma ADC with SPI interface

@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. Ensure the COM
   and REF- pins are connected to ground. The REF+ pin should be connected to +5V.

  How to test Single-Ended mode:
   The voltage source should be connected to the ADC such that the negative lead is
   connected to the COM(common) pin. The positive lead may be connected to any
   channel input. Ensure voltage is within analog input voltage range -0.3 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.

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

@endverbatim

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

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

REVISION HISTORY
$Revision: 6869 $
$Date: 2017-04-04 10:27:18 -0700 (Tue, 04 Apr 2017) $

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 LTC2492
*/

#include <Arduino.h>
#include <stdint.h>
#include "Linduino.h"
#include "LT_SPI.h"
#include <SPI.h>
#include "UserInterface.h"
#include "LT_I2C.h"
#include "QuikEval_EEPROM.h"
#include "LTC24XX_general.h"
#include "LTC2492.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

uint8_t menu_1_read_single_ended();
uint8_t menu_2_read_differential();
void menu_3_set_1X2X();

// Global variables
static uint8_t demo_board_connected;                //!< Set to 1 if the board is connected
static uint8_t two_x_mode = LTC2492_SPEED_1X;       //!< The LTC2492 2X Mode settings
static uint8_t rejection_mode = LTC2492_R50_R60;    //!< The LTC2492 rejection mode settings
static float LTC2492_vref = 5.0;                    //!< The LTC2492 ideal reference voltage
static uint16_t eoc_timeout = 350;                  //!< timeout in ms
// Constants

//! Lookup table to build the command for single-ended mode
const uint8_t BUILD_COMMAND_SINGLE_ENDED[4] = {LTC2492_CH0, LTC2492_CH1, LTC2492_CH2, LTC2492_CH3
                                              };    //!< Builds the command for single-ended mode

//! Lookup table to build the command for differential mode
const uint8_t BUILD_COMMAND_DIFF[4] = {LTC2492_P0_N1, LTC2492_P2_N3, LTC2492_P1_N0, LTC2492_P3_N2
                                      };      //!< Build the command for differential mode

//! Lookup table to build 1X / 2X bits
const uint8_t BUILD_1X_2X_COMMAND[2] = {LTC2492_SPEED_1X, LTC2492_SPEED_2X};   //!< Build the command for 1x or 2x mode

//! Lookup table to build 1X / 2X bits
const uint8_t BUILD_FREQ_REJ_COMMAND[3] = {LTC2492_R50, LTC2492_R60, LTC2492_R50_R60};   //!< Build the command for 1x or 2x mode

//! Initialize Linduino
void setup()
{
  char demo_name[]="DC1009";    // 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)
  {
    print_prompt();
  }
  else
  {
    Serial.println(F("EEPROM not detected, will attempt to proceed"));
    demo_board_connected = 1;
    print_prompt();
  }
  quikeval_SPI_connect();       //Initialize for SPI
}

//! Repeats Linduino loop
void loop()
{
  int16_t user_command;                 // The user input command
  uint8_t ack_EOC = 0;                  // Keeps track of the EOC timeout
  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
      Serial.flush();
      switch (user_command)
      {
        case 1:
          ack_EOC |= menu_1_read_single_ended();
          break;
        case 2:
          ack_EOC |= menu_2_read_differential();
          break;
        case 3:
          menu_3_set_1X2X();
          break;
        case 4:
          menu_4_select_rejection_freq();
          break;
        default:
          Serial.println(F("Incorrect Option"));
      }
      if (ack_EOC)
        Serial.println(F("\n******SPI ERROR******\n"));
      Serial.print(F("\n*************************\n"));
      print_prompt();
    }
  }
}

// Function Definitions

//! Prints the title block when program first starts.
void print_title()
{
  Serial.print(F("\n*****************************************************************\n"));
  Serial.print(F("* DC1009A-A 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("*                                                               *\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-2X Mode Settings\n"));
  Serial.print(F("4-Frequency Rejection Settings\n"));
  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(F("0P-1N"));
      break;
    case 1:
      Serial.print(F("2P-3N"));
      break;
    case 2:
      Serial.print(F("1P-0N"));
      break;
    case 3:
      Serial.print(F("3P-2N"));
      break;
  }
  Serial.print(F(": "));
}

//! Read channels in single-ended mode
//! @return Returns 0=successful, 1=unsuccessful (exceeded timeout)
uint8_t menu_1_read_single_ended()
{
  uint8_t adc_command_high; // The LTC2492 command high byte
  uint8_t adc_command_low;  // The LTC2492 command low byte
  int16_t user_command;     // The user input command
  int32_t adc_code = 0;     // The LTC2492 code
  float adc_voltage = 0;    // The LTC2492 voltage

  while (1)
  {
    Serial.print(F("*************************\n\n"));
    Serial.print(F("0-CH0\n"));
    Serial.print(F("1-CH1\n"));
    Serial.print(F("2-CH2\n"));
    Serial.print(F("3-CH3\n"));
    Serial.print(F("4-ALL\n"));
    Serial.print(F("m-Main Menu\n"));
    Serial.print(F("Enter a Command: "));

    user_command = read_int();                              // Read the single command
    if (user_command == 'm')
      break;
    Serial.println(user_command);
    if (user_command == 4)
    {
      Serial.print(F("ALL\n"));
      adc_command_high = BUILD_COMMAND_SINGLE_ENDED[0];               // Build ADC command for channel 0
      adc_command_low = rejection_mode | two_x_mode;
      if (LTC2492_EOC_timeout(LTC2492_CS, eoc_timeout))             // Checks for EOC with a timeout
        return 1;
      LTC2492_read(LTC2492_CS, adc_command_high, adc_command_low, &adc_code);   // Throws out last reading

      for (int8_t x = 0; x <= 3; x++)                                 // Read all channels in single-ended mode
      {
        if (two_x_mode)
        {
          if (LTC2492_EOC_timeout(LTC2492_CS, eoc_timeout))
            return 1;
          LTC2492_read(LTC2492_CS, adc_command_high, adc_command_low, &adc_code); // Throws out an extra reading in 2x mode
        }
        adc_command_high = BUILD_COMMAND_SINGLE_ENDED[(x + 1) % 4];
        if (LTC2492_EOC_timeout(LTC2492_CS, eoc_timeout))
          return 1;
        LTC2492_read(LTC2492_CS, adc_command_high, adc_command_low, &adc_code);
        adc_voltage = LTC2492_code_to_voltage(adc_code, LTC2492_vref);

        Serial.print(F("  ****"));
        Serial.print(F("CH"));
        Serial.print(x);
        Serial.print(F(": "));
        Serial.print(adc_voltage, 4);
        Serial.print(F("V\n\n"));
      }
    }
    else
    {
      adc_command_high = BUILD_COMMAND_SINGLE_ENDED[user_command];          // Build ADC command
      adc_command_low = rejection_mode | two_x_mode;
      Serial.print(F("ADC Command: 0x"));
      Serial.println((adc_command_high<<8) | adc_command_low, HEX);
      if (LTC2492_EOC_timeout(LTC2492_CS, eoc_timeout))               // Checks for EOC with a timeout
        return 1;
      LTC2492_read(LTC2492_CS, adc_command_high, adc_command_low, &adc_code);       // Throws out last reading
      if (two_x_mode)
      {
        if (LTC2492_EOC_timeout(LTC2492_CS, eoc_timeout))
          return 1;
        LTC2492_read(LTC2492_CS, adc_command_high, adc_command_low, &adc_code);   // Throws out an extra reading in 2x mode
      }
      if (LTC2492_EOC_timeout(LTC2492_CS, eoc_timeout))
        return 1;
      LTC2492_read(LTC2492_CS, adc_command_high, adc_command_low, &adc_code);       // Now we're ready to read the desired data

      Serial.print(F("Received Code: 0x"));
      Serial.println(adc_code, HEX);
      adc_voltage = LTC2492_code_to_voltage(adc_code, LTC2492_vref);
      Serial.print(F("  ****"));
      Serial.print(F("CH"));
      Serial.print(user_command);
      Serial.print(F(": "));
      Serial.print(adc_voltage, 4);
      Serial.print(F("V\n\n"));
    }
  }
  return 0;
}

//! Read channels in differential mode
//! @return Returns 0=successful, 1=unsuccessful (exceeded timeout)
uint8_t menu_2_read_differential()
{
  int8_t y;                 // Offset into differential channel array to select polarity
  uint8_t adc_command_high; // The LTC2492 command high byte
  uint8_t adc_command_low;  // The LTC2492 command low byte
  int16_t user_command;     // The user input command
  int32_t adc_code = 0;    // The LTC2492 code
  float adc_voltage;        // The LTC2492 voltage

  while (1)
  {
    Serial.print(F("\n*************************\n\n")); // Display  differential menu
    Serial.print(F("0-0P-1N\n"));
    Serial.print(F("1-2P-3N\n"));
    Serial.print(F("2-1P-0N\n"));
    Serial.print(F("3-3P-2N\n"));
    Serial.print(F("m-Main Menu\n"));

    user_command = read_int();                              // Read the single command
    if (user_command == 'm')
      break;
    Serial.println(user_command);

    // Reads and displays a selected channel
    adc_command_high = BUILD_COMMAND_DIFF[user_command];
    adc_command_low = rejection_mode | two_x_mode;
    Serial.print(F("ADC Command: 0x"));
    Serial.println((adc_command_high<<8) | adc_command_low, HEX);

    if (LTC2492_EOC_timeout(LTC2492_CS, eoc_timeout))
      return 1;
    LTC2492_read(LTC2492_CS, adc_command_high, adc_command_low, &adc_code);     // Throws out last reading
    if (two_x_mode)
    {
      if (LTC2492_EOC_timeout(LTC2492_CS, eoc_timeout))
        return 1;
      LTC2492_read(LTC2492_CS, adc_command_high, adc_command_low, &adc_code);   // Throws out an extra reading in 2x mode
    }
    if (LTC2492_EOC_timeout(LTC2492_CS, eoc_timeout))
      return 1;
    LTC2492_read(LTC2492_CS, adc_command_high, adc_command_low, &adc_code);     // Now we're ready to read the desired data

    Serial.print(F("Received Code: 0x"));
    Serial.println(adc_code, HEX);
    adc_voltage = LTC2492_code_to_voltage(adc_code, LTC2492_vref);
    Serial.print(F("\n  ****"));
    print_user_command(user_command);
    Serial.print(adc_voltage, 4);
    Serial.print(F("V\n"));
  }
  return 0;
}

//! Set 1X or 2X mode
void menu_3_set_1X2X()
{
  int16_t user_command; // The user input command

  // 2X Mode
  Serial.print(F("2X Mode Settings\n\n"));
  Serial.print(F("0-Disable\n"));
  Serial.print(F("1-Enable\n"));
  Serial.print(F("Enter a Command: "));
  user_command = read_int();
  Serial.println(user_command);

  if (user_command == 0)
  {
    two_x_mode = LTC2492_SPEED_1X;
    Serial.print(F("2X Mode Disabled\n"));
  }
  else
  {
    two_x_mode = LTC2492_SPEED_2X;
    Serial.print(F("2X Mode Enabled\n"));
  }
}


//! Set 1X or 2X mode
void menu_4_select_rejection_freq()
{
  int16_t user_command; // The user input command

  // 2X Mode
  Serial.print(F("Rejection Frequency\n\n"));
  Serial.print(F("0-50 Hz\n"));
  Serial.print(F("1-60 Hz\n"));
  Serial.print(F("2-50/60 Hz\n"));
  Serial.print(F("Enter a Command: "));
  user_command = read_int();
  Serial.println(user_command);

  if (user_command == 0)
  {
    rejection_mode = LTC2492_R50;
    Serial.print(F("50 Hz rejection\n"));
  }
  else if (user_command == 1)
  {
    rejection_mode = LTC2492_R60;
    Serial.print(F("60 Hz rejection\n"));
  }
  else
  {
    rejection_mode = LTC2492_R50_R60;
    Serial.print(F("50/60 Hz rejection\n"));
  }
}

Download LTC2492 - Linduino CPP File

/*!
LTC2492: 24-Bit, 4-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation
@verbatim

The LTC2492 is a 4-channel (2-differential) 24-bit No Latency Delta Sigma
TM ADC with Easy Drive technology. The patented sampling scheme eliminates
dynamic input current errors and the shortcomings of on-chip buffering
through automatic cancellation of differential input current. This allows
large external source impedances, and rail-to-rail input signals to be
directly digitized while maintaining exceptional DC accuracy.

@endverbatim

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

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

REVISION HISTORY
$Revision: 6870 $
$Date: 2017-04-04 10:34:40 -0700 (Tue, 04 Apr 2017) $

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.
*/

//! @ingroup Analog_to_Digital_Converters
//! @{
//! @defgroup LTC2492 LTC2492: 24-Bit, 4-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation
//! @}

/*! @file
    @ingroup LTC2492
    Library for LTC2492: 24-Bit, 4-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation
*/

#include <stdint.h>
#include <Arduino.h>
#include "Linduino.h"
#include "LT_I2C.h"
#include "LTC2492.h"
#include "LTC24XX_general.h"

// Checks for EOC with a specified timeout.
// Returns 0=successful, 1=unsuccessful (exceeded timeout)
int8_t LTC2492_EOC_timeout(uint8_t cs, uint16_t miso_timeout)
{
  return(LTC24XX_EOC_timeout(cs, miso_timeout));
}

// Reads from LTC2492.
void LTC2492_read(uint8_t cs, uint8_t adc_command_high, uint8_t adc_command_low, int32_t *adc_code)
{
  LTC24XX_SPI_16bit_command_32bit_data(cs, adc_command_high, adc_command_low, adc_code);    // Transfer arrays
}

// Calculates the voltage corresponding to an adc code, given lsb weight (in volts)
float LTC2492_code_to_voltage(int32_t adc_code, float vref)
{
  return(LTC24XX_diff_code_to_voltage(adc_code, vref));
}

Download LTC2492 - Linduino Header File

/*!
LTC2492: 24-Bit, 4-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation

@verbatim

The LTC2492 is a 4-channel (2-differential) 24-bit No Latency Delta Sigma
TM ADC with Easy Drive technology. The patented sampling scheme eliminates
dynamic input current errors and the shortcomings of on-chip buffering
through automatic cancellation of differential input current. This allows
large external source impedances, and rail-to-rail input signals to be
directly digitized while maintaining exceptional DC accuracy.


SPI DATA FORMAT (MSB First):

            Byte #1                            Byte #2

Data Out :  !EOC DMY SIG D28 D27 D26 D25 D24   D23  D22  D21  D20  D19 D18 D17 D16
Data In  :  1    0   EN  SGL OS  A2  A1  A0    EN2  IM   FA   FB   SPD X   X   X

Byte #3                        Byte #4
D15 D14 D13 D12 D11 D10 D9 D8  D7 D6 D5 D4 *D3 *D2 *D1 *D0
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
*Dx  : Data Bits Below lsb
EN   : Enable Bit (0-keep previous mode, 1-change mode)
SGL  : Enable Single-Ended Bit (0-differential, 1-single-ended)
OS   : ODD/Sign Bit
Ax   : Address Select Bit
IM   : Internal Temperature Sensor Bit(0-ADC , 1-Temperature Sensor)
Fx   : Frequency Rejection Bits
SPD  : Speed Mode Bit (0-1x, 1-2x)

FIMSPD  : Double Output Rate Select Bit (0-Normal rate, auto-calibration on, 2x rate, auto_calibration off)

Command Byte #1
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

    uint16_t miso_timeout = 1000;
    adc_command = LTC2492_CH0 | LTC2492_OSR_32768 | LTC2492_SPEED_2X;   // Build ADC command for channel 0
                                                                        // OSR = 32768*2 = 65536

    if(LTC2492_EOC_timeout(LTC2492_CS, miso_timeout))    // Check for EOC
        return;                                          // Exit if timeout is reached
    LTC2492_read(LTC2492_CS, adc_command, &adc_code);    // Throws out last reading

    if(LTC2492_EOC_timeout(LTC2492_CS, miso_timeout))    // Check for EOC
        return;                                          // Exit if timeout is reached
    LTC2492_read(LTC2492_CS, adc_command, &adc_code);    // Obtains the current reading and stores to adc_code variable

    // Convert adc_code to voltage
    adc_voltage = LTC2492_code_to_voltage(adc_code, LTC2492_lsb, LTC2492_offset_code);

@endverbatim

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

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

REVISION HISTORY
$Revision: 6858 $
$Date: 2017-04-03 15:08:07 -0700 (Mon, 03 Apr 2017) $

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 LTC2492
    Header for LTC2492: 24-Bit, 4-Channel Delta Sigma ADCs with Selectable Speed/Resolution
*/

#ifndef LTC2492_H
#define LTC2492_H

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

/*! @name Mode Configuration
 @{
*/
#define LTC2492_KEEP_PREVIOUS_MODE              LTC24XX_HS_MULTI_KEEP_PREVIOUS_MODE
#define LTC2492_KEEP_PREVIOUS_SPEED_RESOLUTION  LTC24XX_HS_MULTI_KEEP_PREVIOUS_SPEED_RESOLUTION
#define LTC2492_SPEED_1X                        LTC24XX_HS_MULTI_SPEED_1X
#define LTC2492_SPEED_2X                        LTC24XX_HS_MULTI_SPEED_2X
#define LTC2492_INTERNAL_TEMP                   LTC24XX_EZ_MULTI_PTAT

// Select rejection frequency - 50 and 60, 50, or 60Hz
#define LTC2492_R50         LTC24XX_EZ_MULTI_R50
#define LTC2492_R60         LTC24XX_EZ_MULTI_R60
#define LTC2492_R50_R60     LTC24XX_EZ_MULTI_R55
/*!
 @}
*/

/*! @name Single-Ended Channels Configuration
@{ */
#define LTC2492_CH0            LTC24XX_MULTI_CH_CH0
#define LTC2492_CH1            LTC24XX_MULTI_CH_CH1
#define LTC2492_CH2            LTC24XX_MULTI_CH_CH2
#define LTC2492_CH3            LTC24XX_MULTI_CH_CH3
/*! @} */

/*! @name Differential Channel Configuration
@{ */
#define LTC2492_P0_N1          LTC24XX_MULTI_CH_P0_N1
#define LTC2492_P1_N0          LTC24XX_MULTI_CH_P1_N0

#define LTC2492_P2_N3          LTC24XX_MULTI_CH_P2_N3
#define LTC2492_P3_N2          LTC24XX_MULTI_CH_P3_N2
/*! @} */

/*Commands
Construct a channel / resolution control word by bitwise ORing one choice from the channel configuration
and one choice from the Oversample ratio configuration. You can also enable 2Xmode, which will increase
sample rate by a factor of 2 but introduce an offset of up to 2mV (refer to datasheet EC table.)

Example - read channel 3 single-ended at OSR2048, with 2X mode enabled.
adc_command = (LTC2492_CH3 | LTC2492_SPEED_2X;
*/

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

//! Reads from LTC2492.
void LTC2492_read(uint8_t cs,               //!< Chip select
                  uint8_t adc_command_high, //!< High byte command written to LTC2492
                  uint8_t adc_command_low,  //!< Low byte command written to LTC2492
                  int32_t *adc_code         //!< 4 byte conversion code read from LTC2492
                 );

//! Calculates the voltage corresponding to an adc code, given the reference (in volts)
//! @return Returns voltage calculated from ADC code.
float LTC2492_code_to_voltage(int32_t adc_code,     //!< Code read from adc
                              float vref            //!< VRef (in volts)
                             );

#endif  // LTC2492_H

Technical Support