90 #define LTC2668_CS QUIKEVAL_CS 95 #define LTC2668_CMD_WRITE_N 0x00 96 #define LTC2668_CMD_UPDATE_N 0x10
97 #define LTC2668_CMD_WRITE_N_UPDATE_ALL 0x20
98 #define LTC2668_CMD_WRITE_N_UPDATE_N 0x30
99 #define LTC2668_CMD_POWER_DOWN_N 0x40
100 #define LTC2668_CMD_POWER_DOWN_ALL 0x50
102 #define LTC2668_CMD_SPAN 0x60 103 #define LTC2668_CMD_CONFIG 0x70
104 #define LTC2668_CMD_WRITE_ALL 0x80
105 #define LTC2668_CMD_UPDATE_ALL 0x90
106 #define LTC2668_CMD_WRITE_ALL_UPDATE_ALL 0xA0
107 #define LTC2668_CMD_MUX 0xB0
108 #define LTC2668_CMD_TOGGLE_SEL 0xC0
109 #define LTC2668_CMD_GLOBAL_TOGGLE 0xD0
110 #define LTC2668_CMD_SPAN_ALL 0xE0
111 #define LTC2668_CMD_NO_OPERATION 0xF0
119 #define LTC2668_SPAN_0_TO_5V 0x0000 120 #define LTC2668_SPAN_0_TO_10V 0x0001 121 #define LTC2668_SPAN_PLUS_MINUS_5V 0x0002 122 #define LTC2668_SPAN_PLUS_MINUS_10V 0x0003 123 #define LTC2668_SPAN_PLUS_MINUS_2V5 0x0004 136 #define LTC2668_REF_DISABLE 0x0001 137 #define LTC2668_THERMAL_SHUTDOWN 0x0002
143 #define LTC2668_MUX_DISABLE 0x0000 144 #define LTC2668_MUX_ENABLE 0x0010
151 #define LTC2668_TOGGLE_REG_A 0x0000 152 #define LTC2668_TOGGLE_REG_B 0x0010
157 int8_t
LTC2668_write(uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code);
const float LTC2668_MIN_OUTPUT[5]
int8_t LTC2668_write(uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
Write the 16-bit dac_code to the LTC2668.
const float LTC2668_MAX_OUTPUT[5]
uint16_t LTC2668_voltage_to_code(float dac_voltage, float min_output, float max_output)
Calculate a LTC2668 DAC code given the desired output voltage and DAC address (0-3) ...
float LTC2668_code_to_voltage(uint16_t dac_code, float min_output, float max_output)
Calculate the LTC2668 DAC output voltage given the DAC code, offset, and LSB.