ConstThe converter codes: a resolution, or samples averaged at 12 bits.
10 bits, 148 us.
11 bits, 276 us.
12 bits, 532 us, the reset setting.
9 bits, 84 us.
128 samples averaged, 68.10 ms.
16 samples averaged, 8.51 ms.
2 samples averaged, 1.06 ms.
32 samples averaged, 17.02 ms.
4 samples averaged, 2.13 ms.
64 samples averaged, 34.05 ms.
8 samples averaged, 4.26 ms.
The address with A1 and A0 tied to ground; the pins add to it.
The bus-voltage range codes.
0 to 16 V.
0 to 32 V, the reset setting.
The configuration register's power-on value.
The shunt gain codes, by the shunt-voltage range each gives.
Gain 1, 40 mV either side of zero.
Gain 1/2, 80 mV.
Gain 1/4, 160 mV.
Gain 1/8, 320 mV, the reset setting.
The operating-mode codes.
The converter disabled.
Bus conversions back to back.
One bus conversion.
No conversions, lowest power.
Shunt and bus conversions back to back, the reset setting.
One shunt and one bus conversion.
Shunt conversions back to back.
One shunt conversion.
What an address pin is tied to, as the code the address helper takes.
Tied to GND.
Tied to SCL.
Tied to SDA.
Tied to VS+.
The registers a driver reads and writes.
The bus voltage in bits 15:3, 4 mV per count, with two flags below.
The calibration, which sets the current and power scale.
Range, gain, converter settings, and mode.
The current, scaled by the calibration.
The power, scaled by the calibration.
The shunt voltage, 10 uV per count.
An INA219 that is not there, for a bus with nothing plugged in. A monitor's current and
power registers count in steps the calibration sets, so reporting takes the same shunt
and largest current a driver is given.
The bus voltage part reports, in millivolts.
The largest current part is sized for, in microamps.
The current part reports, in microamps.
The shunt part sits across, in milliohms: the common breakout's.
A part that reads what it is asked to, on the steps its registers count in: 4 mV of bus, 10 uV of shunt, and the calibration's current step.
The address it answers to.
The shunt, as the driver is given it.
The largest current, as the driver is given it.
The bus voltage it reports.
The current it reports; negative flows the other way.
The part, to put on a simulated bus.
Returns how long one conversion takes at a converter code.
One of the ina219.adc codes.
The time in microseconds, from the datasheet's table.
Returns the 7-bit address the A1 and A0 pins select, from Table 1 of the datasheet.
What the A1 pin is tied to, one of ina219.pin.
What the A0 pin is tied to.
The address, 0x40 to 0x4F.
Converts a raw bus-voltage register to millivolts.
The register value.
The bus voltage.
Builds the bus-voltage register a monitor reports for a bus voltage.
The bus voltage in millivolts.
The register value, with the conversion-ready flag set.
Computes the calibration register for a shunt and current resolution.
The microamps per count the current register should carry.
The shunt resistor value.
The register value to write.
Assembles the configuration register value.
The range, gain, converter, and mode codes.
The register value to write.
Parses a configuration register value.
The register value, as read from the part.
The settings. Every value decodes.
Returns how long one conversion cycle takes: the shunt and bus conversions the mode runs, one after the other.
The settings.
The time in microseconds.
Reports whether a bus-voltage register says a conversion is ready.
The register value.
Whether the conversion-ready flag is set.
Converts a raw current register to microamps.
The signed register value.
The resolution the calibration selected.
The current.
Builds the current register a monitor reports for a current.
The current in microamps.
The current LSB the calibration was set for.
The signed register value.
Returns the shunt-voltage range a gain code selects.
One of the ina219.gain codes.
The range in millivolts either side of zero.
Reports whether a bus-voltage register flags a math overflow.
The register value.
Whether the current and power readings are meaningless, which means the calibration needs revisiting.
Returns the smallest current resolution that still covers a maximum.
The largest current the application measures.
The minimum current LSB in microamps.
Converts a raw power register to microwatts.
The register value.
The resolution the calibration selected.
The power. The power LSB is fixed at twenty times the current LSB.
Builds the power register a monitor reports for a power.
The power in microwatts.
The current LSB the calibration was set for.
The register value.
Builds the shunt-voltage register a monitor reports for a shunt voltage.
The inverse of shuntMicrovolts, so a node can be written and tested against what a monitor sends without one attached.
The shunt voltage in microvolts.
The signed register value, at 10 uV per count.
A TI INA219 current, voltage, and power monitor.