169 #define LTC2605_I2C_ADDRESS 0x72 // Vcc Vcc Vcc 180 #define LTC2605_CMD_WRITE 0x00 181 #define LTC2605_CMD_UPDATE 0x10
182 #define LTC2605_CMD_WRITE_UPDATE 0x30
183 #define LTC2605_CMD_POWER_DOWN 0x40
184 #define LTC2605_CMD_POWER_DOWN_ALL 0x50
185 #define LTC2605_CMD_INTERNAL_REFERENCE 0x60
186 #define LTC2605_CMD_EXTERNAL_REFERENCE 0x70
187 #define LTC2605_CMD_NO_OPERATION 0xF0
207 #define LTC2605_DAC_A 0x00 208 #define LTC2605_DAC_B 0x01 209 #define LTC2605_DAC_C 0x02 210 #define LTC2605_DAC_D 0x03 211 #define LTC2605_DAC_E 0x04 212 #define LTC2605_DAC_F 0x05 213 #define LTC2605_DAC_G 0x06 214 #define LTC2605_DAC_H 0x07 215 #define LTC2605_DAC_ALL 0x0F
static int16_t LTC2605_offset
DAC offset.
float LTC2605_code_to_voltage(uint16_t dac_code, float LTC2605_lsb, int16_t LTC2605_offset)
Calculate the LTC2605 DAC output voltage given the DAC code, offset, and LSB value.
uint16_t LTC2605_voltage_to_code(float dac_voltage, float LTC2605_lsb, int16_t LTC2605_offset)
Calculate a LTC2605 DAC code given the desired output voltage.
int8_t LTC2605_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 LTC2605.