Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Library for LTC2309: 8-channel, 12-Bit SAR ADC with I2C interface. More...

Detailed Description

Library for LTC2309: 8-channel, 12-Bit SAR ADC with I2C interface.

Definition in file LTC2309.cpp.

Go to the source code of this file.

Functions

int8_t LTC2309_read (uint8_t i2c_address, uint8_t adc_command, uint16_t *ptr_adc_code)
 Reads 12-bit code from LTC2309, programs channel and mode for next conversion. More...
 
float LTC2309_code_to_voltage (uint16_t adc_code, float vref, uint8_t uni_bipolar)
 Calculates the LTC2309 input voltage. More...
 

Function Documentation

◆ LTC2309_code_to_voltage()

float LTC2309_code_to_voltage ( uint16_t  adc_code,
float  LTC2309_vref,
uint8_t  uni_bipolar 
)

Calculates the LTC2309 input voltage.

Returns
Calculated voltage
Parameters
adc_codeCode read from ADC
vrefLSB value (volts)

Definition at line 106 of file LTC2309.cpp.

◆ LTC2309_read()

int8_t LTC2309_read ( uint8_t  i2c_address,
uint8_t  adc_command,
uint16_t *  ptr_adc_code 
)

Reads 12-bit code from LTC2309, 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_addressI2C address of device
adc_commandADC command / address bits
ptr_adc_codeReturns code read from ADC

Definition at line 89 of file LTC2309.cpp.