115 #define LTC2461_I2C_ADDRESS 0x14 // A0 = LOW : this is demo board default 122 #define LTC2461_30HZ_SPEED_MODE 0xA0 // SPD=1 123 #define LTC2461_60HZ_SPEED_MODE 0x80 // SPD=0 124 #define LTC2461_SLEEP_MODE 0x90 // SLP=1 SPD=XX
static uint8_t adc_command
int8_t LTC2461_command(uint8_t i2c_address, uint8_t adc_command)
Write a 16-bit command to the ADC.
float LTC2461_code_to_voltage(uint16_t adc_code, float LTC2461_lsb, int32_t LTC2461_offset_code)
Calculates the LTC2309 input unipolar voltage.
static float LTC2461_lsb
Ideal LSB voltage for a perfect part (Vref/(2^16))
void LTC2461_cal_voltage(uint16_t zero_code, uint16_t fs_code, float zero_voltage, float fs_voltage, float *LTC2461_lsb, int32_t *LTC2461_offset_code)
Calibrate the lsb.
static int32_t LTC2461_offset_code
Ideal offset for a perfect part.
int8_t LTC2461_read(uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code)
Reads the ADC and returns 16-bit data.