| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions
LTC2418.cpp File Reference
Analog-to-Digital Converters (ADC) » LTC2418: 16-Channel 24-Bit No Latency Delta-Sigma ADC

Library for LTC2418: 16-Channel 24-Bit No Latency Delta-Sigma ADC. More...

## Detailed Description

Library for LTC2418: 16-Channel 24-Bit No Latency Delta-Sigma ADC.

Definition in file LTC2418.cpp.

Go to the source code of this file.

## Functions
int8_t | LTC2418_EOC_timeout (uint8_t cs, uint16_t miso_timeout)
| Checks for EOC with a specified timeout. More...
void | LTC2418_read (uint8_t cs, uint8_t adc_command, uint32_t *adc_code)
| Reads the LTC2418 result and programs the configuration for the next conversion. More...
float | LTC2418_code_to_voltage (int32_t adc_code, float LTC2418_lsb, int32_t LTC2418_offset_code)
| Calculates the LTC2418 input bipolar voltage. More...
void | LTC2418_cal_voltage (int32_t zero_code, int32_t fs_code, float zero_voltage, float fs_voltage, float *LTC2418_lsb, int32_t *LTC2418_offset_code)
| Calibrate the lsb. More...

## Function Documentation

## ◆ LTC2418_cal_voltage()

void LTC2418_cal_voltage | ( | int32_t | zero_code,
|  | int32_t | fs_code,
|  | float | zero_voltage,
|  | float | fs_voltage,
|  | float * | LTC2418_lsb,
|  | int32_t * | LTC2418_offset_code
| ) |  |

Calibrate the lsb.

Returns
  Void

Parameters

  zero_code | Offset (Code)
  fs_code | Code measured with full-scale input applied
  zero_voltage | Measured zero voltage
  fs_voltage | Measured full-scale voltage
  LTC2418_lsb | Returns LSB value (volts)
  LTC2418_offset_code | Returns Offset (Code)

Definition at line 117 of file LTC2418.cpp.

## ◆ LTC2418_code_to_voltage()

float LTC2418_code_to_voltage | ( | int32_t | adc_code,
|  | float | LTC2418_lsb,
|  | int32_t | LTC2418_offset_code
| ) |  |

Calculates the LTC2418 input bipolar voltage.

Returns
  Calculated voltage

Parameters

  adc_code | Raw ADC code
  LTC2418_lsb | LSB value (volts)
  LTC2418_offset_code | Offset (Code)

Definition at line 107 of file LTC2418.cpp.

## ◆ LTC2418_EOC_timeout()

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

Checks for EOC with a specified timeout.

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

Parameters

  cs | Chip Select pin
  miso_timeout | Timeout (ms)

Definition at line 73 of file LTC2418.cpp.

## ◆ LTC2418_read()

void LTC2418_read | ( | uint8_t | cs,
|  | uint8_t | adc_command,
|  | uint32_t * | adc_code
| ) |  |

Reads the LTC2418 result and programs the configuration for the next conversion.

Returns
  void

Parameters

  cs | Chip Select pin
  adc_command | Command byte
  adc_code | Returns raw 32-bit code read from ADC

Definition at line 92 of file LTC2418.cpp.