Skip to main content

Module sim

Module sim 

Source
Expand description

An INA226 that is not there.

As with the INA219, a current 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 with with_shunt. The part carries TI’s manufacturer id and the INA226 die id, and its mask/enable register keeps the three flags the part sets for itself, with the conversion-ready flag set, so every conversion reads as finished. part carries 500 mA at 12 V through the 100 mΩ shunt sized for 3.2 A a driver starts with.

Constants§

BUS_MICROVOLTS
The bus voltage part reports, in microvolts.
MAX_MICROAMPS
The largest current part is sized for, in microamps.
MICROAMPS
The current part reports, in microamps.
SHUNT_MILLIOHMS
The shunt part sits across, in milliohms.

Functions§

part
An INA226 answering at an address, carrying MICROAMPS at BUS_MICROVOLTS through SHUNT_MILLIOHMS.
reporting
An INA226 that reads what it is asked to.