Library for interfacing Texas Instruments INA233 bidirectional Current and Power Monitor IC with I2C interface
The INA233 is a current, voltage, and power monitor with an I2C interface. -) I2C interface with communication speed up to 400 kHz -) 16 user selectable addresses (chosen by chip pins) -) Integrated Power Accumulator for Energy and Average Power Monitoring -) Configurable Averaging Options -) Independent Alert Limits for Current, Bus Voltage, and Power
typical I2C clock speed to be used
Available I2C addresses
ADC Configuration (bitmasks for register MFR_ADC_CONFIG 0xD0)
Available operating modes (MFR_ADC_CONFIG, Bit 0-2)
Settings for Shunt Voltage Conversion Time (MFR_ADC_CONFIG, Bit 3-5)
Settings for Bus Voltage Conversion Time (MFR_ADC_CONFIG, Bit 6-8)
Available averaging modes (MFR_ADC_CONFIG, Bit 9-11)
Initializes i2c communication with the INA233 and prepares the INA233 for use
Reads the manufacturer's ID and device number of the chip and checks if a chip supported by the library has been found.
Activates the INA233 by setting the "MFR_ADC_CONFIG" register
Reads the measured Input/Bus Voltage (i.e. voltage at VBUS pin) from the INA233
Calculates the input current based on the shunt voltage (i.e. voltage difference between IN+ and IN-) read from the INA233 and the transferred value of the shunt resistor.
Sets the INA233 into power-down mode (i.e. no measurements are performed) and thus grants minimum power consumption
When accessing the MFR_ADC_CONFIG register, only the operating mode is set to "Power-down". All other bits of the MFR_ADC_CONFIG register remain unchanged.
absolute maximum I2C clock speed
Available Commands (Command | R/W | Number of byte | Default | Description)
Perform raw INA233 read/write access. Data is first of all sent and data is then received.