Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

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
csChip Select pin
adc_channelReturns channel number read.
codeReturns 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_voltageMeasured reference voltage.
LTC2422_lsbOverwritten 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_codeADC code read from LTC2422.
LTC2422_lsbLSB 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
csChip Select pin
miso_timeoutTimeout (ms)

Definition at line 76 of file LTC2422.cpp.