LTC2361 - 250ksps, 12-Bit Serial ADCs in TSOT-23

Features

  • 12-Bit Resolution
  • Low Noise: 73dB SNR
  • Low Power Dissipation: 1.5mW @ 100ksps
  • 100ksps/250ksps/500ksps Sampling Rates
  • Single Supply 2.35V to 3.6V Operation
  • No Data Latency
  • Sleep Mode with 0.1μA Typical Supply Current
  • Dedicated External Reference (TSOT23-8)
  • 1V to 3.6V Digital Output Supply (TSOT23-8)
  • SPI/MICROWIRE Compatible Serial I/O
  • Guaranteed Operation from –40°C to 125°C
  • Tiny 6- and 8-Lead TSOT-23 Packages
Designed for Automotive and Transportation Applications
AEC-Q100 generic family data available for specific packages


Typical Application

LTC2361 Typical Application
LTC2361 Typical Application

Description

The LTC2360/LTC2361/LTC2362 are 100ksps/250ksps/ 500ksps, 12-bit, sampling A/D converters that draw only 0.5mA, 0.75mA and 1.1mA, respectively, from a single 3V supply. The supply current drops at lower sampling rates because these devices automatically power down after conversions. The full-scale input of the LTC2360/ LTC2361/ LTC2362 is 0V to VDD or VREF. These ADCs are available in tiny 6- and 8-lead TSOT-23 packages.

The serial interface, tiny TSOT-23 package and extremely high sample rate-to-power ratio make the LTC2360/ LTC2361/LTC2362 ideal for compact, low power, high speed systems.

The high impedance single-ended analog input and the ability to operate with reduced spans (down to 1.4V full scale) allow direct connection to sensors and transducers in many applications, eliminating the need for gain stages.

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
LTC2361CS6#PBF SOT-23 S6 C 05-08-1636 Yes
LTC2361CS6#TRMPBF SOT-23 S6 C 05-08-1636 Yes
LTC2361CS6#TRPBF SOT-23 S6 C 05-08-1636 Yes
LTC2361CTS8#PBF SOT-23 TS8 C 05-08-1637 Yes
LTC2361CTS8#TRMPBF SOT-23 TS8 C 05-08-1637 Yes
LTC2361CTS8#TRPBF SOT-23 TS8 C 05-08-1637 Yes
LTC2361HS6#PBF SOT-23 S6 H 05-08-1636 Yes
LTC2361HS6#TRMPBF SOT-23 S6 H 05-08-1636 Yes
LTC2361HS6#TRPBF SOT-23 S6 H 05-08-1636 Yes
LTC2361HTS8#PBF SOT-23 TS8 H 05-08-1637 Yes
LTC2361HTS8#TRMPBF SOT-23 TS8 H 05-08-1637 Yes
LTC2361HTS8#TRPBF SOT-23 TS8 H 05-08-1637 Yes
LTC2361IS6#PBF SOT-23 S6 I 05-08-1636 Yes
LTC2361IS6#TRMPBF SOT-23 S6 I 05-08-1636 Yes
LTC2361IS6#TRPBF SOT-23 S6 I 05-08-1636 Yes
LTC2361ITS8#PBF SOT-23 TS8 I 05-08-1637 Yes
LTC2361ITS8#TRMPBF SOT-23 TS8 I 05-08-1637 Yes
LTC2361ITS8#TRPBF SOT-23 TS8 I 05-08-1637 Yes


LTC2361 Package Drawing
LTC2361 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
LTC2361CS6#PBF SOT-23 C $2.21 Yes
LTC2361CS6#TRMPBF SOT-23 C $2.21 $1.60 Yes
LTC2361CS6#TRPBF SOT-23 C $1.55 Yes
LTC2361CTS8#PBF SOT-23 C $2.43 Yes
LTC2361CTS8#TRMPBF SOT-23 C $2.43 $1.75 Yes
LTC2361CTS8#TRPBF SOT-23 C $1.70 Yes
LTC2361HS6#PBF SOT-23 H $2.80 Yes
LTC2361HS6#TRMPBF SOT-23 H $2.80 $2.01 Yes
LTC2361HS6#TRPBF SOT-23 H $1.96 Yes
LTC2361HTS8#PBF SOT-23 H $3.07 Yes
LTC2361HTS8#TRMPBF SOT-23 H $3.07 $2.20 Yes
LTC2361HTS8#TRPBF SOT-23 H $2.15 Yes
LTC2361IS6#PBF SOT-23 I $2.55 Yes
LTC2361IS6#TRMPBF SOT-23 I $2.55 $1.83 Yes
LTC2361IS6#TRPBF SOT-23 I $1.78 Yes
LTC2361ITS8#PBF SOT-23 I $2.79 Yes
LTC2361ITS8#TRMPBF SOT-23 I $2.79 $2.01 Yes
LTC2361ITS8#TRPBF SOT-23 I $1.96 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
DC1190A-D LTC2361 Demo Board | 12-bit, 250ksps SAR ADC (req DC590B for DC apps, DC890B for AC apps) $50.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

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
LTC2361HS6#PBF SOT-23 H $2.80 Yes
LTC2361HS6#TRMPBF SOT-23 H $2.80 $2.01 Yes
LTC2361HS6#TRPBF SOT-23 H $1.96 Yes
LTC2361HTS8#PBF SOT-23 H $3.07 Yes
LTC2361HTS8#TRMPBF SOT-23 H $3.07 $2.20 Yes
LTC2361HTS8#TRPBF SOT-23 H $2.15 Yes
LTC2361IS6#PBF SOT-23 I $2.55 Yes
LTC2361IS6#TRMPBF SOT-23 I $2.55 $1.83 Yes
LTC2361IS6#TRPBF SOT-23 I $1.78 Yes
LTC2361ITS8#PBF SOT-23 I $2.79 Yes
LTC2361ITS8#TRMPBF SOT-23 I $2.79 $2.01 Yes
LTC2361ITS8#TRPBF SOT-23 I $1.96 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

  • Communication Systems
  • Data Acquisition Systems
  • Handheld Portable Devices
  • Uninterrupted Power Supplies
  • Battery-Operated Systems
  • Automotive

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 LTC2366 - Linduino Header File

/*!
LTC2360-12: 12-Bit, 100Ksps ADC.
LTC2361-12: 12-Bit, 250Ksps ADC.
LTC2362-12: 12-Bit, 500Ksps ADC
LTC2365-12: 12-Bit, 1Msps ADC
LTC2366-12: 12-Bit, 3Msps ADC

@verbatim

The following parts (DUT) are pin-compatible, 12-bit A/D converters with serial I/O, and an internal reference:
LTC2360-12: 12-Bit, 100Ksps ADC.
LTC2361-12: 12-Bit, 250Ksps ADC.
LTC2362-12: 12-Bit, 500Ksps ADC
LTC2365-12: 12-Bit, 1Msps ADC
LTC2366-12: 12-Bit, 3Msps ADC

The DUTs typically draw only TBDmA from a single 5V supply. The automatic nap and sleep modes benefit power sensitive applications. 

The DUTs DC performance is outstanding with a +/-2LSB INL specification and 
no missing codes over temperature. The signal-to-noise ratio (SNR) for the DUT is typically TBDdB, with the internal reference. 

Example Code:

Read ADC input.

    LTC2366_read(LTC2366_CS, &adc_code);   // Throws out last reading
    LTC2366_read(LTC2366_CS, &adc_code);   // Obtains the current reading and stores to adc_code variable

    // Convert adc_code to voltage
    adc_voltage = LTC2366_code_to_voltage(adc_code, vref);

@endverbatim

http://www.linear.com/product/LTC2360-12
http://www.linear.com/product/LTC2361-12
http://www.linear.com/product/LTC2362-12
http://www.linear.com/product/LTC2365-12
http://www.linear.com/product/LTC2366-12

http://www.linear.com/product/LTC2360-12#demoboards
http://www.linear.com/product/LTC2361-12#demoboards
http://www.linear.com/product/LTC2362-12#demoboards
http://www.linear.com/product/LTC2365-12#demoboards
http://www.linear.com/product/LTC2366-12#demoboards

REVISION HISTORY
$Revision: 1807 $
$Date: 2013-07-29 13:06:06 -0700 (Mon, 29 Jul 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 LTC2366
    Header for LTC2366: 12-bit 3Msps ADC
*/

#ifndef LTC2366_H
#define LTC2366_H

#include <SPI.h>

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

//! @name LTC2366 Channel Address
//! @{
// Channel Address
#define LTC2366_ADDRESS             0x00
//!@}


//! Reads the LTC2366 and returns 32-bit data in offset binary format
//! @return void
void LTC2366_read(uint8_t cs,           //!< Chip Select Pin 
                  uint16_t *ptr_adc_code    //!< Returns code read from ADC (from previous conversion)
                 );


//! Calculates the LTC2366 input voltage given the binary data and lsb weight.
//! @return Floating point voltage
float LTC2366_code_to_voltage(uint16_t adc_code,                   //!< Raw ADC code 
						   	float vref							//!< Reference voltage
							);

#endif  //  LTC2366_H


Download LTC2366 - DC1190A Linduino .INO File

/*!
Linear Technology DC1190A Demonstration Board.
LTC2360-12: 12-Bit, 100Ksps ADC.
LTC2361-12: 12-Bit, 250Ksps ADC.
LTC2362-12: 12-Bit, 500Ksps ADC
LTC2365-12: 12-Bit, 1Msps ADC
LTC2366-12: 12-Bit, 3Msps ADC

@verbatim

NOTES
  Setup:
   Set the terminal baud rate to 115200 and select the newline terminator.
   Equipment required is a precision voltage source (null box) and a precision voltmeter (to monitor voltage source).
   No external power supply is required.
   Ensure JP1 is installed in the default position from the factory.

  How to test:
   The voltage source should be connected with positive and negative leads to the positive & negative ADC inputs. Ensure the differential voltage is within the
   range of -VREF to +VREF. 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/LTC2360-12
http://www.linear.com/product/LTC2361-12
http://www.linear.com/product/LTC2362-12
http://www.linear.com/product/LTC2365-12
http://www.linear.com/product/LTC2366-12

http://www.linear.com/product/LTC2360-12#demoboards
http://www.linear.com/product/LTC2361-12#demoboards
http://www.linear.com/product/LTC2362-12#demoboards
http://www.linear.com/product/LTC2365-12#demoboards
http://www.linear.com/product/LTC2366-12#demoboards

REVISION HISTORY
$Revision: 1792 $
$Date: 2013-08-9 13:58:53 -0700 (Thu, 25 Jul 2013) $2366

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

#include <Arduino.h>
#include <stdint.h>
#include "Linduino.h"
#include "LT_SPI.h"
#include "UserInterface.h"
#include "LT_I2C.h"
#include "QuikEval_EEPROM.h"
#include "LTC2366.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 menu_1_read_input();
void menu_2_select_vref();

// Global variables
static uint8_t LTC2366_bits = 12;                   //!< Default set for 12 bits
float LTC2366_vref = 2.5;            //!< Default set for 2.5V with JP1 in the 2.5V position


//! Initialize Linduino
void setup()
{
  uint32_t adc_code; 
  quikeval_I2C_init();           // Configure the EEPROM I2C port for 100kHz
  quikeval_SPI_init();           // Configure the spi port for 4MHz SCK
  quikeval_SPI_connect();        // Connect SPI to main data port
  Serial.begin(115200);          // Initialize the serial port to the PC
  print_title();
  print_prompt();
  quikeval_SPI_connect();       //Initialize for SPI
}


//! Repeats Linduino loop
void loop()
{
  uint16_t user_command;
  {
    if (Serial.available())
    {
      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:
          menu_1_read_input();
          break;
          default:
          Serial.println("  Invalid Option");
          break;
      }
      Serial.println();
      print_prompt();
    }
  }
}


// Function Definitions
//! Read channel
//! @return void
void menu_1_read_input()
{
  uint8_t user_command;
  uint16_t adc_code =0;                           // The LTC2366 code
  uint16_t display_code;
  float adc_voltage;                               // The LTC2366 voltage
    
    // Read and display a selected channel
    LTC2366_read(LTC2366_CS, &adc_code);  //discard the first reading
    delay(100);
    LTC2366_read(LTC2366_CS, &adc_code);
    
    display_code = adc_code >> (16 - LTC2366_bits - 2);  //the data is left justified to bit_13 of a 16 bit word
    display_code = display_code & 0xFFF;   
    
    Serial.print(F("  Received Code: b"));
    Serial.println(display_code, BIN);
       
  // Convert the received code to voltage 
    adc_voltage = LTC2366_code_to_voltage(adc_code, LTC2366_vref); 
          
    Serial.print(F("  Equivalent voltage: "));
    Serial.print(adc_voltage, 4);
    Serial.println(F("V"));
    Serial.println();
}



//! Prints the title block when program first starts.
void print_title()
{
  Serial.println();
  Serial.println(F("*****************************************************************"));
  Serial.println(F("* DC1190A Demonstration Program                                 *"));
  Serial.println(F("*                                                               *"));
  Serial.println(F("* This program demonstrates how to receive data                 *"));
  Serial.println(F("* from the following ADCs:                                      *"));
  Serial.println(F("*   LTC2360-12                                                  *"));
  Serial.println(F("*   LTC2361-12                                                  *"));
  Serial.println(F("*   LTC2362-12                                                  *"));
  Serial.println(F("*   LTC2365-12                                                  *"));
  Serial.println(F("*   LTC2366-12                                                  *"));
  Serial.println(F("*                                                               *"));
  Serial.println(F("* Set the baud rate to 115200 and select the newline terminator.*"));
  Serial.println(F("*                                                               *"));
  Serial.println(F("*****************************************************************"));
}


//! Prints main menu.
void print_prompt()
{
  Serial.println(F("*************************"));
  Serial.println(F("1-Read ADC Input"));
  Serial.print(F("Enter a command:  "));
}

Download LTC2366 - Linduino.CPP File

/*!
LTC2360-12: 12-Bit, 100Ksps ADC.
LTC2361-12: 12-Bit, 250Ksps ADC.
LTC2362-12: 12-Bit, 500Ksps ADC
LTC2365-12: 12-Bit, 1Msps ADC
LTC2366-12: 12-Bit, 3Msps ADC

@verbatim

The following parts (DUT) are pin-compatible, 12-bit A/D converters with serial I/O, and an internal reference:
LTC2360-12: 12-Bit, 100Ksps ADC.
LTC2361-12: 12-Bit, 250Ksps ADC.
LTC2362-12: 12-Bit, 500Ksps ADC
LTC2365-12: 12-Bit, 1Msps ADC
LTC2366-12: 12-Bit, 3Msps ADC

The DUTs typically draw only TBDmA from a single 5V supply. The automatic nap and sleep modes benefit power sensitive applications. 

The DUTs DC performance is outstanding with a +/-2LSB INL specification and 
no missing codes over temperature. The signal-to-noise ratio (SNR) for the DUT is typically TBDdB, with the internal reference. 

@endverbatim

http://www.linear.com/product/LTC2360-12
http://www.linear.com/product/LTC2361-12
http://www.linear.com/product/LTC2362-12
http://www.linear.com/product/LTC2365-12
http://www.linear.com/product/LTC2366-12

http://www.linear.com/product/LTC2360-12#demoboards
http://www.linear.com/product/LTC2361-12#demoboards
http://www.linear.com/product/LTC2362-12#demoboards
http://www.linear.com/product/LTC2365-12#demoboards
http://www.linear.com/product/LTC2366-12#demoboards

REVISION HISTORY
$Revision: 1785 $
$Date: 2013-07-25 08:47:24 -0700 (Thu, 25 Jul 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 LTC2366 LTC2366: 12-Bit 3Msps ADC

/*! @file
    @ingroup LTC2366
    Library for LTC2366: 12-Bit 3Msps ADC
*/

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


// Reads the ADC  and returns 16-bit data
void LTC2366_read(uint8_t cs, uint16_t *ptr_adc_code)
{
  uint16_t dummy_command = 0;

  spi_transfer_word(cs, dummy_command, ptr_adc_code);  
 
  return;

}


// Calculates the voltage corresponding to an adc code in offset binary, given the reference voltage (in volts)
float LTC2366_code_to_voltage(uint16_t adc_code, float vref)
{
  float voltage;

  adc_code = adc_code << 2;  //the data is left justified to bit_13 of a 16 bit word

  voltage = (float)adc_code;	
  voltage = voltage / (pow(2,16)-1);    //! 2) This calculates the input as a fraction of the reference voltage (dimensionless)
  voltage = voltage * vref;           //! 3) Multiply fraction by Vref to get the actual voltage at the input (in volts)

  return(voltage);
}

Technical Support