| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Macros
LTC2498.h File Reference
Analog-to-Digital Converters (ADC) » LTC2498: 24-Bit, 16-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation

LTC2498: 24-Bit, 16-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation. More...

## Detailed Description

LTC2498: 24-Bit, 16-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation.

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

    SPI DATA FORMAT (MSB First):

                Byte #1                            Byte #2

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

    Byte #3                        Byte #4
    D15 D14 D13 D12 D11 D10 D9 D8  D7 D6 D5 D4 *D3 *D2 *D1 *D0
    X   X   X   X   X   X   X  X   X  X  X  X   X  X   X   X

    !EOC : End of Conversion Bit (Active Low)
    DMY  : Dummy Bit (Always 0)
    SIG  : Sign Bit (1-data positive, 0-data negative)
    Dx   : Data Bits
    *Dx  : Data Bits Below lsb
    EN   : Enable Bit (0-keep previous mode, 1-change mode)
    SGL  : Enable Single-Ended Bit (0-differential, 1-single-ended)
    OS   : ODD/Sign Bit
    Ax   : Address Select Bit
    IM   : Internal Temperature Sensor Bit(0-ADC , 1-Temperature Sensor)
    Fx   : Frequency Rejection Bits
    SPD  : Speed Mode Bit (0-1x, 1-2x)

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

    Command Byte #1
    1    0    EN   SGL  OS   S2   S1   S0   Comments
    1    0    0    X    X    X    X    X    Keep Previous Mode
    1    0    1    0    X    X    X    X    Differential Mode
    1    0    1    1    X    X    X    X    Single-Ended Mode

    Example Code:

    Read Channel 0 in Single-Ended

        uint16_t miso_timeout = 1000;
        adc_command = LTC2498_CH0 | LTC2498_OSR_32768 | LTC2498_SPEED_2X;   // Build ADC command for channel 0
                                                                            // OSR = 32768*2 = 65536

        if(LTC2498_EOC_timeout(LTC2498_CS, miso_timeout))    // Check for EOC
            return;                                          // Exit if timeout is reached
        LTC2498_read(LTC2498_CS, adc_command, &adc_code);    // Throws out last reading

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

        // Convert adc_code to voltage
        adc_voltage = LTC2498_code_to_voltage(adc_code, LTC2498_lsb, LTC2498_offset_code);

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

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

Copyright 2018(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- 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.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
- The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
- Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, 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.

Header for LTC2498: 24-Bit, 16-Channel Delta Sigma ADCs with Selectable Speed/Resolution

Definition in file LTC2498.h.

Go to the source code of this file.

## Functions
int8_t | LTC2498_EOC_timeout (uint8_t cs, uint16_t miso_timeout)
| Checks for EOC with a specified timeout. More...
void | LTC2498_read (uint8_t cs, uint8_t adc_command_high, uint8_t adc_command_low, int32_t *adc_code)
| Reads from LTC2498. More...
float | LTC2498_code_to_voltage (int32_t adc_code, float vref)
| Calculates the voltage corresponding to an adc code, given the reference (in volts) More...

## Macros
#define | LTC2498_CS QUIKEVAL_CS
| Define the SPI CS pin. More...
Mode Configuration
#define | LTC2498_KEEP_PREVIOUS_MODE LTC24XX_HS_MULTI_KEEP_PREVIOUS_MODE
#define | LTC2498_KEEP_PREVIOUS_SPEED_RESOLUTION LTC24XX_HS_MULTI_KEEP_PREVIOUS_SPEED_RESOLUTION
#define | LTC2498_SPEED_1X LTC24XX_HS_MULTI_SPEED_1X
#define | LTC2498_SPEED_2X LTC24XX_HS_MULTI_SPEED_2X
#define | LTC2498_INTERNAL_TEMP 0xC0
#define | LTC2498_R50 LTC24XX_EZ_MULTI_R50
#define | LTC2498_R60 LTC24XX_EZ_MULTI_R60
#define | LTC2498_R50_R60 LTC24XX_EZ_MULTI_R55
Single-Ended Channels Configuration
#define | LTC2498_CH0 LTC24XX_MULTI_CH_CH0
#define | LTC2498_CH1 LTC24XX_MULTI_CH_CH1
#define | LTC2498_CH2 LTC24XX_MULTI_CH_CH2
#define | LTC2498_CH3 LTC24XX_MULTI_CH_CH3
#define | LTC2498_CH4 LTC24XX_MULTI_CH_CH4
#define | LTC2498_CH5 LTC24XX_MULTI_CH_CH5
#define | LTC2498_CH6 LTC24XX_MULTI_CH_CH6
#define | LTC2498_CH7 LTC24XX_MULTI_CH_CH7
#define | LTC2498_CH8 LTC24XX_MULTI_CH_CH8
#define | LTC2498_CH9 LTC24XX_MULTI_CH_CH9
#define | LTC2498_CH10 LTC24XX_MULTI_CH_CH10
#define | LTC2498_CH11 LTC24XX_MULTI_CH_CH11
#define | LTC2498_CH12 LTC24XX_MULTI_CH_CH12
#define | LTC2498_CH13 LTC24XX_MULTI_CH_CH13
#define | LTC2498_CH14 LTC24XX_MULTI_CH_CH14
#define | LTC2498_CH15 LTC24XX_MULTI_CH_CH15
Differential Channel Configuration
#define | LTC2498_P0_N1 LTC24XX_MULTI_CH_P0_N1
#define | LTC2498_P1_N0 LTC24XX_MULTI_CH_P1_N0
#define | LTC2498_P2_N3 LTC24XX_MULTI_CH_P2_N3
#define | LTC2498_P3_N2 LTC24XX_MULTI_CH_P3_N2
#define | LTC2498_P4_N5 LTC24XX_MULTI_CH_P4_N5
#define | LTC2498_P5_N4 LTC24XX_MULTI_CH_P5_N4
#define | LTC2498_P6_N7 LTC24XX_MULTI_CH_P6_N7
#define | LTC2498_P7_N6 LTC24XX_MULTI_CH_P7_N6
#define | LTC2498_P8_N9 LTC24XX_MULTI_CH_P8_N9
#define | LTC2498_P9_N8 LTC24XX_MULTI_CH_P9_N8
#define | LTC2498_P10_N11 LTC24XX_MULTI_CH_P10_N11
#define | LTC2498_P11_N10 LTC24XX_MULTI_CH_P11_N10
#define | LTC2498_P12_N13 LTC24XX_MULTI_CH_P12_N13
#define | LTC2498_P13_N12 LTC24XX_MULTI_CH_P13_N12
#define | LTC2498_P14_N15 LTC24XX_MULTI_CH_P14_N15
#define | LTC2498_P15_N14 LTC24XX_MULTI_CH_P15_N14

## Function Documentation

## ◆ LTC2498_code_to_voltage()

float LTC2498_code_to_voltage | ( | int32_t | adc_code,
|  | float | vref
| ) |  |

Calculates the voltage corresponding to an adc code, given the reference (in volts)

Returns
  Returns voltage calculated from ADC code.

Parameters

  adc_code | Code read from adc
  vref | VRef (in volts)

Definition at line 85 of file LTC2498.cpp.

## ◆ LTC2498_EOC_timeout()

int8_t LTC2498_EOC_timeout | ( | uint8_t | cs,
|  | uint16_t | miso_timeout
| ) |  |

Checks for EOC with a specified timeout.

Returns
  Returns 0=successful, 1=unsuccessful (exceeded timeout)

Parameters

  cs | Chip Select pin
  miso_timeout | Timeout (in milliseconds)

Definition at line 72 of file LTC2498.cpp.

## ◆ LTC2498_read()

void LTC2498_read | ( | uint8_t | cs,
|  | uint8_t | adc_command_high,
|  | uint8_t | adc_command_low,
|  | int32_t * | adc_code
| ) |  |

Reads from LTC2498.

Parameters

  cs | Chip select
  adc_command_high | High byte command written to LTC2498
  adc_command_low | Low byte command written to LTC2498
  adc_code | 4 byte conversion code read from LTC2498

Definition at line 79 of file LTC2498.cpp.

## Macro Definition Documentation

## ◆ LTC2498_CH0

#define LTC2498_CH0 LTC24XX_MULTI_CH_CH0

Definition at line 138 of file LTC2498.h.

## ◆ LTC2498_CH1

#define LTC2498_CH1 LTC24XX_MULTI_CH_CH1

Definition at line 139 of file LTC2498.h.

## ◆ LTC2498_CH10

#define LTC2498_CH10 LTC24XX_MULTI_CH_CH10

Definition at line 148 of file LTC2498.h.

## ◆ LTC2498_CH11

#define LTC2498_CH11 LTC24XX_MULTI_CH_CH11

Definition at line 149 of file LTC2498.h.

## ◆ LTC2498_CH12

#define LTC2498_CH12 LTC24XX_MULTI_CH_CH12

Definition at line 150 of file LTC2498.h.

## ◆ LTC2498_CH13

#define LTC2498_CH13 LTC24XX_MULTI_CH_CH13

Definition at line 151 of file LTC2498.h.

## ◆ LTC2498_CH14

#define LTC2498_CH14 LTC24XX_MULTI_CH_CH14

Definition at line 152 of file LTC2498.h.

## ◆ LTC2498_CH15

#define LTC2498_CH15 LTC24XX_MULTI_CH_CH15

Definition at line 153 of file LTC2498.h.

## ◆ LTC2498_CH2

#define LTC2498_CH2 LTC24XX_MULTI_CH_CH2

Definition at line 140 of file LTC2498.h.

## ◆ LTC2498_CH3

#define LTC2498_CH3 LTC24XX_MULTI_CH_CH3

Definition at line 141 of file LTC2498.h.

## ◆ LTC2498_CH4

#define LTC2498_CH4 LTC24XX_MULTI_CH_CH4

Definition at line 142 of file LTC2498.h.

## ◆ LTC2498_CH5

#define LTC2498_CH5 LTC24XX_MULTI_CH_CH5

Definition at line 143 of file LTC2498.h.

## ◆ LTC2498_CH6

#define LTC2498_CH6 LTC24XX_MULTI_CH_CH6

Definition at line 144 of file LTC2498.h.

## ◆ LTC2498_CH7

#define LTC2498_CH7 LTC24XX_MULTI_CH_CH7

Definition at line 145 of file LTC2498.h.

## ◆ LTC2498_CH8

#define LTC2498_CH8 LTC24XX_MULTI_CH_CH8

Definition at line 146 of file LTC2498.h.

## ◆ LTC2498_CH9

#define LTC2498_CH9 LTC24XX_MULTI_CH_CH9

Definition at line 147 of file LTC2498.h.

## ◆ LTC2498_CS

#define LTC2498_CS QUIKEVAL_CS

Define the SPI CS pin.

Definition at line 116 of file LTC2498.h.

## ◆ LTC2498_INTERNAL_TEMP

#define LTC2498_INTERNAL_TEMP 0xC0

Definition at line 126 of file LTC2498.h.

## ◆ LTC2498_KEEP_PREVIOUS_MODE

#define LTC2498_KEEP_PREVIOUS_MODE LTC24XX_HS_MULTI_KEEP_PREVIOUS_MODE

Definition at line 122 of file LTC2498.h.

## ◆ LTC2498_KEEP_PREVIOUS_SPEED_RESOLUTION

#define LTC2498_KEEP_PREVIOUS_SPEED_RESOLUTION LTC24XX_HS_MULTI_KEEP_PREVIOUS_SPEED_RESOLUTION

Definition at line 123 of file LTC2498.h.

## ◆ LTC2498_P0_N1

#define LTC2498_P0_N1 LTC24XX_MULTI_CH_P0_N1

Definition at line 158 of file LTC2498.h.

## ◆ LTC2498_P10_N11

#define LTC2498_P10_N11 LTC24XX_MULTI_CH_P10_N11

Definition at line 173 of file LTC2498.h.

## ◆ LTC2498_P11_N10

#define LTC2498_P11_N10 LTC24XX_MULTI_CH_P11_N10

Definition at line 174 of file LTC2498.h.

## ◆ LTC2498_P12_N13

#define LTC2498_P12_N13 LTC24XX_MULTI_CH_P12_N13

Definition at line 176 of file LTC2498.h.

## ◆ LTC2498_P13_N12

#define LTC2498_P13_N12 LTC24XX_MULTI_CH_P13_N12

Definition at line 177 of file LTC2498.h.

## ◆ LTC2498_P14_N15

#define LTC2498_P14_N15 LTC24XX_MULTI_CH_P14_N15

Definition at line 179 of file LTC2498.h.

## ◆ LTC2498_P15_N14

#define LTC2498_P15_N14 LTC24XX_MULTI_CH_P15_N14

Definition at line 180 of file LTC2498.h.

## ◆ LTC2498_P1_N0

#define LTC2498_P1_N0 LTC24XX_MULTI_CH_P1_N0

Definition at line 159 of file LTC2498.h.

## ◆ LTC2498_P2_N3

#define LTC2498_P2_N3 LTC24XX_MULTI_CH_P2_N3

Definition at line 161 of file LTC2498.h.

## ◆ LTC2498_P3_N2

#define LTC2498_P3_N2 LTC24XX_MULTI_CH_P3_N2

Definition at line 162 of file LTC2498.h.

## ◆ LTC2498_P4_N5

#define LTC2498_P4_N5 LTC24XX_MULTI_CH_P4_N5

Definition at line 164 of file LTC2498.h.

## ◆ LTC2498_P5_N4

#define LTC2498_P5_N4 LTC24XX_MULTI_CH_P5_N4

Definition at line 165 of file LTC2498.h.

## ◆ LTC2498_P6_N7

#define LTC2498_P6_N7 LTC24XX_MULTI_CH_P6_N7

Definition at line 167 of file LTC2498.h.

## ◆ LTC2498_P7_N6

#define LTC2498_P7_N6 LTC24XX_MULTI_CH_P7_N6

Definition at line 168 of file LTC2498.h.

## ◆ LTC2498_P8_N9

#define LTC2498_P8_N9 LTC24XX_MULTI_CH_P8_N9

Definition at line 170 of file LTC2498.h.

## ◆ LTC2498_P9_N8

#define LTC2498_P9_N8 LTC24XX_MULTI_CH_P9_N8

Definition at line 171 of file LTC2498.h.

## ◆ LTC2498_R50

#define LTC2498_R50 LTC24XX_EZ_MULTI_R50

Definition at line 129 of file LTC2498.h.

## ◆ LTC2498_R50_R60

#define LTC2498_R50_R60 LTC24XX_EZ_MULTI_R55

Definition at line 131 of file LTC2498.h.

## ◆ LTC2498_R60

#define LTC2498_R60 LTC24XX_EZ_MULTI_R60

Definition at line 130 of file LTC2498.h.

## ◆ LTC2498_SPEED_1X

#define LTC2498_SPEED_1X LTC24XX_HS_MULTI_SPEED_1X

Definition at line 124 of file LTC2498.h.

## ◆ LTC2498_SPEED_2X

#define LTC2498_SPEED_2X LTC24XX_HS_MULTI_SPEED_2X

Definition at line 125 of file LTC2498.h.