112 #define LTC2636_CS QUIKEVAL_CS 118 #define LTC2636_CMD_WRITE 0x00 119 #define LTC2636_CMD_UPDATE 0x10
120 #define LTC2636_CMD_WRITE_UPDATE_ALL 0x20
121 #define LTC2636_CMD_WRITE_UPDATE 0x30
122 #define LTC2636_CMD_POWER_DOWN 0x40
123 #define LTC2636_CMD_POWER_DOWN_ALL 0x50
124 #define LTC2636_CMD_INTERNAL_REFERENCE 0x60
125 #define LTC2636_CMD_EXTERNAL_REFERENCE 0x70
126 #define LTC2636_CMD_NO_OPERATION 0xF0
132 #define LTC2636_DAC_A 0x00 133 #define LTC2636_DAC_B 0x01 134 #define LTC2636_DAC_C 0x02 135 #define LTC2636_DAC_D 0x03 136 #define LTC2636_DAC_E 0x04 137 #define LTC2636_DAC_F 0x05 138 #define LTC2636_DAC_G 0x06 139 #define LTC2636_DAC_H 0x07 140 #define LTC2636_DAC_ALL 0x0F static float LTC2636_lsb[9]
The LTC2636 lsb - index 8 for "all DACs".
void LTC2636_write(uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
Write the 16-bit dac_code to the LTC2636.
static int16_t LTC2636_offset[9]
DAC offset - index 8 for "all DACs".
void LTC2636_calibrate(uint16_t dac_code1, uint16_t dac_code2, float voltage1, float voltage2, float *LTC2636_lsb, int16_t *LTC2636_offset)
Calculate the LTC2636 offset and LSB voltages given two measured voltages and their corresponding cod...
float LTC2636_code_to_voltage(uint16_t dac_code, float LTC2636_lsb, int16_t LTC2636_offset)
Calculate the LTC2636 DAC output voltage given the DAC code, offset, and LSB value.
uint16_t LTC2636_voltage_to_code(float dac_voltage, float LTC2636_lsb, int16_t LTC2636_offset)
Calculate a LTC2636 DAC code given the desired output voltage, offset, and LSB value.