LTC2348-18 - Octal, 18-Bit, 200ksps Differential ±10.24V Input SoftSpan ADC with Wide Input Common Mode Range

Features

  • 200ksps per Channel Throughput
  • Eight Simultaneous Sampling Channels
  • ±3LSB INL (Maximum, ±10.24V Range)
  • Guaranteed 18-Bit, No Missing Codes
  • Differential, Wide Common Mode Range Inputs
  • Per-Channel SoftSpan Input Ranges:
    ±10.24V, 0V to 10.24V, ±5.12V, 0V to 5.12V
    ±12.5V, 0V to 12.5V, ±6.25V, 0V to 6.25V
  • 96.7dB Single-Conversion SNR (Typical)
  • −109dB THD (Typical) at fIN = 2kHz
  • 118dB CMRR (Typical) at fIN = 200Hz
  • Rail-to-Rail Input Overdrive Tolerance
  • Guaranteed Operation to 125°C
  • Integrated Reference and Buffer (4.096V)
  • SPI CMOS (1.8V to 5V) and LVDS Serial I/O
  • Internal Conversion Clock, No Cycle Latency
  • 140mW Power Dissipation (Typical)
  • 48-Lead (7mm x 7mm) LQFP Package

Typical Application

LTC2348-18 Typical Application
LTC2348-18 Typical Application

Description

The LTC®2348-18 is an 18-bit, low noise 8-channel simultaneous sampling successive approximation register (SAR) ADC with differential, wide common mode range inputs. Operating from a 5V low voltage supply, flexible high voltage supplies, and using the internal reference and buffer, each channel of this SoftSpanTM ADC can be independently configured on a conversion-by-conversion basis to accept ±10.24V, 0V to 10.24V, ±5.12V, or 0V to 5.12V signals. Individual channels may also be disabled to increase throughput on the remaining channels.

The wide input common mode range and 118dB CMRR of the LTC2348-18 analog inputs allow the ADC to directly digitize a variety of signals, simplifying signal chain design. This input signal flexibility, combined with ±3LSB INL, no missing codes at 18 bits, and 96.7dB SNR, makes the LTC2348-18 an ideal choice for many high voltage applications requiring wide dynamic range.

The LTC2348-18 supports pin-selectable SPI CMOS (1.8V to 5V) and LVDS serial interfaces. Between one and eight lanes of data output may be employed in CMOS mode, allowing the user to optimize bus width and throughput.

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
LTC2348CLX-18#PBF 7x7 LQFP-48 LX C 05-08-1760 Yes
LTC2348HLX-18#PBF 7x7 LQFP-48 LX H 05-08-1760 Yes
LTC2348ILX-18#PBF 7x7 LQFP-48 LX I 05-08-1760 Yes


LTC2348-18 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
LTC2348CLX-18#PBF 7x7 LQFP-48 C $33.36 $23.35 Yes
LTC2348HLX-18#PBF 7x7 LQFP-48 H $44.07 $30.85 Yes
LTC2348ILX-18#PBF 7x7 LQFP-48 I $38.36 $26.85 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
DC2094A-A LTC2348-18 Demo Board | Octal, Simultaneous, 18-Bit, 200ksps SAR ADC (req DC590, DC2026 or DC890) $150.00
Buy Now

Companion Boards

Part Number Description Price Documentation
DC2026C Linduino One Isolated USB Demo Board: An Arduino- and QuikEval-Compatible Code Development Platform $75.00
DC590B Isolated USB Serial Controller for Linear Technology QuikEval-Compatible Demo Boards $50.00
DC890B USB Data Acquisition Controller, for PScope Evaluation Kits (up to 250Mbps, CMOS/LVDS) $300.00
Buy Now
Click here to view our complete list of demo boards

Applications

  • Programmable Logic Controllers
  • Industrial Process Control
  • Power Line Monitoring
  • Test and Measurement

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 LTC2348 - DC2094A.ino

/*!
Linear Technology DC2094A Demonstration Board.
LTC2348: 18-bit, 8-channel Simultaneous Sampling SAR ADC.

Linear Technology DC2365A Demonstration Board.
LTC2358: 18-bit, Buffered 8-channel Simultaneous Sampling SAR ADC.

@verbatim

NOTES
 Setup:
   Set the terminal baud rate to 115200 and select the newline terminator.
   Ensure all jumpers on the demo board are installed in their default positions
   as described in Demo Manual DC2094A. Apply +/- 16V to the indicated terminals.
   Make sure the input range of channels are configured to measure according to
   the input range required.


 Menu Entry 1: Display ADC Output Data and Calculated ADC input voltage

 Menu Entry 2: Display Configuration Setting

 Menu Entry 3: Change Configuration Setting

@endverbatim

http://www.linear.com/product/LTC2348-18
http://www.linear.com/product/LTC2358-18

http://www.linear.com/product/LTC2348-18#demoboards
http://www.linear.com/product/LTC2358-18#demoboards

REVISION HISTORY
$Revision: 5082 $
$Date: 2015-1-17

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.

Copyright 2013 Linear Technology Corp. (LTC)
 */


/*! @file
    @ingroup LTC2348
*/
#include <Arduino.h>
#include "LT_I2C.h"
#include "LT_SPI.h"
#include "UserInterface.h"
#include "QuikEval_EEPROM.h"
#include "Linduino.h"
#include <Wire.h>
#include <stdint.h>
#include <SPI.h>
#include "LTC2348.h"

// Macros
#define  CONFIG_WORD_POSITION  0X07

// Global variable
static uint8_t demo_board_connected;   //!< Set to 1 if the board is connected
uint8_t channel;

extern Config_Word_Struct CWSTRUCT;

// Function declarations
void print_title();
void print_prompt();
void menu1_display_adc_output();
void menu2_display_channel_CW();
void menu3_changeCW();

//! Initialize Linduino
void setup()
{
  uint8_t value = 0;
  uint8_t *p = &value;
  char demo_name[] = "LTC2348-18";  //! Demo Board Name stored in QuikEval EEPROM
  quikeval_I2C_init();              //! Initializes Linduino I2C port.
  quikeval_SPI_init();            //! Initializes Linduino SPI port.

  Serial.begin(115200);             //! Initialize the serial port to the PC
  print_title();

  demo_board_connected = discover_DC2094(demo_name);
  if (demo_board_connected)
  {
    print_prompt();
  }

  i2c_read_byte(0x20, &value);      // 0x20 is the port address for i/o expander for I2C.
  delay(100);
  value = value & 0x7F;             // P7 = WRIN = 0
  value = value | 0x04;             // P2 = WRIN2 = 1
  i2c_write_byte(0x20, value);
  delay(100);

  quikeval_SPI_connect();           //! Connects to main SPI port
}

//! Repeats Linduino Loop
void loop()
{
  int8_t user_command;                 // The user input command
  uint8_t acknowledge = 0;
  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:
        menu1_display_adc_output();
        break;
      case 2:
        menu2_display_channel_CW();
        break;
      case 3:
        menu3_changeCW();
        break;
      default:
        Serial.println(F("Incorrect Option"));
    }
    if (acknowledge)
      Serial.println(F("***** I2C ERROR *****"));
    Serial.print(F("\n****************************** Press Enter to Continue ******************************\n"));
    read_int();
    print_prompt();
  }
}

//! Read the ID string from the EEPROM and determine if the correct board is connected.
//! Returns 1 if successful, 0 if not successful
uint8_t discover_DC2094(char *demo_name)
{
  Serial.print(F("\nChecking EEPROM contents..."));
  read_quikeval_id_string(&ui_buffer[0]);
  ui_buffer[48] = 0;
  Serial.println(ui_buffer);

  if (!strcmp(demo_board.product_name, demo_name))
  {
    Serial.print("Demo Board Name: ");
    Serial.println(demo_board.name);
    Serial.print("Product Name: ");
    Serial.println(demo_board.product_name);
    if (demo_board.option)
    {
      Serial.print("Demo Board Option: ");
      Serial.println(demo_board.option);
    }
    Serial.println(F("Demo board connected"));
    Serial.println(F("\n\n\t\t\t\tPress Enter to Continue..."));
    read_int();
    return 1;
  }
  else
  {
    Serial.print("Demo board ");
    Serial.print(demo_name);
    Serial.print(" not found, \nfound ");
    Serial.print(demo_board.name);
    Serial.println(" instead. \nConnect the correct demo board, then press the reset button.");
    return 0;
  }
}

//! Prints the title block when program first starts.
void print_title()
{
  Serial.print(F("\n*****************************************************************\n"));
  Serial.print(F("* DC2094A 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 18-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.println(F("\n\n\n\t\t\t\tCONFIGURATION SETTINGS (Vref = 4.096V)\n"));
  Serial.println(F("|Config Number| SS2 | SS1 | SS0 | ANALOG INPUT RANGE      | DIGITAL COMPRESSION | RESULT BINARY FORMAT |"));
  Serial.println(F("|-------------|-----------------|-------------------------|---------------------|----------------------|"));
  Serial.println(F("|      0      |  0  |  0  |  0  | Disable Channel         | N/A                 | All Zeros            |"));
  Serial.println(F("|      1      |  0  |  0  |  1  | 0 - 1.25 Vref           | 1                   | Straight Binary      |"));
  Serial.println(F("|      2      |  0  |  1  |  0  | -1.25 Vref - +1.25 Vref | 1/1.024             | Two's Complement     |"));
  Serial.println(F("|      3      |  0  |  1  |  1  | -1.25 Vref - +1.25 Vref | 1                   | Two's Complement     |"));
  Serial.println(F("|      4      |  1  |  0  |  0  | 0 - 2.5 Vref            | 1/1.024             | Straight Binary      |"));
  Serial.println(F("|      5      |  1  |  0  |  1  | 0 - 2.5 Vref            | 1                   | Straight Binary      |"));
  Serial.println(F("|      6      |  1  |  1  |  0  | -2.5 Vref - +2.5 Vref   | 1/1.024             | Two's Complement     |"));
  Serial.println(F("|      7      |  1  |  1  |  1  | -2.5 Vref - +2.5 Vref   | 1                   | Two's Complement     |"));

  Serial.print(F("\n\n\n\t\t\t\tOPTIONS\n"));
  Serial.print(F("\n1 - Display ADC output\n"));
  Serial.print(F("2 - Display configuration setting\n"));
  Serial.print(F("3 - Change configuration setting\n"));

  Serial.print(F("\nENTER A COMMAND: "));
}

//! Displays the ADC output and calculated voltage for all channels
void menu1_display_adc_output()
{
  uint8_t i, pos;
  uint8_t channel_selected;
  uint8_t *p;
  uint8_t Result[24];
  float voltage;
  uint32_t code;
  union LT_union_int32_4bytes data;
  data.LT_uint32 = 0;

  Serial.print("\nEnter the channel number (0 - 7, 8: ALL): ");
  channel_selected = read_int();
  if (channel_selected < 0)
    channel_selected = 0;
  else if (channel_selected > 8)
    channel_selected = 8;

  LTC2348_write(Result);    //discard the first reading
  LTC2348_write(Result);

  if (channel_selected == 8)
  {
    Serial.println("ALL");
    for (i = 0; i < 24; i = i+3)
    {
      data.LT_byte[2] = Result[i];
      data.LT_byte[1] = Result[i+1];
      data.LT_byte[0] = Result[i+2];

      channel = (data.LT_uint32 & 0x38) >> 3;
      Serial.print(F("\nChannel      : "));
      Serial.println(channel);

      code = (data.LT_uint32 & 0xFFFFC0) >> 6;
      Serial.print(F("Data         : 0x"));
      Serial.println(code, HEX);

      Serial.print(F("Voltage      : "));
      voltage = LTC2348_voltage_calculator(code, channel);
      Serial.print(voltage, 6);
      Serial.println(F(" V"));

      Serial.print(F("Config Number: "));
      Serial.println(data.LT_byte[0] & CONFIG_WORD_POSITION);
    }
  }
  else
  {
    Serial.println(channel_selected);
    pos = channel_selected * 3;
    data.LT_byte[2] = Result[pos];
    data.LT_byte[1] = Result[++pos];
    data.LT_byte[0] = Result[++pos];

    code = (data.LT_uint32 & 0xFFFFC0) >> 6;
    Serial.print(F("Data         : 0x"));
    Serial.println(code, HEX);

    Serial.print(F("Voltage      : "));
    voltage = LTC2348_voltage_calculator(code, channel_selected);
    Serial.print(voltage, 6);
    Serial.println(F(" V"));

    Serial.print("Config Number: ");
    Serial.println(data.LT_byte[0] & CONFIG_WORD_POSITION);
  }
}
//! Displays the configuration number of channels
void menu2_display_channel_CW()
{
  uint8_t i, j;
  uint8_t channel;
  uint8_t Result[24];

  Serial.print("\nEnter the channel number (0 - 7, 8: ALL): ");
  channel = read_int();
  if (channel < 0)
    channel = 0;
  else if (channel > 8)
    channel = 8;

  LTC2348_write(Result);    //discard the first reading
  LTC2348_write(Result);

  if (channel == 8)
  {
    Serial.println("ALL");
    Serial.print("\nConfig number for each channel:");
    j = 0;
    for (i = 0; i < 8; ++i)
    {
      Serial.print("\n\nChannel      : ");
      Serial.println(i);
      Serial.print("Config Number: ");
      Serial.print(Result[j + 2] & CONFIG_WORD_POSITION);
      j = j + 3;
    }
    Serial.print("\n");
  }
  else
  {
    Serial.println(channel);
    Serial.print("Config Number: ");
    Serial.println(Result[channel * 3 + 2] & CONFIG_WORD_POSITION);
  }
}

//! Function to change the configuration setting
void menu3_changeCW()
{
  uint8_t i, j;
  uint8_t channel;
  uint8_t configNum;
  uint8_t Result[24];

  Serial.print("\nEnter the channel number (0 - 7, 8: ALL): ");
  channel = read_int();
  if (channel < 0)
    channel = 0;
  else if (channel > 8)
    channel = 8;

  if (channel == 8)
    Serial.println("ALL");
  else
    Serial.println(channel);

  Serial.print("Enter the configuration number in decimal: ");
  configNum = read_int();
  Serial.println(configNum);

  if (channel == 8)
  {
    CWSTRUCT.LTC2348_CHAN0_CONFIG = configNum;
    CWSTRUCT.LTC2348_CHAN1_CONFIG = configNum;
    CWSTRUCT.LTC2348_CHAN2_CONFIG = configNum;
    CWSTRUCT.LTC2348_CHAN3_CONFIG = configNum;
    CWSTRUCT.LTC2348_CHAN4_CONFIG = configNum;
    CWSTRUCT.LTC2348_CHAN5_CONFIG = configNum;
    CWSTRUCT.LTC2348_CHAN6_CONFIG = configNum;
    CWSTRUCT.LTC2348_CHAN7_CONFIG = configNum;
  }
  else
  {
    switch (channel)
    {
      case 0:
        CWSTRUCT.LTC2348_CHAN0_CONFIG = configNum;
        break;
      case 1:
        CWSTRUCT.LTC2348_CHAN1_CONFIG = configNum;
        break;
      case 2:
        CWSTRUCT.LTC2348_CHAN2_CONFIG = configNum;
        break;
      case 3:
        CWSTRUCT.LTC2348_CHAN3_CONFIG = configNum;
        break;
      case 4:
        CWSTRUCT.LTC2348_CHAN4_CONFIG = configNum;
        break;
      case 5:
        CWSTRUCT.LTC2348_CHAN5_CONFIG = configNum;
        break;
      case 6:
        CWSTRUCT.LTC2348_CHAN6_CONFIG = configNum;
        break;
      case 7:
        CWSTRUCT.LTC2348_CHAN7_CONFIG = configNum;
        break;
    }
  }

  Serial.print(F("\nCONFIGURATION CHANGED!"));
}

Download LTC2348 Linduino Header File

/*!
LTC2348: 18-bit, 8 channel Simultaneous Sampling SAR ADC
LTC2358: 18-bit, Buffered 8-channel Simultaneous Sampling SAR ADC
@verbatim

The LTC2348 is an 18-bit,low noise 8-channel simultaneous sampling successive
approximation register(SAR) ADC with differential,wide common mode range
inputs. Operating from a 5V low voltage supply, flexible high voltage supplies,
and using the internal reference and buffer, each channel of this SoftSpan ADC
can be independently configured on a conversion-by-conversion basis to accept
±10.24V, 0V to 10.24V, ±5.12V,or 0V to 5.12V signals. Individual channels may
also be disabled to increase throughput on the remaining channels

SPI DATA FORMAT :
            SoftSpan Configuration Word for Conversion N+1
Data In  :  S23 S22 S21 S20 S19 S18 S17 S16 S15 S14 S13 S12 S11 S10 S9  S8  S7  S6  S5  S4  S3  S2  S1  S0

            Conversion N   Channel 0
SDO0   :  D17 D16 D15 D14 D13 D12 D11 D10 D9  D8  D7  D6  D5  D4  D3  D2  D1  D0  C2  C1  C0  SS2 SS1 SS0

Sx   : SoftSpan Configuration Bits
Dx   : Data Bits
Cx   : Channel ID Bits
SSx  : SoftSpan Configuration Bits of corresponding channel

@endverbatim

http://www.linear.com/product/LTC2348-18
http://www.linear.com/product/LTC2358-18

http://www.linear.com/product/LTC2348-18#demoboards
http://www.linear.com/product/LTC2358-18#demoboards

REVISION HISTORY
$Revision: 4826 $
$Date: 2016-03-28 17:38:51 -0700 (Mon, 28 Mar 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.

Copyright 2013 Linear Technology Corp. (LTC)
***********************************************************/

/*! @file
    @ingroup LTC2348
    Header for LTC2348: 18-bit, 8 channel Simultaneous Sampling SAR ADC
*/

#ifndef LTC2348_H
#define LTC2348_H

//! SoftSpan Configuration Bits for 8 channels (3 bits each)
struct Config_Word_Struct
{
  uint8_t LTC2348_CHAN0_CONFIG : 3;
  uint8_t LTC2348_CHAN1_CONFIG : 3;
  uint8_t LTC2348_CHAN2_CONFIG : 3;
  uint8_t LTC2348_CHAN3_CONFIG : 3;
  uint8_t LTC2348_CHAN4_CONFIG : 3;
  uint8_t LTC2348_CHAN5_CONFIG : 3;
  uint8_t LTC2348_CHAN6_CONFIG : 3;
  uint8_t LTC2348_CHAN7_CONFIG : 3;
};

//! Calculates the voltage from ADC output data depending on the channel configuration
float LTC2348_voltage_calculator(int32_t data,    //!< ADC output data
                                 uint8_t channel  //!< channel number
                                );

//! Creates 24-bit configuration word for the 8 channels.
uint32_t LTC2348_create_config_word();

//! Transmits 24 bits (3 bytes) of configuration information and
//! reads back 24 bytes of data (3 bytes/ 24 bits for each channel)
//! 24 bits: 18 bit data + 3 bit config + 3 bit channel number
//! Read back is done in a new cycle
void LTC2348_write(uint8_t Result[24]       //!< 3 bytes each of ADC output data from 8 channels
                  );

#endif

Download LTC2348 Linduino.CPP

/*!
LTC2348: 18-bit, 8 channel Simultaneous Sampling SAR ADC.
LTC2358: 18-bit, Buffered 8-channel Simultaneous Sampling SAR ADC.

@verbatim

The LTC2348 is an 18-bit,low noise 8-channel simultaneous sampling successive
approximation register(SAR) ADC with differential,wide common mode range
inputs. Operating from a 5V low voltage supply, flexible high voltage supplies,
and using the internal reference and buffer, each channel of this SoftSpan ADC
can be independently configured on a conversion-by-conversion basis to accept
±10.24V, 0V to 10.24V, ±5.12V,or 0V to 5.12V signals.

@endverbatim

http://www.linear.com/product/LTC2348-18
http://www.linear.com/product/LTC2358-18

http://www.linear.com/product/LTC2348-18#demoboards
http://www.linear.com/product/LTC2358-18#demoboards

REVISION HISTORY
$Revision: 5081 $
$Date: 2016-05-10 09:34:58 -0700 (Tue, 10 May 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.

Copyright 2013 Linear Technology Corp. (LTC)
***********************************************************/
//! @defgroup LTC2348 LTC2348: 18-bit, 8 channel Simultaneous Sampling SAR ADC

/*! @file
    @ingroup LTC2348
    Library for LTC2348: 18-bit, 8 channel Simultaneous Sampling SAR ADC
*/
#include <Arduino.h>
#include <stdint.h>
#include <SPI.h>
#include "Linduino.h"
#include "UserInterface.h"
#include "QuikEval_EEPROM.h"
#include "LTC2348.h"

#define VREF 4.096
#define POW2_18 262143
#define POW2_17 131072

// Setting input range of all channels - 0V to 0.5 Vref with no gain compression (SS2 = 0, SS1 = 0, SS0 = 1)
struct Config_Word_Struct CWSTRUCT = { 7, 7, 7, 7, 7, 7, 7, 7};

// Calculates the voltage from ADC output data depending on the channel configuration
float LTC2348_voltage_calculator(int32_t data, uint8_t channel)
{
  float voltage;
  uint8_t CW;
  switch (channel)
  {
    case 0:
      CW = CWSTRUCT.LTC2348_CHAN0_CONFIG;
      break;
    case 1:
      CW = CWSTRUCT.LTC2348_CHAN1_CONFIG;
      break;
    case 2:
      CW = CWSTRUCT.LTC2348_CHAN2_CONFIG;
      break;
    case 3:
      CW = CWSTRUCT.LTC2348_CHAN3_CONFIG;
      break;
    case 4:
      CW = CWSTRUCT.LTC2348_CHAN4_CONFIG;
      break;
    case 5:
      CW = CWSTRUCT.LTC2348_CHAN5_CONFIG;
      break;
    case 6:
      CW = CWSTRUCT.LTC2348_CHAN6_CONFIG;
      break;
    case 7:
      CW = CWSTRUCT.LTC2348_CHAN7_CONFIG;
      break;
  }

  switch (CW)
  {
    case 0:
      voltage = 0;
      break;   // Disable Channel
    case 1:
      voltage = (float)data * (1.25 * VREF / 1.000) / POW2_18;
      break;
    case 2:
      {
        voltage = (float)data * (1.25 * VREF / 1.024) / POW2_17;
        if (voltage > 5.12)
          voltage -= 10.24;
        break;
      }
    case 3:
      {
        voltage = (float)data * (1.25 * VREF / 1.000) / POW2_17;
        if (voltage > 5.12)
          voltage -= 10.24;
        break;
      }
    case 4:
      voltage = (float)data * (2.50 * VREF / 1.024) / POW2_18;
      break;
    case 5:
      voltage = (float)data * (2.50 * VREF / 1.000) / POW2_18;
      break;
    case 6:
      {
        voltage = (float)data * (2.50 * VREF / 1.024) / POW2_17;
        if (voltage > 10.24)
          voltage -= 20.48;
        break;
      }
    case 7:
      {
        voltage = (float)data * (2.50 * VREF / 1.000) / POW2_17;
        if (voltage > 10.24)
          voltage -= 20.48;
        break;
      }
  }
  return voltage;
}

// Creates 24-bit configuration word for the 8 channels.
uint32_t LTC2348_create_config_word()
{
  uint32_t config_word;
  config_word = (uint32_t)CWSTRUCT.LTC2348_CHAN7_CONFIG;
  config_word = (config_word << 3) | (uint32_t)CWSTRUCT.LTC2348_CHAN6_CONFIG;
  config_word = (config_word << 3) | (uint32_t)CWSTRUCT.LTC2348_CHAN5_CONFIG;
  config_word = (config_word << 3) | (uint32_t)CWSTRUCT.LTC2348_CHAN4_CONFIG;
  config_word = (config_word << 3) | (uint32_t)CWSTRUCT.LTC2348_CHAN3_CONFIG;
  config_word = (config_word << 3) | (uint32_t)CWSTRUCT.LTC2348_CHAN2_CONFIG;
  config_word = (config_word << 3) | (uint32_t)CWSTRUCT.LTC2348_CHAN1_CONFIG;
  config_word = (config_word << 3) | (uint32_t)CWSTRUCT.LTC2348_CHAN0_CONFIG;

  return config_word;
}

// Transmits 24 bits (3 bytes) of configuration information and
// reads back 24 bytes of data (3 bytes/ 24 bits for each channel)
// 24 bits: 18 bit data + 3 bit config + 3 bit channel number
// Read back is done in a new cycle
void LTC2348_write(uint8_t Result[24])
{
  int i, j;
  uint32_t config_word;
  config_word = LTC2348_create_config_word();

  output_low(QUIKEVAL_CS);                  //! Pull CS low

  SPI.transfer((uint8_t)(config_word >> 16));   //! Transferring byte 2
  SPI.transfer((uint8_t)(config_word >> 8));    //! Transferring byte 1
  SPI.transfer((uint8_t)config_word);         //! Transferring byte 0

  output_high(QUIKEVAL_CS);                 //! Pull CS high
  delay(100);
  output_low(QUIKEVAL_CS);

  for (i = 0; i < 24; ++i)
    Result[i] = SPI.transfer(0); //! Receiving 24B data by transferring null information

  output_high(QUIKEVAL_CS);
}

Technical Support