![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Library for LTC2449: 24-Bit, 16-Channel Delta Sigma ADCs with Selectable Speed/Resolution. More...
Library for LTC2449: 24-Bit, 16-Channel Delta Sigma ADCs with Selectable Speed/Resolution.
Definition in file LTC2449.cpp.
Go to the source code of this file.
Functions | |
int8_t | LTC2449_EOC_timeout (uint8_t cs, uint16_t miso_timeout) |
Define the SPI CS pin. More... | |
void | LTC2449_read (uint8_t cs, uint16_t adc_command, uint32_t *adc_code) |
Reads from LTC2449. More... | |
float | LTC2449_code_to_voltage (int32_t adc_code, float LTC2449_lsb, int32_t LTC2449_offset_code) |
Calculates the voltage corresponding to an adc code, given lsb weight (in volts) and the calibrated ADC offset code (zero code that is subtracted from adc_code). More... | |
void | LTC2449_cal_voltage (int32_t zero_code, int32_t fs_code, float zero_voltage, float fs_voltage, float *LTC2449_lsb, int32_t *LTC2449_offset_code) |
Calculate the lsb weight and offset code given a full-scale code and a measured zero-code. More... | |
void LTC2449_cal_voltage | ( | int32_t | zero_code, |
int32_t | fs_code, | ||
float | zero_voltage, | ||
float | fs_voltage, | ||
float * | LTC2449_lsb, | ||
int32_t * | LTC2449_offset_code | ||
) |
Calculate the lsb weight and offset code given a full-scale code and a measured zero-code.
zero_code | Measured code with the inputs shorted to ground |
fs_code | Measured code at nearly full-scale |
zero_voltage | Measured zero voltage |
fs_voltage | Voltage measured at input (with voltmeter) when fs_code was read from adc |
LTC2449_lsb | Overwritten with lsb weight (in volts) |
LTC2449_offset_code | Overwritten with offset code (zero code) |
Definition at line 136 of file LTC2449.cpp.
float LTC2449_code_to_voltage | ( | int32_t | adc_code, |
float | LTC2449_lsb, | ||
int32_t | LTC2449_offset_code | ||
) |
Calculates the voltage corresponding to an adc code, given lsb weight (in volts) and the calibrated ADC offset code (zero code that is subtracted from adc_code).
adc_code | Code read from adc |
LTC2449_lsb | LSB weight (in volts) |
LTC2449_offset_code | The calibrated offset code (This is the adc code zero code that will be subtraced from adc_code) |
Definition at line 127 of file LTC2449.cpp.
int8_t LTC2449_EOC_timeout | ( | uint8_t | cs, |
uint16_t | miso_timeout | ||
) |
Define the SPI CS pin.
Checks for EOC with a specified timeout.
cs | Chip Select pin |
miso_timeout | Timeout (in milliseconds) |
Definition at line 86 of file LTC2449.cpp.
void LTC2449_read | ( | uint8_t | cs, |
uint16_t | adc_command, | ||
uint32_t * | adc_code | ||
) |
Reads from LTC2449.
cs | Chip Select pin |
adc_command | 2 byte command written to LTC2449 |
adc_code | 4 byte conversion code read from LTC2449 |
Definition at line 107 of file LTC2449.cpp.