![]() |
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...
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... | |
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.
cs | Chip Select pin |
adc_channel | Returns channel number read. |
code | Returns the ADC code read. |
Definition at line 98 of file LTC2422.cpp.
void LTC2422_calculate_lsb | ( | float | LTC2422_reference_voltage, |
float * | LTC2422_lsb | ||
) |
Calculates the lsb weight from the given reference voltage.
LTC2422_reference_voltage | Measured reference voltage. |
LTC2422_lsb | Overwritten with the lsb weight in volts. |
Definition at line 128 of file LTC2422.cpp.
float LTC2422_code_to_voltage | ( | int32_t | adc_code, |
float | LTC2422_lsb | ||
) |
Calculates the voltage given the ADC code and lsb weight.
adc_code | ADC code read from LTC2422. |
LTC2422_lsb | LSB weight (determined by reference voltage). |
Definition at line 119 of file LTC2422.cpp.
uint8_t LTC2422_EOC_timeout | ( | uint8_t | cs, |
uint16_t | miso_timeout | ||
) |
Checks for EOC with a specified timeout.
cs | Chip Select pin |
miso_timeout | Timeout (ms) |
Definition at line 76 of file LTC2422.cpp.