LTC2412 - 2-Channel Differential Input 24-Bit No Latency Delta Sigma ADC

Features

  • 2-Channel Differential Input with Automatic Channel Selection (Ping-Pong)
  • Low Supply Current: 200µA, 4µA in Autosleep
  • Differential Input and Differential Reference with GND to VCC Common Mode Range
  • 2ppm INL, No Missing Codes
  • 2.5ppm Full-Scale Error and 0.1ppm Offset
  • 0.16ppm Noise, 22.5 Effective Number of Bits
  • No Latency: Digital Filter Settles in a Single Cycle and Each Channel Conversion is Accurate
  • Internal Oscillator—No External Components Required
  • 110dB Min, 50Hz or 60Hz Notch Filter
  • Narrow SSOP-16 Package
  • Single Supply 2.7V to 5.5V Operation

Typical Application

LTC2412 Typical Application
LTC2412 Typical Application

Description

The LTC2412 is a 2-channel differential input micropower 24-bit No Latency Delta Sigma analog-to-digital converter with an integrated oscillator. It provides 2ppm INL and 0.16ppm RMS noise over the entire supply range. The two differential channels are converted alternately with channel ID included in the conversion results. It uses delta-sigma technology and provides single conversion settling of the digital filter. Through a single pin, the LTC2412 can be configured for better than 110dB input differential mode rejection at 50Hz or 60Hz ±2%, or it can be driven by an external oscillator for a user defined rejection frequency. The internal oscillator requires no external frequency setting components.

The converter accepts 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. The DC common mode input rejection is better than 140dB.

The LTC2412 communicates through a flexible 3-wire digital interface which 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
LTC2412CGN#PBF SSOP-16 GN C 05-08-1641 (GN16) Yes
LTC2412CGN#TRPBF SSOP-16 GN C 05-08-1641 (GN16) Yes
LTC2412IGN#PBF SSOP-16 GN I 05-08-1641 (GN16) Yes
LTC2412IGN#TRPBF SSOP-16 GN I 05-08-1641 (GN16) Yes


LTC2412 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
LTC2412CGN#PBF SSOP-16 C $5.50 $4.75 Yes
LTC2412CGN#TRPBF SSOP-16 C $4.81 Yes
LTC2412IGN#PBF SSOP-16 I $6.30 $5.45 Yes
LTC2412IGN#TRPBF SSOP-16 I $5.51 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
DC746A LTC2412CGN | 2 Channel 24-Bit Differential 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

Applications

  • Direct Sensor Digitizer
  • Weight Scales
  • Direct Temperature Measurement
  • Gas Analyzers
  • Strain-Gage 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 Code Supported: There is example code available for this part. The code below may rely on other drivers available in the full library.

Download LTC2412 - DC746A Linduino .INO File

/*!
Linear Technology DC571A Demonstration Board.
LTC2412: 2-Channel Differential Input 24-Bit No Latency Delta Sigma ADC

Linear Technology DC346A Demonstration Board.
LTC2413: 24-Bit No Latency Delta Sigma ADC with Simultaneous 50Hz/60Hz Rejection 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/LTC2412
http://www.linear.com/product/LTC2413

http://www.linear.com/product/LTC2412#demoboards
http://www.linear.com/product/LTC2413#demoboards

REVISION HISTORY
$Revision: 5670 $
$Date: 2016-09-02 10:55:41 -0700 (Fri, 02 Sep 2016) $

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

#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 "LTC2412.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

int8_t menu_1_read_single_ended();
void menu_2_change_ref_voltage();

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

//Constants

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

//! Initialize Linduino
void setup()
{
  char demo_name[6]="DC746";        // 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();
  }
}

//! 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
      Serial.println(user_command);
      switch (user_command)
      {
        case 1:
          menu_1_read_single_ended();
          break;
        case 2:
          menu_2_change_ref_voltage();
          break;
        default:
          Serial.println("Incorrect Option");
          break;
      }
      if (acknowledge)
        Serial.println(F("***** SPI ERROR ******"));
      Serial.print(F("\n*************************\n"));
      print_prompt();
    }
  }
}

//! Repeats Linduino loop
int8_t menu_1_read_single_ended()
{
  int16_t user_command; // The user input command
  uint32_t adc_code;    // The LTC2418 code
  float adc_voltage;    // The LTC2418 voltage
  uint8_t channel;

  if (LTC2412_EOC_timeout(LTC2412_CS, MISO_TIMEOUT))     // Check for EOC
    return(1);
  LTC2412_read(LTC2412_CS, &adc_code);
  Serial.print(F("Received Code: 0x"));
  Serial.println(adc_code, HEX);
  adc_voltage = LTC2412_code_to_voltage(adc_code, LTC2412_lsb , LTC2412_offset_code);
  channel = adc_code >> 30;
  channel = channel & 1;
  Serial.print(F("CH"));
  Serial.print(channel);
  Serial.print(F(": "));
  Serial.print(adc_voltage, 4);
  Serial.print(F("V\n"));

  if (LTC2412_EOC_timeout(LTC2412_CS, MISO_TIMEOUT))     // Check for EOC
    return(1);
  LTC2412_read(LTC2412_CS, &adc_code);
  Serial.print(F("Received Code: 0x"));
  Serial.println(adc_code, HEX);
  adc_voltage = LTC2412_code_to_voltage(adc_code, LTC2412_lsb , LTC2412_offset_code);
  channel = adc_code >> 30;
  channel = channel & 1;
  Serial.print(F("CH"));
  Serial.print(channel);
  Serial.print(F(": "));
  Serial.print(adc_voltage, 4);
  Serial.print(F("V\n"));
  return(0);
}

void menu_2_change_ref_voltage()
{
  float refp, refn;
  Serial.print(F("Enter REF+ : "));
  refp = read_float();
  Serial.print(refp);
  Serial.println(F(" V"));
  Serial.print(F("Enter REF- : "));
  refn = read_float();
  Serial.print(refn);
  Serial.println(F(" V"));
  reference_voltage = refp - refn;
  LTC2412_lsb = reference_voltage / 16777216;
}

//! Prints the title block when program first starts.
void print_title()
{
  Serial.print(F("\n*****************************************************************\n"));
  Serial.print(F("* DC746A 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("\nReference voltage: "));
  Serial.print(reference_voltage);
  Serial.println(F("V"));
  Serial.print(F("Input Voltage Range: "));
  Serial.print((-1) * reference_voltage/2);
  Serial.print(" - ");
  Serial.print(reference_voltage/2);
  Serial.println(F(" V"));
  Serial.println(F("Please Verify!"));

  Serial.print(F("\n1-Read Both Channels\n"));
  Serial.print(F("2-Change Reference Voltage\n"));
  Serial.println();
  Serial.print(F("Enter a command:"));
}

Download LTC2412 Linduino .CPP File

/*!
LTC2412: 2-Channel Differential Input 24-Bit No Latency Delta Sigma ADC
LTC2413: 24-Bit No Latency Delta Sigma ADC with Simultaneous 50Hz/60Hz Rejection ADC

@verbatim

The LTC2412 is a 2-channel differential input micropower 24-bit No Latency
Delta-Sigma analog-to-digital converter with an integrated oscillator. It
provides 2ppm INL and 0.16ppm RMS noise over the entire supply range. The two
differential channels are converted alternately with channel ID included in
the conversion results.

The converter accepts any external differential reference voltage from 0.1V to
VCC for flexible ratiometric and remote sensingmeasurement configurations. The
full-scale differential input range is from –0.5VREF to 0.5VREF. The LTC2412
communicates through a flexible 3-wire digital interface which is compatible
with SPI and MICROWIRE protocols.

@endverbatim

http://www.linear.com/product/LTC2412
http://www.linear.com/product/LTC2413

http://www.linear.com/product/LTC2412#demoboards
http://www.linear.com/product/LTC2413#demoboards

REVISION HISTORY
$Revision: 5670 $
$Date: 2016-09-02 10:55:41 -0700 (Fri, 02 Sep 2016) $

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 LTC2412 LTC2412: 2-Channel Differential Input 24-Bit No Latency Delta Sigma ADC

/*! @file
    @ingroup LTC2412
    Library for LTC2412: 2-Channel Differential Input 24-Bit No Latency Delta Sigma ADC
*/

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

int8_t LTC2412_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 LTC2412_read(uint8_t cs, uint32_t *adc_code)
// Reads the LTC2412 result
{
  LT_union_int32_4bytes data, command;
  command.LT_byte[3] = 0;
  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 LTC2412_code_to_voltage(int32_t adc_code, float LTC2412_lsb , int32_t LTC2412_offset_code)
// Calculates the LTC2412 input voltage
{
  float adc_voltage;
  uint8_t sign;
  sign = (uint8_t)(adc_code >> 29);
  sign = sign & 1;
  adc_code = adc_code>>5;                                           //! 1) Bit-shift ADC code to the right 5 bits
  adc_code = adc_code & 0xFFFFFF;
  if (!sign)
    adc_code -= 16777216;                                              //! 2) Convert ADC code from offset binary to binary
  adc_voltage=((float)adc_code+LTC2412_offset_code)*(LTC2412_lsb);  //! 3) Calculate voltage from ADC code, lsb, offset.
  return(adc_voltage);
}

Download LTC2412 Linduino Header File

/*!
LTC2412: 2-Channel Differential Input 24-Bit No Latency Delta Sigma ADC
LTC2413: 24-Bit No Latency Delta Sigma ADC with Simultaneous 50Hz/60Hz Rejection ADC

@verbatim

The LTC2412 is a 2-channel differential input micropower 24-bit No Latency
Delta-Sigma analog-to-digital converter with an integrated oscillator. It
provides 2ppm INL and 0.16ppm RMS noise over the entire supply range. The two
differential channels are converted alternately with channel ID included in
the conversion results.

The converter accepts any external differential reference voltage from 0.1V to
VCC for flexible ratiometric and remote sensingmeasurement configurations. The
full-scale differential input range is from –0.5VREF to 0.5VREF. The LTC2412
communicates through a flexible 3-wire digital interface which is compatible
with SPI and MICROWIRE protocols.

SPI DATA FORMAT (MSB First):

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

Data Out :  !EOC CH SIG  D23 D22 D21 D20 D19   D18 D17 D16 D15 D14 D13 D12 D11   D10 D9 D8 D7 D6 D5 D4 D3   D2 D1 D0  X  X  X  X  X

!EOC : End of Conversion Bit (Active Low)
CH   : Channel selected
SIG  : Sign Bit (1-data positive, 0-data negative)
Dx   : Data Bits


Example Code:

Read Channel 0 in Single-Ended mode

    uint16_t miso_timeout = 1000;

    if(LTC2412_EOC_timeout(LTC2412_CS, miso_timeout))    // Check for EOC
        return(1);
    LTC2412_read(LTC2412_CS, &adc_code);   // Obtains the current reading and stores to adc_code variable

    // Convert adc_code to voltage
    adc_voltage = LTC2412_code_to_voltage(adc_code, LTC2412_lsb , LTC2412_offset_code);

@endverbatim

http://www.linear.com/product/LTC2412
http://www.linear.com/product/LTC2413

http://www.linear.com/product/LTC2412#demoboards
http://www.linear.com/product/LTC2413#demoboards

REVISION HISTORY
$Revision: 5670 $
$Date: 2016-09-02 10:55:41 -0700 (Fri, 02 Sep 2016) $

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 LTC2412
    Header for LTC2412: 2-Channel Differential Input 24-Bit No Latency Delta Sigma ADC
*/

#ifndef LTC2412_H
#define LTC2412_H

#include <SPI.h>

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

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

//! Reads the LTC2412 result
//! @return void
void LTC2412_read(uint8_t cs,           //!< Chip Select pin
                  uint32_t *adc_code    //!< Returns raw 32-bit code read from ADC
                 );

//! Calculates the LTC2412 input voltage
//! @return Calculated voltage
float LTC2412_code_to_voltage(int32_t adc_code,           //!< Raw ADC code
                              float LTC2412_lsb,          //!< LSB value (volts)
                              int32_t LTC2412_offset_code //!< Offset (Code)
                             );

#endif  // LTC2412_H

Technical Support