114 #define LTC2655_I2C_ADDRESS 0x10 // GND GND GND 142 #define LTC2655_I2C_GLOBAL_ADDRESS 0x73 148 #define LTC2655_CMD_WRITE 0x00 // Write to input register n 149 #define LTC2655_CMD_UPDATE 0x10 // Update (power up) DAC register n 150 #define LTC2655_CMD_WRITE_UPDATE 0x30 // Write to input register n, update (power up) all 151 #define LTC2655_CMD_POWER_DOWN 0x40 // Power down n 152 #define LTC2655_CMD_POWER_DOWN_ALL 0x50 // Power down chip (all DACs and reference) 153 #define LTC2655_CMD_INTERNAL_REFERENCE 0x60 // Select internal reference (power up reference) 154 #define LTC2655_CMD_EXTERNAL_REFERENCE 0x70 // Select external reference (power down internal reference) 155 #define LTC2655_CMD_NO_OPERATION 0xF0 // No operation 161 #define LTC2655_DAC_A 0x00 162 #define LTC2655_DAC_B 0x01 163 #define LTC2655_DAC_C 0x02 164 #define LTC2655_DAC_D 0x03 165 #define LTC2655_DAC_ALL 0x0F void LTC2655_calibrate(uint16_t dac_code1, uint16_t dac_code2, float voltage1, float voltage2, float *LTC2655_lsb, int16_t *LTC2655_offset)
Calculate the LTC2655 offset and LSB voltages given two measured voltages and their corresponding cod...
static float LTC2655_lsb[5]
The LTC2655 lsb - index 4 for "all DACs." If part is calibrated, then index 0 is stored to "all DACs...
int8_t LTC2655_write(uint8_t i2c_address, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
Write a 16-bit dac_code to the LTC2655.
uint16_t LTC2655_voltage_to_code(float dac_voltage, float LTC2655_lsb, int16_t LTC2655_offset)
Calculate a LTC2655 DAC code given the desired output voltage.
static int16_t LTC2655_offset[5]
DAC offset - index 4 for "all DACs." If part is calibrated, then index 0 is stored to "all DACs...
float LTC2655_code_to_voltage(uint16_t dac_code, float LTC2655_lsb, int16_t LTC2655_offset)
Calculate the LTC2655 DAC output voltage given the DAC code, offset, and LSB value.