84 #define LTC2373_CS QUIKEVAL_CS 87 #define I2C_ADDRESS 0x20 //I2C address in 7 bit format 88 #define I2C_COMMAND 0x80 //Command to write to bus extender 89 #define LTC2373_SEQUENCER_BIT 0x80 94 #define LTC2373_CH0 0x40 95 #define LTC2373_CH1 0x48 96 #define LTC2373_CH2 0x50 97 #define LTC2373_CH3 0x58 98 #define LTC2373_CH4 0x60 99 #define LTC2373_CH5 0x68 100 #define LTC2373_CH6 0x70 101 #define LTC2373_CH7 0x78 103 #define LTC2373_CH0_1 0x00 104 #define LTC2373_CH1_0 0x20 106 #define LTC2373_CH2_3 0x08 107 #define LTC2373_CH3_2 0x28 109 #define LTC2373_CH4_5 0x10 110 #define LTC2373_CH5_4 0x30 112 #define LTC2373_CH6_7 0x18 113 #define LTC2373_CH7_6 0x38 119 #define LTC2373_RANGE_UNIPOLAR 0x00 120 #define LTC2373_RANGE_BIPOLAR 0x02 121 #define LTC2373_RANGE_DIFF_UNIPOLAR 0x04 122 #define LTC2373_RANGE_DIFF_BIPOLAR 0x06 125 #define LTC2373_NO_COMPRESSION 0x00 126 #define LTC2373_GAIN_COMPRESSION 0x01 131 uint8_t ch_designate,
132 uint8_t range_select,
133 uint8_t gain_compression
141 uint32_t *ptr_adc_code
static uint8_t adc_command
void LTC2373_configure(uint8_t cs, uint32_t adc_command)
Configures the LTC2373.
void LTC2373_read(uint8_t cs, uint8_t adc_command, uint32_t *ptr_adc_code)
Reads the LTC2373 and returns 32-bit data.
uint8_t LTC2373_build_command(uint8_t sequencer_bit, uint8_t ch_designate, uint8_t range_select, uint8_t gain_compression)
float LTC2373_code_to_voltage(uint8_t adc_command, uint32_t adc_code, float vref)
Calculates the LTC2373 input voltage given the binary data and lsb weight.