89 #define LTC2662_CS QUIKEVAL_CS 94 #define LTC2662_CMD_WRITE_N 0x00 95 #define LTC2662_CMD_UPDATE_N 0x10
96 #define LTC2662_CMD_WRITE_N_UPDATE_ALL 0x20
97 #define LTC2662_CMD_WRITE_N_UPDATE_N 0x30
98 #define LTC2662_CMD_POWER_DOWN_N 0x40
99 #define LTC2662_CMD_POWER_DOWN_ALL 0x50
101 #define LTC2662_CMD_SPAN 0x60 102 #define LTC2662_CMD_CONFIG 0x70
103 #define LTC2662_CMD_WRITE_ALL 0x80
104 #define LTC2662_CMD_UPDATE_ALL 0x90
105 #define LTC2662_CMD_WRITE_ALL_UPDATE_ALL 0xA0
106 #define LTC2662_CMD_MUX 0xB0
107 #define LTC2662_CMD_TOGGLE_SEL 0xC0
108 #define LTC2662_CMD_GLOBAL_TOGGLE 0xD0
109 #define LTC2662_CMD_SPAN_ALL 0xE0
110 #define LTC2662_CMD_NO_OPERATION 0xF0
116 #define LTC2662_SPAN_HI_Z 0x0000 117 #define LTC2662_SPAN_3_125MA 0x0001 118 #define LTC2662_SPAN_6_25MA 0x0002 119 #define LTC2662_SPAN_12_5MA 0x0003 120 #define LTC2662_SPAN_25MA 0x0004 121 #define LTC2662_SPAN_50MA 0x0005 122 #define LTC2662_SPAN_100MA 0x0006 123 #define LTC2662_SPAN_200MA 0x0007 124 #define LTC2662_SPAN_SW_TO_NEG_V 0x0008 125 #define LTC2662_SPAN_300MA 0x0009 138 #define LTC2662_REF_DISABLE 0x0001 139 #define LTC2662_THERMAL_SHUTDOWN 0x0002
140 #define LTC2662_POWERLIMIT_PROTECTION 0x0003
141 #define LTC2662_OPEN_CIRCUIT_DETECT_DISABLE 0x0004
148 #define LTC2662_TOGGLE_REG_A 0x0000 149 #define LTC2662_TOGGLE_REG_B 0x0010
const float LTC2662_MIN_OUTPUT[10]
uint16_t LTC2662_current_to_code(float dac_current, float max_output)
Calculate a LTC2662 DAC code given the desired output current.
int8_t LTC2662_write(uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
Write the 16-bit dac_code to the LTC2662.
const float LTC2662_MAX_OUTPUT[10]
float LTC2662_code_to_current(uint16_t dac_code, float max_output)
Calculate the LTC2662 DAC output current given the DAC code and max output.