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...

Detailed Description

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...
 

Function Documentation

◆ LTC2449_cal_voltage()

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.

Returns
Void
Parameters
zero_codeMeasured code with the inputs shorted to ground
fs_codeMeasured code at nearly full-scale
zero_voltageMeasured zero voltage
fs_voltageVoltage measured at input (with voltmeter) when fs_code was read from adc
LTC2449_lsbOverwritten with lsb weight (in volts)
LTC2449_offset_codeOverwritten with offset code (zero code)

Definition at line 136 of file LTC2449.cpp.

◆ LTC2449_code_to_voltage()

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).

Returns
Returns voltage calculated from ADC code.
Parameters
adc_codeCode read from adc
LTC2449_lsbLSB weight (in volts)
LTC2449_offset_codeThe 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.

◆ LTC2449_EOC_timeout()

int8_t LTC2449_EOC_timeout ( uint8_t  cs,
uint16_t  miso_timeout 
)

Define the SPI CS pin.

Checks for EOC with a specified timeout.

Parameters
csChip Select pin
miso_timeoutTimeout (in milliseconds)

Definition at line 86 of file LTC2449.cpp.

◆ LTC2449_read()

void LTC2449_read ( uint8_t  cs,
uint16_t  adc_command,
uint32_t *  adc_code 
)

Reads from LTC2449.

Returns
void
Parameters
csChip Select pin
adc_command2 byte command written to LTC2449
adc_code4 byte conversion code read from LTC2449

Definition at line 107 of file LTC2449.cpp.