| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions
LTC2305.cpp File Reference
Analog-to-Digital Converters (ADC) » LTC2305: 2-channel, 12-Bit SAR ADC with I2C interface

Library for LTC2305: 2-channel, 12-Bit SAR ADC with I2C interface. More...

## Detailed Description

Library for LTC2305: 2-channel, 12-Bit SAR ADC with I2C interface.

Definition in file LTC2305.cpp.

Go to the source code of this file.

## Functions
int8_t | LTC2305_read (uint8_t i2c_address, uint8_t adc_command, uint16_t *ptr_adc_code)
| Reads 12-bit code from LTC2305, programs channel and mode for next conversion. More...
float | LTC2305_code_to_voltage (uint16_t adc_code, float vref, uint8_t uni_bipolar)
| Calculates the LTC2305 input voltage. More...

## Function Documentation

## ◆ LTC2305_code_to_voltage()

float LTC2305_code_to_voltage | ( | uint16_t | adc_code,
|  | float | LTC2305_vref,
|  | uint8_t | uni_bipolar
| ) |  |

Calculates the LTC2305 input voltage.

Returns
  Calculated voltage

Parameters

  adc_code | Code read from ADC
  vref | LSB value (volts)

Definition at line 103 of file LTC2305.cpp.

## ◆ LTC2305_read()

int8_t LTC2305_read | ( | uint8_t | i2c_address,
|  | uint8_t | adc_command,
|  | uint16_t * | ptr_adc_code
| ) |  |

Reads 12-bit code from LTC2305, programs channel and mode for next conversion.

Returns
  Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Parameters

  i2c_address | I2C address of device
  adc_command | ADC command / address bits
  ptr_adc_code | Returns code read from ADC

Definition at line 86 of file LTC2305.cpp.