151 #define LTC2484_CS QUIKEVAL_CS 157 #define LTC2484_ENABLE 0x80 158 #define LTC2484_DISABLE 0x00 160 #define LTC2484_EXTERNAL_INPUT 0x00 161 #define LTC2484_TEMPERATURE_INPUT 0x08 163 #define LTC2484_REJECTION_50HZ_60HZ 0x00 164 #define LTC2484_REJECTION_50HZ 0x02 165 #define LTC2484_REJECTION_60HZ 0x04 167 #define LTC2484_AUTO_CALIBRATION 0x00 168 #define LTC2484_SPEED_2X 0x01 178 uint16_t miso_timeout
static uint8_t adc_command
void LTC2484_cal_voltage(int32_t zero_code, int32_t fs_code, float zero_voltage, float fs_voltage, float *LTC2484_lsb, int32_t *LTC2484_offset_code)
Calibrate the lsb.
void LTC2484_cal_temperature(int32_t adc_code, float temperature, float *LTC2484_t0, float *LTC2484_r0)
Calibrate temperature.
static float LTC2484_t0
Nominal temperature.
static int32_t LTC2484_offset_code
Ideal offset.
static float LTC2484_r0
ADC code at the nominal temperature (420mV default)
float LTC2484_code_to_voltage(int32_t adc_code, float LTC2484_lsb, int32_t LTC2484_offset_code)
Calculates the LTC2484 input bipolar voltage.
static float LTC2484_lsb
Ideal LSB size, 5V/(2^29) for a 5V reference.
void LTC2484_read(uint8_t cs, uint8_t adc_command, int32_t *adc_code)
Read LTC2484 result, program configuration for next conversion.
int8_t LTC2484_EOC_timeout(uint8_t cs, uint16_t miso_timeout)
Checks for EOC with a specified timeout.
float LTC2484_temperature(int32_t adc_code, float LTC2484_t0, float LTC2484_r0)
Calculate the LTC2484 temperature.