153 #define LTC2945_I2C_ADDRESS 0x6F // Low Low 155 #define LTC2945_I2C_MASS_WRITE 0xCC 156 #define LTC2945_I2C_ALERT_RESPONSE 0x19 221 #define LTC2945_CONTROL_REG 0x00 222 #define LTC2945_ALERT_REG 0x01 223 #define LTC2945_STATUS_REG 0x02 224 #define LTC2945_FAULT_REG 0x03 225 #define LTC2945_FAULT_CoR_REG 0x04 227 #define LTC2945_POWER_MSB2_REG 0x05 228 #define LTC2945_POWER_MSB1_REG 0x06 229 #define LTC2945_POWER_LSB_REG 0x07 230 #define LTC2945_MAX_POWER_MSB2_REG 0x08 231 #define LTC2945_MAX_POWER_MSB1_REG 0x09 232 #define LTC2945_MAX_POWER_LSB_REG 0x0A 233 #define LTC2945_MIN_POWER_MSB2_REG 0x0B 234 #define LTC2945_MIN_POWER_MSB1_REG 0x0C 235 #define LTC2945_MIN_POWER_LSB_REG 0x0D 236 #define LTC2945_MAX_POWER_THRESHOLD_MSB2_REG 0x0E 237 #define LTC2945_MAX_POWER_THRESHOLD_MSB1_REG 0x0F 238 #define LTC2945_MAX_POWER_THRESHOLD_LSB_REG 0x10 239 #define LTC2945_MIN_POWER_THRESHOLD_MSB2_REG 0x11 240 #define LTC2945_MIN_POWER_THRESHOLD_MSB1_REG 0x12 241 #define LTC2945_MIN_POWER_THRESHOLD_LSB_REG 0x13 243 #define LTC2945_DELTA_SENSE_MSB_REG 0x14 244 #define LTC2945_DELTA_SENSE_LSB_REG 0x15 245 #define LTC2945_MAX_DELTA_SENSE_MSB_REG 0x16 246 #define LTC2945_MAX_DELTA_SENSE_LSB_REG 0x17 247 #define LTC2945_MIN_DELTA_SENSE_MSB_REG 0x18 248 #define LTC2945_MIN_DELTA_SENSE_LSB_REG 0x19 249 #define LTC2945_MAX_DELTA_SENSE_THRESHOLD_MSB_REG 0x1A 250 #define LTC2945_MAX_DELTA_SENSE_THRESHOLD_LSB_REG 0x1B 251 #define LTC2945_MIN_DELTA_SENSE_THRESHOLD_MSB_REG 0x1C 252 #define LTC2945_MIN_DELTA_SENSE_THRESHOLD_LSB_REG 0x1D 254 #define LTC2945_VIN_MSB_REG 0x1E 255 #define LTC2945_VIN_LSB_REG 0x1F 256 #define LTC2945_MAX_VIN_MSB_REG 0x20 257 #define LTC2945_MAX_VIN_LSB_REG 0x21 258 #define LTC2945_MIN_VIN_MSB_REG 0x22 259 #define LTC2945_MIN_VIN_LSB_REG 0x23 260 #define LTC2945_MAX_VIN_THRESHOLD_MSB_REG 0x24 261 #define LTC2945_MAX_VIN_THRESHOLD_LSB_REG 0x25 262 #define LTC2945_MIN_VIN_THRESHOLD_MSB_REG 0x26 263 #define LTC2945_MIN_VIN_THRESHOLD_LSB_REG 0x27 265 #define LTC2945_ADIN_MSB_REG 0x28 266 #define LTC2945_ADIN_LSB_REG_REG 0x29 267 #define LTC2945_MAX_ADIN_MSB_REG 0x2A 268 #define LTC2945_MAX_ADIN_LSB_REG 0x2B 269 #define LTC2945_MIN_ADIN_MSB_REG 0x2C 270 #define LTC2945_MIN_ADIN_LSB_REG 0x2D 271 #define LTC2945_MAX_ADIN_THRESHOLD_MSB_REG 0x2E 272 #define LTC2945_MAX_ADIN_THRESHOLD_LSB_REG 0x2F 273 #define LTC2945_MIN_ADIN_THRESHOLD_MSB_REG 0x30 274 #define LTC2945_MIN_ADIN_THRESHOLD_LSB_REG 0x31 288 #define LTC2945_DELTA_SENSE_SNAPSHOT 0x80 289 #define LTC2945_VIN_SNAPSHOT 0xA0 290 #define LTC2945_ADIN_SNAPSHOT 0xC0 330 #define LTC2945_CONTINUOUS_MODE 0x00 331 #define LTC2945_SHUTDOWN_MODE 0x02 332 #define LTC2945_TEST_MODE 0x10 333 #define LTC2945_RESET_ALL_FAULTS 0x00 334 #define LTC2945_SENSE_MULTIPLIER 0x01 335 #define LTC2945_SENSE_MONITOR 0x04 337 #define LTC2945_MAX_POWER_MSB2_RESET 0x00 338 #define LTC2945_MIN_POWER_MSB2_RESET 0xFF 339 #define LTC2945_MAX_DELTA_SENSE_MSB_RESET 0x00 340 #define LTC2945_MIN_DELTA_SENSE_MSB_RESET 0xFF 341 #define LTC2945_MAX_VIN_MSB_RESET 0x00 342 #define LTC2945_MIN_VIN_MSB_RESET 0xFF 343 #define LTC2945_MAX_ADIN_MSB_RESET 0x00 344 #define LTC2945_MIN_ADIN_MSB_RESET 0xFF 346 #define LTC2945_ENABLE_MAX_POWER_ALERT 0x80 347 #define LTC2945_ENABLE_MIN_POWER_ALERT 0x40 348 #define LTC2945_DISABLE_MAX_POWER_ALERT 0x7F 349 #define LTC2945_DISABLE_MIN_POWER_ALERT 0xBF 351 #define LTC2945_ENABLE_MAX_DELTA_SENSE_ALERT 0x20 352 #define LTC2945_ENABLE_MIN_DELTA_SENSE_ALERT 0x10 353 #define LTC2945_DISABLE_MAX_DELTA_SENSE_ALERT 0xDF 354 #define LTC2945_DISABLE_MIN_DELTA_SENSE_ALERT 0xEF 356 #define LTC2945_ENABLE_MAX_VIN_ALERT 0x08 357 #define LTC2945_ENABLE_MIN_VIN_ALERT 0x04 358 #define LTC2945_DISABLE_MAX_VIN_ALERT 0xF7 359 #define LTC2945_DISABLE_MIN_VIN_ALERT 0xFB 361 #define LTC2945_ENABLE_MAX_ADIN_ALERT 0x02 362 #define LTC2945_ENABLE_MIN_ADIN_ALERT 0x01 363 #define LTC2945_DISABLE_MAX_ADIN_ALERT 0xFD 364 #define LTC2945_DISABLE_MIN_ADIN_ALERT 0xFE float LTC2945_VIN_code_to_voltage(uint16_t adc_code, float LTC2945_VIN_lsb)
Calculate the LTC2945 VIN voltage.
static uint8_t adc_command
int8_t LTC2945_read_12_bits(uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code)
Reads a 12-bit adc_code from LTC2945.
const float resistor
resistor value on demo board
int8_t LTC2945_write_24_bits(uint8_t i2c_address, uint8_t adc_command, int32_t code)
Write a 24-bit code to the LTC2945.
const float LTC2945_ADIN_lsb
Typical ADIN lsb weight in volts.
int8_t LTC2945_write(uint8_t i2c_address, uint8_t adc_command, uint8_t code)
Write an 8-bit code to the LTC2945.
int8_t LTC2945_read(uint8_t i2c_address, uint8_t adc_command, uint8_t *adc_code)
Reads an 8-bit adc_code from LTC2945.
float LTC2945_code_to_current(uint16_t adc_code, float resistor, float LTC2945_DELTA_SENSE_lsb)
Calculate the LTC2945 current with a sense resistor.
int8_t LTC2945_read_16_bits(uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code)
Reads a 16-bit adc_code from LTC2945.
const float LTC2945_Power_lsb
Typical POWER lsb weight in V^2.
float LTC2945_ADIN_code_to_voltage(uint16_t adc_code, float LTC2945_ADIN_lsb)
Calculate the LTC2945 ADIN voltage.
const float LTC2945_ADIN_DELTA_SENSE_lsb
Typical sense lsb weight in V^2 *ADIN_lsb * DELTA_SENSE_lsb.
const float LTC2945_VIN_lsb
Typical VIN lsb weight in volts.
float LTC2945_code_to_ADIN_power(int32_t adc_code, float resistor, float LTC2945_ADIN_DELTA_SENSE_lsb)
Calculate the LTC2945 power with the ADIN.
const float LTC2945_DELTA_SENSE_lsb
Typical Delta lsb weight in volts.
float LTC2945_code_to_power(int32_t adc_code, float resistor, float LTC2945_Power_lsb)
Calculate the LTC2945 power.
int8_t LTC2945_read_24_bits(uint8_t i2c_address, uint8_t adc_command, int32_t *adc_code)
Reads a 24-bit adc_code from LTC2945.
int8_t LTC2945_write_16_bits(uint8_t i2c_address, uint8_t adc_command, uint16_t code)
Write a 16-bit code to the LTC2945.