LTM2893 - 100MHz 隔离型 ADC 串行接口

特点

  • 隔离型接口:6000VRMS (持续 1 分钟)
  • 正待 UL-CSA 标准认可
  • 100MHz SPI 兼容型 I/O
  • 可配置 SPI 字长:8 32
  • 低抖动转换起动 (30psRMS)
  • 支持同时采样的 ADC
  • 只读 (LTM2893),读 / 写 (LTM2893-1)
  • 三个隔离式多路复用器选择信号
  • 1.71V 至 5.5V I/O 电压
  • 3V 至 5.5V 电源电压
  • 可承受高的共模瞬变
  • 15mm x 6.25mm BGA 封装

典型应用

LTM2893 Typical Application

描述

LTM®2893 是一款采用 ADC 控制信号的高速隔离型 μModule (微型模块) SPI 接口。LTM2893 专为隔离 1Msps 高分辨率 18 位 SAR ADC (例如:LTC2338 和相似的器件系列) 而优化,并能够与大多数通用型 ADC 对接。LTM2893-1 专为隔离需要把配置设定值写入 ADC 的 LTC2348 和相似的同时采样 ADC 系列而优化。LTM2893 可隔离转换起动、实施信号采样,并具有非常低的孔径抖动 (30ps) 和低延迟 (20ns)。

接口实现了快的吞吐速率和无周期延迟,从而使 LTM2893 成为众多应用的理想选择。LTM2893 具有一个高速 SPI 兼容型串行端口,可支持 1.71V 至 5.5V 逻辑电压,并能针对具有 8 至 32 位 SPI 字长的 ADC 进行配置。另外,该器件还可隔离用于控制模拟多路复用器或增益设定值的三个选择信号 (SA、SB、SC)。

隔离势垒可耐受逻辑接口与 LTM2893 的隔离侧之间大的电压地变化。在速度高于 50kV/μs 的电压瞬变过程中能保持不间断的通信。

封装

如需了解完整与最新的封装信息及图例,请查阅我们的封装网页

器件型号 封装 Code 温度 封装图 RoHS 数据
LTM2893CY-1#PBF 15mm x 6.25mm x 2.06mm BGA BGA C 05-08-1987 Yes
LTM2893CY#PBF 15mm x 6.25mm x 2.06mm BGA BGA C 05-08-1987 Yes
LTM2893HY-1#PBF 15mm x 6.25mm x 2.06mm BGA BGA H 05-08-1987 Yes
LTM2893HY#PBF 15mm x 6.25mm x 2.06mm BGA BGA H 05-08-1987 Yes
LTM2893IY-1#PBF 15mm x 6.25mm x 2.06mm BGA BGA I 05-08-1987 Yes
LTM2893IY#PBF 15mm x 6.25mm x 2.06mm BGA BGA I 05-08-1987 Yes


LTM2893 Package Drawing

订购信息

  • 以 PBF 结尾的器件型号表示这些是无铅型器件。如需了解有关含铅涂层器件的信息,请与凌力尔特公司联系。

  • 型号当中包含 TR 或 TRM 的器件分别采用卷带装500 片微型卷带装的形式进行装运。

  • 如需了解更多的细节,请查阅我们一般订购信息或产品数据手册。

各种封装型式和定价

器件型号 封装 温度 价格 (以 1 ~ 99 片为批量) 价格 (以 1000 片为批量) * RoHS 数据
LTM2893CY-1#PBF 15mm x 6.25mm x 2.06mm BGA C $12.79 $8.95 Yes
LTM2893CY#PBF 15mm x 6.25mm x 2.06mm BGA C $12.79 $8.95 Yes
LTM2893HY-1#PBF 15mm x 6.25mm x 2.06mm BGA H $16.88 $11.81 Yes
LTM2893HY#PBF 15mm x 6.25mm x 2.06mm BGA H $16.88 $11.81 Yes
LTM2893IY-1#PBF 15mm x 6.25mm x 2.06mm BGA I $14.06 $9.85 Yes
LTM2893IY#PBF 15mm x 6.25mm x 2.06mm BGA I $14.06 $9.85 Yes
购买要求提供样品

* 美国价目表所列之价格仅供预算之用,单位为美元 (针对规定批量的美国 FOB 单价),随时可能变更。国际销售价格有可能因为地方税额、费用和汇率而有所不同。如需了解特定批量的价格或货运报价,请您与凌力尔特当地的销售办事处或授权分销商联系

演示电路板

凌力尔特的演示电路板可免费提供给合资格的客户,请您与当地的销售办事处或分销商联系,申请获取演示电路板。另外,某些演示电路板也可通过信用卡在此网站上购买。演示电路板仅供评估之用。器件在实际终端应用中的正确与可靠运作的验证仍然是客户的责任。

器件型号 描述 价格 Documentation
DC2405A LTM2893 Demo Board | 100MHz SPI uModule Isolator $150.00
购买

Companion Boards

器件型号 描述 价格 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
购买
点击这里查看我们的演示板完整列表

应用

  • 遥感
  • 高速数据采集
  • 工业过程控制
  • 测试和测量设备

产品通知

请登录您的 MyLinear 帐户,以获得数据表更新通知、新文档发布、以及针对您喜爱产品的 LTspice 模型通告。 如果您还没有 MyLinear 帐户,可以立即 注册

忘记密码吗? 请单击这里
需要帮助吗? 如果有任何问题或意见,请发送电子邮件至 mylinear@linear.com

设计工具

Linduino

Linduino 是一款可兼容 Arduino 的平台,其用于开发和分配用于 SPI 和 I2C 兼容型集成电路的固件库和代码。Linduino One 电路板可连接 300 多款 QuikEval 演示板卡并支持多种产品类型,包括模数转换器 (ADC)数模转换器 (DAC)功率监视器等等。用于个别器件的固件库采用 C 语言编写并专为可移植到众多的处理器和微控制器而设计。每个固件库具有一种演示程序,此演示程序可上载至 Linduino One 平台以简便快捷地完成电路和软件的验证。

点击这里以了解 Linduino 的更多相关信息

 

代码

Linduino 是凌力尔特的 Arduino 兼容型系统,适用于开发和分发针对凌力尔特集成电路的固件库和代码范例。下面的代码程序可以下载或者“拷贝并粘贴”到您的设计方案之中。请访问 Linduino 主页以获取演示板、手册和设置信息。

该器件得到了代码支持: 提供了可用于该器件的代码示例。下面的代码有可能依存于完整库中提供的其他驱动程序。

Download LTM2893 - DC2405A.ino File

/*!
Linear Technology DC2405A Demonstration Board.
LTM2893-1: 100MHz ADC SPI Isolator
LTC2328-18: 18-Bit, 1Msps Pseudo-differential input ADC
Max SCK rate is 100MHz.

@verbatim

NOTES
  Setup:
   Set the terminal baud rate to 115200 and select the newline terminator. Equipment
   required is a voltage source (preferably low-noise) and a precision voltmeter.
   Ensure all jumpers on the demo board are installed in their default positions
   from the factory. Refer to Demo Manual DC2405A.

  How to test:
   The voltage source should be connected between inputs AIN and GND2. Ensure both
   inputs are within their specified absolute input voltage range. Ensure the voltage
   source is set within the range of -10.24V to +10.24V (single ended voltage range).
   (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/LTM2893

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

REVISION HISTORY
$Revision: 6427 $
$Date: 2017-01-26 09:26:33 -0800 (Thu, 26 Jan 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 LTM2893
*/

#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 "LTM2893.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_bits();

// Global variables
static uint8_t LTC2328_bits = 18;                   //!< Default set for 18 bits
float LTC2328_vref = 10.24;


//! Initialize Linduino
void setup()
{
  uint32_t adc_code;

  output_high(LTM2893_CSC_PIN);
  pinMode(LTM2893_CSC_PIN, OUTPUT);
  output_high(LTM2893_CSC_PIN);
  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
  output_high(LTM2893_CSC_PIN);
  Serial.begin(115200);          // Initialize the serial port to the PC
  print_title();
  print_prompt();
}


//! 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;
        case 2:
          menu_2_select_bits();
          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;
  int32_t adc_code;                           // The LTC2328 code
  int32_t display_code;
  float adc_voltage;                               // The LTC2328 voltage

  /*
    LTM2893_config(
            LTM2893_UC0_OSCDIV_6
            );

    LTM2893_config(
            LTM2893_UC1_WORDL_24
            );
  */
  // Read and display a selected channel
  //LTM2893_read(LTM2893_CS, &adc_code);  //discard the first reading
  //delay(100);
  LTM2893_read(LTM2893_CS, &adc_code);

  //output_high(LTM2893_CSC_PIN);

  display_code = adc_code >> (24 - LTC2328_bits);
  if (LTC2328_bits == 16)
    display_code = display_code & 0xFFFF;
  else
    display_code = display_code & 0x3FFFF;

  Serial.print(F("  Received Code: b"));
  Serial.println(display_code, BIN);

  // Convert the received code to voltage
  adc_voltage = LTM2893_code_to_voltage(adc_code, LTC2328_vref);

  Serial.print(F("  Equivalent voltage: "));
  Serial.print(adc_voltage, 4);
  Serial.println(F("V"));
}


//! Select number of bits
//! @return void
void menu_2_select_bits()
{
  uint8_t user_command;

  Serial.println();
  if (LTC2328_bits == 16)
    Serial.println(F("  16 bits selected"));
  else
    Serial.println(F("  18 bits selected"));

  Serial.println(F("  16 = 2328-16"));
  Serial.println(F("  18 = 2328-18"));
  Serial.print(F("  Enter a Command, based upon the resolution of the part under test: "));

  user_command = read_int();    // Read user input
  Serial.println(user_command);   // Prints the user command to com port
  switch (user_command)
  {
    case 16:
      LTC2328_bits = 16;
      break;
    case 18:
      LTC2328_bits = 18;
      break;
    default:
      {
        Serial.println("  Invalid Option");
        return;
      }
      break;
  }
}


//! Prints the title block when program first starts.
void print_title()
{
  Serial.println();
  Serial.println(F("*****************************************************************"));
  Serial.println(F("* DC2405A Demonstration Program                                 *"));
  Serial.println(F("*                                                               *"));
  Serial.println(F("* This program demonstrates how to receive data from an         *"));
  Serial.println(F("* isolated LTC2328-18 ADC using the LTM2893 Isolated ADC        *"));
  Serial.println(F("* Serial Interface module.                                      *"));
  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.println(F("2-Select Number of bits (Default is 18 bits)\n"));
  Serial.print(F("Enter a command:"));
}

Download LTM2893 - Linduino CPP File

/*!
LTM2893-1: 100MHz ADC SPI Isolator

@verbatim

@endverbatim

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

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


REVISION HISTORY
$Revision: 6678 $
$Date: 2017-03-09 15:00:06 -0800 (Thu, 09 Mar 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 LTM2893 LTM2893: Isolator for 1Msps ADC
//! @}

/*! @file
    @ingroup LTM2893
    Library for LTM2893: Isolator for 16/18-Bit 1Msps ADC
*/

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


// Reads from a SPI LTM2893-XX device that has no configuration word and a 20 bit output word in 2's complement format.
void LTM2893_read(uint8_t cs, int32_t *ptr_adc_code)
{
  LT_union_int16_2bytes command;    // LTM2893 data and command
  command.LT_uint16 = 0;                // Set to zero, not necessary but avoids
  // random data in scope shots.

//Form a four byte object to hold four bytes of data
  LT_union_int32_4bytes data; //instantiate the union
  data.LT_byte[3] = 0;
  data.LT_byte[2] = 0;
  data.LT_byte[1] = 0;
  data.LT_byte[0] = 0;

  spi_transfer_block(cs,command.LT_byte,data.LT_byte,3);  // read 3 bytes 2893 is setup as 24 bits. overreading will cause a fault.

  *ptr_adc_code = data.LT_int32;

  return;
}

void LTM2893_config(uint8_t user_config)
{
  uint8_t *rx_data;
  spi_transfer_byte(LTM2893_CSC_PIN,user_config,rx_data);
}


// Calculates the voltage corresponding to an adc code in 2's complement, given the reference voltage (in volts)
/*
float LTM2893_code_to_voltage(int32_t adc_code, float vref)
{
  float voltage;
  if (adc_code >= pow(2,23)) {
  voltage = (float)adc_code - pow(2,23);
  voltage = voltage / (pow(2,22)-1);    //! 2) This calculates the input as a fraction of the reference voltage (dimensionless)
  voltage = voltage * -vref - (vref/pow(2,23));           //! 3) Multiply fraction by Vref to get the actual voltage at the input (in volts)
  }
  else {
  voltage = (float)adc_code;
  voltage = voltage / (pow(2,22)-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);
}
*/
float LTM2893_code_to_voltage(int32_t adc_code, float vref)
{
  float voltage;
  if (adc_code >= pow(2,23))
  {
    voltage = (float)adc_code - pow(2,24);
    voltage = voltage / (pow(2,23)-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)
  }
  else
  {
    voltage = (float)adc_code;
    voltage = voltage / (pow(2,23)-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);
}

Download LTM2893 - Linduino Header File

/*!
LTM2893-1: 100MHz ADC SPI Isolator

@verbatim

Example Code:

Read ADC input.

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

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

@endverbatim

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

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

REVISION HISTORY
$Revision: 6678 $
$Date: 2017-03-09 15:00:06 -0800 (Thu, 09 Mar 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 LTM2893
    Header for LTM2893: Interface LTC2328 16/18-bit 1Msps ADC
*/

#ifndef LTM2893_H
#define LTM2893_H

#include <SPI.h>

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

#define LTM2893_CSC_PIN QUIKEVAL_GPIO

//! @name LTM2893 Channel Address
//! @{
// Channel Address
//#define LTM2893_ADDRESS             0x00
//!@}

// UserConfig 0 Register
#define LTM2893_UC0_SA_DIR_ISO2LOGIC (1 << 0)
#define LTM2893_UC0_SB_DIR_ISO2LOGIC (1 << 1)
#define LTM2893_UC0_SC_DIR_ISO2LOGIC (1 << 2)
#define LTM2893_UC0_CRC              (1 << 3)
//- OSCDIV
#define LTM2893_UC0_OSCDIV_100       (0 << 4)
#define LTM2893_UC0_OSCDIV_66        (1 << 4)
#define LTM2893_UC0_OSCDIV_50        (2 << 4)
#define LTM2893_UC0_OSCDIV_40        (3 << 4)
#define LTM2893_UC0_OSCDIV_33        (4 << 4)
#define LTM2893_UC0_OSCDIV_25        (5 << 4)
#define LTM2893_UC0_OSCDIV_12        (6 << 4)
#define LTM2893_UC0_OSCDIV_6         (7 << 4)

// UserConfig 1 Register
//- OSCDIV
#define LTM2893_UC1_WORDL_8          ((0 << 0) | (1 << 7))
#define LTM2893_UC1_WORDL_12         ((1 << 0) | (1 << 7))
#define LTM2893_UC1_WORDL_14         ((2 << 0) | (1 << 7))
#define LTM2893_UC1_WORDL_16         ((3 << 0) | (1 << 7))
#define LTM2893_UC1_WORDL_18         ((4 << 0) | (1 << 7))
#define LTM2893_UC1_WORDL_20         ((5 << 0) | (1 << 7))
#define LTM2893_UC1_WORDL_24         ((6 << 0) | (1 << 7))
#define LTM2893_UC1_WORDL_32         ((7 << 0) | (1 << 7))
//- DEVCNT
#define LTM2893_UC1_DEVCNT_1         ((0 << 3) | (1 << 7))
#define LTM2893_UC1_DEVCNT_2         ((1 << 3) | (1 << 7))
#define LTM2893_UC1_DEVCNT_3         ((2 << 3) | (1 << 7))
#define LTM2893_UC1_DEVCNT_4         ((3 << 3) | (1 << 7))

//! Reads the LTM2893 and returns 32-bit data in 2's complement format
//! @return void
void LTM2893_read(uint8_t cs,           //!< Chip Select Pin
                  int32_t *ptr_adc_code    //!< Returns code read from ADC (from previous conversion)
                 );


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

void LTM2893_config(uint8_t user_config);

#endif  //  LTM2893_H


技术支持