109 #define LTC2309_I2C_ADDRESS 0x08 // LOW LOW 123 #define LTC2309_CH0 0x80 124 #define LTC2309_CH1 0xC0 125 #define LTC2309_CH2 0x90 126 #define LTC2309_CH3 0xD0 127 #define LTC2309_CH4 0xA0 128 #define LTC2309_CH5 0xE0 129 #define LTC2309_CH6 0xB0 130 #define LTC2309_CH7 0xF0 136 #define LTC2309_P0_N1 0x00 137 #define LTC2309_P1_N0 0x40 139 #define LTC2309_P2_N3 0x10 140 #define LTC2309_P3_N2 0x50 142 #define LTC2309_P4_N5 0x20 143 #define LTC2309_P5_N4 0x60 145 #define LTC2309_P6_N7 0x30 146 #define LTC2309_P7_N6 0x70 152 #define LTC2309_SLEEP_MODE 0x04 153 #define LTC2309_EXIT_SLEEP_MODE 0x00 154 #define LTC2309_UNIPOLAR_MODE 0x08 155 #define LTC2309_BIPOLAR_MODE 0x00 156 #define LTC2309_SINGLE_ENDED_MODE 0x80 157 #define LTC2309_DIFFERENTIAL_MODE 0x00 175 uint16_t *ptr_adc_code
static uint8_t adc_command
static uint8_t uni_bipolar
Default set for unipolar mode.
static float LTC2309_vref
int8_t LTC2309_read(uint8_t i2c_address, uint8_t adc_command, uint16_t *ptr_adc_code)
Reads 12-bit code from LTC2309, programs channel and mode for next conversion.
float LTC2309_code_to_voltage(uint16_t adc_code, float LTC2309_vref, uint8_t uni_bipolar)
Calculates the LTC2309 input voltage.