| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions
LTC2422.cpp File Reference
Analog-to-Digital Converters (ADC) » LTC2422: 1-/2-Channel 20-Bit uPower No Latency Delta-Sigma ADC in MSOP-10

Library for LLTC2422: 1-/2-Channel 20-Bit uPower No Latency Delta-Sigma ADC in MSOP-10. More...

## Detailed Description

Library for LLTC2422: 1-/2-Channel 20-Bit uPower No Latency Delta-Sigma ADC in MSOP-10.

Definition in file LTC2422.cpp.

Go to the source code of this file.

## Functions
uint8_t | LTC2422_EOC_timeout (uint8_t cs, uint16_t miso_timeout)
| Checks for EOC with a specified timeout. More...
void | LTC2422_adc_read (uint8_t cs, uint8_t *adc_channel, int32_t *code)
| Read ADC code from the LTC2422. More...
float | LTC2422_code_to_voltage (int32_t adc_code, float LTC2422_lsb)
| Calculates the voltage given the ADC code and lsb weight. More...
void | LTC2422_calculate_lsb (float LTC2422_reference_voltage, float *LTC2422_lsb)
| Calculates the lsb weight from the given reference voltage. More...

## Function Documentation

## ◆ LTC2422_adc_read()

void LTC2422_adc_read | ( | uint8_t | cs,
|  | uint8_t * | adc_channel,
|  | int32_t * | code
| ) |  |

Read ADC code from the LTC2422.

Does not wait for end-of-conversion. To automatically wait for conversion to complete, use the LTC2422_EOC_timeout before this function.

Returns
  void

Parameters

  cs | Chip Select pin
  adc_channel | Returns channel number read.
  code | Returns the ADC code read.

Definition at line 98 of file LTC2422.cpp.

## ◆ LTC2422_calculate_lsb()

void LTC2422_calculate_lsb | ( | float | LTC2422_reference_voltage,
|  | float * | LTC2422_lsb
| ) |  |

Calculates the lsb weight from the given reference voltage.

Returns
  Void

Parameters

  LTC2422_reference_voltage | Measured reference voltage.
  LTC2422_lsb | Overwritten with the lsb weight in volts.

Definition at line 128 of file LTC2422.cpp.

## ◆ LTC2422_code_to_voltage()

float LTC2422_code_to_voltage | ( | int32_t | adc_code,
|  | float | LTC2422_lsb
| ) |  |

Calculates the voltage given the ADC code and lsb weight.

Returns
  calculated voltage (based on ADC code and lsb weight).

Parameters

  adc_code | ADC code read from LTC2422.
  LTC2422_lsb | LSB weight (determined by reference voltage).

Definition at line 119 of file LTC2422.cpp.

## ◆ LTC2422_EOC_timeout()

uint8_t LTC2422_EOC_timeout | ( | uint8_t | cs,
|  | uint16_t | miso_timeout
| ) |  |

Checks for EOC with a specified timeout.

Returns
  success or failure on timeout

Parameters

  cs | Chip Select pin
  miso_timeout | Timeout (ms)

Definition at line 76 of file LTC2422.cpp.