Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

LTM9100: Anyside™ High Voltage Isolated Switch Controller with I²C Command and Telemetry. More...

Detailed Description

LTM9100: Anyside™ High Voltage Isolated Switch Controller with I²C Command and Telemetry.

The LTM9100 μModule controller is a complete, galvanically isolated switch controller
with I2C interface, for use as a load switch or hot swap controller. The load is soft
started and controlled by an external N-channel MOSFET switch.

http://www.linear.com/product/LTM9100

http://www.linear.com/product/LTC9100#demoboards

Copyright 2018(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  • The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
  • Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Header for LTM9100 Anyside™ High Voltage Isolated Switch Controller with I²C Command and Telemetry.

Definition in file LTM9100.h.

Go to the source code of this file.

Functions

int8_t LTM9100_register_read (uint8_t i2c_address, uint8_t register_address, uint8_t *register_data)
 Reads an 8-bit register from the LTM9100 using the standard repeated start format. More...
 
int8_t LTM9100_adc_read (uint8_t i2c_address, uint8_t base_address, float *register_data)
 Read the specified ADC value (SENSE, ADIN, ADIN2) and output in human readable format to the serial console. More...
 
int8_t LTM9100_register_write (uint8_t i2c_address, uint8_t register_address, uint8_t register_data)
 Writes to an 8-bit register inside the LTM9100 using the standard I2C repeated start format. More...
 
int8_t LTM9100_bit_set (uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
 Sets any bit inside the LTM9100 using the standard I2C repeated start format. More...
 
int8_t LTM9100_bit_clear (uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
 Clears any bit inside the LTM9100 using the standard I2C repeated start format. More...
 
int8_t LTM9100_bit_read (uint8_t i2c_address, uint8_t register_address, uint8_t bit_number, uint8_t *register_data)
 Read the bit specified by bit_number from the LTM9100. More...
 
int8_t LTM9100_alert_read (uint8_t *register_data)
 Attempts to read a byte from the I2C bus using the alert address (0xC) to ascertain pending alerts on the bus. More...
 
int8_t LTM9100_print_all_registers (uint8_t i2c_address)
 Read all LTM9100 registers and output to the serial console. More...
 
int8_t LTM9100_continuous_read_all_registers (uint8_t i2c_address)
 Read all LTM9100 registers and output to the serial console every second until a key press is detected. More...
 
boolean valid_register (uint8_t user_register, uint8_t register_array[], uint8_t array_length)
 Check if user_register is a valid register for the LTM9100. More...
 

Macros

#define LTM_9100_STATUS_A_REG   0x00
 
#define LTM_9100_FAULT_B_REG   0x01
 
#define LTM_9100_ALERT_C_REG   0x02
 
#define LTM_9100_CTRL_D_REG   0x03
 
#define LTM_9100_SENSE_E_REG   0x04
 
#define LTM_9100_SENSE_F_REG   0x05
 
#define LTM_9100_ADIN2_G_REG   0x06
 
#define LTM_9100_ADIN2_H_REG   0x07
 
#define LTM_9100_ADIN_I_REG   0x08
 
#define LTM_9100_ADIN_J_REG   0x09
 
#define LTM_9100_STATUS_GATE   0x07
 
#define LTM_9100_STATUS_PGI   0x06
 
#define LTM_9100_STATUS_FET   0x05
 
#define LTM_9100_STATUS_OC   0x02
 
#define LTM_9100_STATUS_UV   0x01
 
#define LTM_9100_STATUS_OV   0x00
 
#define LTM_9100_FAULT_PGI   0x06
 
#define LTM_9100_FAULT_FET   0x05
 
#define LTM_9100_FAULT_OC   0x02
 
#define LTM_9100_FAULT_UV   0x01
 
#define LTM_9100_FAULT_OV   0x00
 
#define LTM_9100_ALERT_PGO   LTM_9100_FAULT_PGI
 
#define LTM_9100_ALERT_FET   LTM_9100_FAULT_FET
 
#define LTM_9100_ALERT_OC   LTM_9100_FAULT_OC
 
#define LTM_9100_ALERT_UV   LTM_9100_FAULT_UV
 
#define LTM_9100_ALERT_OV   LTM_9100_FAULT_OV
 
#define LTM_9100_CTRL_PGIO_CFG   0x06
 
#define LTM_9100_CTRL_PGIO_CFG_MASK   0xC0
 
#define LTM_9100_CTRL_ADC_WRITE   0x05
 
#define LTM_9100_CTRL_GATE_CTRL   0x03
 
#define LTM_9100_CTRL_OC   0x02
 
#define LTM_9100_CTRL_UV   0x01
 
#define LTM_9100_CTRL_OV   0x00
 
#define LTM_9100_SENSE_mV_PER_TICK   0.0625
 
#define LTM_9100_ADIN_V_PER_TICK   0.0025
 
#define LTM_9100_ADIN2_V_PER_TICK   0.0025
 

Variables

uint8_t i2c_address
 
uint8_t reg_read_list [10]
 
uint8_t reg_write_list [9]
 
float sense_resistor
 
float adin_gain
 
float adin2_gain
 

Function Documentation

◆ LTM9100_adc_read()

int8_t LTM9100_adc_read ( uint8_t  i2c_address,
uint8_t  base_address,
float *  register_data 
)

Read the specified ADC value (SENSE, ADIN, ADIN2) and output in human readable format to the serial console.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 80 of file LTM9100.cpp.

◆ LTM9100_alert_read()

int8_t LTM9100_alert_read ( uint8_t *  register_data)

Attempts to read a byte from the I2C bus using the alert address (0xC) to ascertain pending alerts on the bus.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 155 of file LTM9100.cpp.

◆ LTM9100_bit_clear()

int8_t LTM9100_bit_clear ( uint8_t  i2c_address,
uint8_t  register_address,
uint8_t  bit_number 
)

Clears any bit inside the LTM9100 using the standard I2C repeated start format.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 133 of file LTM9100.cpp.

◆ LTM9100_bit_read()

int8_t LTM9100_bit_read ( uint8_t  i2c_address,
uint8_t  register_address,
uint8_t  bit_number,
uint8_t *  register_data 
)

Read the bit specified by bit_number from the LTM9100.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 146 of file LTM9100.cpp.

◆ LTM9100_bit_set()

int8_t LTM9100_bit_set ( uint8_t  i2c_address,
uint8_t  register_address,
uint8_t  bit_number 
)

Sets any bit inside the LTM9100 using the standard I2C repeated start format.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 120 of file LTM9100.cpp.

◆ LTM9100_continuous_read_all_registers()

int8_t LTM9100_continuous_read_all_registers ( uint8_t  i2c_address)

Read all LTM9100 registers and output to the serial console every second until a key press is detected.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 188 of file LTM9100.cpp.

◆ LTM9100_print_all_registers()

int8_t LTM9100_print_all_registers ( uint8_t  i2c_address)

Read all LTM9100 registers and output to the serial console.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 163 of file LTM9100.cpp.

◆ LTM9100_register_read()

int8_t LTM9100_register_read ( uint8_t  i2c_address,
uint8_t  register_address,
uint8_t *  register_data 
)

Reads an 8-bit register from the LTM9100 using the standard repeated start format.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 72 of file LTM9100.cpp.

◆ LTM9100_register_write()

int8_t LTM9100_register_write ( uint8_t  i2c_address,
uint8_t  register_address,
uint8_t  register_data 
)

Writes to an 8-bit register inside the LTM9100 using the standard I2C repeated start format.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 112 of file LTM9100.cpp.

◆ valid_register()

boolean valid_register ( uint8_t  user_register,
uint8_t  register_array[],
uint8_t  array_length 
)

Check if user_register is a valid register for the LTM9100.

Returns
Returns the validity of user_register against the the supplied register set.

Check if user_register is a valid register for the LTM9100.

Returns
State of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 212 of file LTM9100.cpp.

Macro Definition Documentation

◆ LTM_9100_ADIN2_G_REG

#define LTM_9100_ADIN2_G_REG   0x06

Definition at line 65 of file LTM9100.h.

◆ LTM_9100_ADIN2_H_REG

#define LTM_9100_ADIN2_H_REG   0x07

Definition at line 66 of file LTM9100.h.

◆ LTM_9100_ADIN2_V_PER_TICK

#define LTM_9100_ADIN2_V_PER_TICK   0.0025

Definition at line 99 of file LTM9100.h.

◆ LTM_9100_ADIN_I_REG

#define LTM_9100_ADIN_I_REG   0x08

Definition at line 67 of file LTM9100.h.

◆ LTM_9100_ADIN_J_REG

#define LTM_9100_ADIN_J_REG   0x09

Definition at line 68 of file LTM9100.h.

◆ LTM_9100_ADIN_V_PER_TICK

#define LTM_9100_ADIN_V_PER_TICK   0.0025

Definition at line 98 of file LTM9100.h.

◆ LTM_9100_ALERT_C_REG

#define LTM_9100_ALERT_C_REG   0x02

Definition at line 61 of file LTM9100.h.

◆ LTM_9100_ALERT_FET

#define LTM_9100_ALERT_FET   LTM_9100_FAULT_FET

Definition at line 84 of file LTM9100.h.

◆ LTM_9100_ALERT_OC

#define LTM_9100_ALERT_OC   LTM_9100_FAULT_OC

Definition at line 85 of file LTM9100.h.

◆ LTM_9100_ALERT_OV

#define LTM_9100_ALERT_OV   LTM_9100_FAULT_OV

Definition at line 87 of file LTM9100.h.

◆ LTM_9100_ALERT_PGO

#define LTM_9100_ALERT_PGO   LTM_9100_FAULT_PGI

Definition at line 83 of file LTM9100.h.

◆ LTM_9100_ALERT_UV

#define LTM_9100_ALERT_UV   LTM_9100_FAULT_UV

Definition at line 86 of file LTM9100.h.

◆ LTM_9100_CTRL_ADC_WRITE

#define LTM_9100_CTRL_ADC_WRITE   0x05

Definition at line 91 of file LTM9100.h.

◆ LTM_9100_CTRL_D_REG

#define LTM_9100_CTRL_D_REG   0x03

Definition at line 62 of file LTM9100.h.

◆ LTM_9100_CTRL_GATE_CTRL

#define LTM_9100_CTRL_GATE_CTRL   0x03

Definition at line 92 of file LTM9100.h.

◆ LTM_9100_CTRL_OC

#define LTM_9100_CTRL_OC   0x02

Definition at line 93 of file LTM9100.h.

◆ LTM_9100_CTRL_OV

#define LTM_9100_CTRL_OV   0x00

Definition at line 95 of file LTM9100.h.

◆ LTM_9100_CTRL_PGIO_CFG

#define LTM_9100_CTRL_PGIO_CFG   0x06

Definition at line 89 of file LTM9100.h.

◆ LTM_9100_CTRL_PGIO_CFG_MASK

#define LTM_9100_CTRL_PGIO_CFG_MASK   0xC0

Definition at line 90 of file LTM9100.h.

◆ LTM_9100_CTRL_UV

#define LTM_9100_CTRL_UV   0x01

Definition at line 94 of file LTM9100.h.

◆ LTM_9100_FAULT_B_REG

#define LTM_9100_FAULT_B_REG   0x01

Definition at line 60 of file LTM9100.h.

◆ LTM_9100_FAULT_FET

#define LTM_9100_FAULT_FET   0x05

Definition at line 78 of file LTM9100.h.

◆ LTM_9100_FAULT_OC

#define LTM_9100_FAULT_OC   0x02

Definition at line 79 of file LTM9100.h.

◆ LTM_9100_FAULT_OV

#define LTM_9100_FAULT_OV   0x00

Definition at line 81 of file LTM9100.h.

◆ LTM_9100_FAULT_PGI

#define LTM_9100_FAULT_PGI   0x06

Definition at line 77 of file LTM9100.h.

◆ LTM_9100_FAULT_UV

#define LTM_9100_FAULT_UV   0x01

Definition at line 80 of file LTM9100.h.

◆ LTM_9100_SENSE_E_REG

#define LTM_9100_SENSE_E_REG   0x04

Definition at line 63 of file LTM9100.h.

◆ LTM_9100_SENSE_F_REG

#define LTM_9100_SENSE_F_REG   0x05

Definition at line 64 of file LTM9100.h.

◆ LTM_9100_SENSE_mV_PER_TICK

#define LTM_9100_SENSE_mV_PER_TICK   0.0625

Definition at line 97 of file LTM9100.h.

◆ LTM_9100_STATUS_A_REG

#define LTM_9100_STATUS_A_REG   0x00

Definition at line 59 of file LTM9100.h.

◆ LTM_9100_STATUS_FET

#define LTM_9100_STATUS_FET   0x05

Definition at line 72 of file LTM9100.h.

◆ LTM_9100_STATUS_GATE

#define LTM_9100_STATUS_GATE   0x07

Definition at line 70 of file LTM9100.h.

◆ LTM_9100_STATUS_OC

#define LTM_9100_STATUS_OC   0x02

Definition at line 73 of file LTM9100.h.

◆ LTM_9100_STATUS_OV

#define LTM_9100_STATUS_OV   0x00

Definition at line 75 of file LTM9100.h.

◆ LTM_9100_STATUS_PGI

#define LTM_9100_STATUS_PGI   0x06

Definition at line 71 of file LTM9100.h.

◆ LTM_9100_STATUS_UV

#define LTM_9100_STATUS_UV   0x01

Definition at line 74 of file LTM9100.h.

Variable Documentation

◆ adin2_gain

float adin2_gain

◆ adin_gain

float adin_gain

◆ i2c_address

uint8_t i2c_address

◆ reg_read_list

uint8_t reg_read_list[10]

Definition at line 68 of file LTM9100.cpp.

◆ reg_write_list

uint8_t reg_write_list[9]

Definition at line 69 of file LTM9100.cpp.

◆ sense_resistor

float sense_resistor