106 #define LTC2656_CS QUIKEVAL_CS 112 #define LTC2656_CMD_WRITE 0x00 113 #define LTC2656_CMD_UPDATE 0x10
114 #define LTC2656_CMD_WRITE_UPDATE_ALL 0x20
115 #define LTC2656_CMD_WRITE_UPDATE 0x30
116 #define LTC2656_CMD_POWER_DOWN 0x40
117 #define LTC2656_CMD_POWER_DOWN_ALL 0x50
118 #define LTC2656_CMD_INTERNAL_REFERENCE 0x60
119 #define LTC2656_CMD_EXTERNAL_REFERENCE 0x70
120 #define LTC2656_CMD_NO_OPERATION 0xF0
126 #define LTC2656_DAC_A 0x00 127 #define LTC2656_DAC_B 0x01 128 #define LTC2656_DAC_C 0x02 129 #define LTC2656_DAC_D 0x03 130 #define LTC2656_DAC_E 0x04 131 #define LTC2656_DAC_F 0x05 132 #define LTC2656_DAC_G 0x06 133 #define LTC2656_DAC_H 0x07 134 #define LTC2656_DAC_ALL 0x0F void LTC2656_calibrate(uint16_t dac_code1, uint16_t dac_code2, float voltage1, float voltage2, float *LTC2656_lsb, int16_t *LTC2656_offset)
Calculate the LTC2656 offset and LSB voltage given two measured voltages and their corresponding code...
static float LTC2656_lsb[9]
The LTC2656 lsb - index 8 for "all DACs".
float LTC2656_code_to_voltage(uint16_t dac_code, float LTC2656_lsb, int16_t LTC2656_offset)
Calculate the LTC2656 DAC output voltage given the DAC code, offset, and LSB value.
static int16_t LTC2656_offset[9]
DAC offset - index 8 for "all DACs".
void LTC2656_write(uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
Write the 16-bit dac_code to the LTC2656.
uint16_t LTC2656_voltage_to_code(float dac_voltage, float LTC2656_lsb, int16_t LTC2656_offset)
Calculate a LTC2656 DAC code given the desired output voltage and DAC address (0-7) ...