PMIC (Power Management IC)

Charge Current Control Reg

setChargeCurrent()

PMIC::setChargeCurrent, setChargeCurrent, PMIC.setChargeCurrent

bool setChargeCurrent(bool bit7, bool bit6, bool bit5, bool bit4, bool bit3, bool bit2);

The total charge current is the 512mA + the combination of the current that the following bits represent

  • bit7 = 2048mA
  • bit6 = 1024mA
  • bit5 = 512mA
  • bit4 = 256mA
  • bit3 = 128mA
  • bit2 = 64mA

For example, to set a 1408 mA charge current:

PMIC pmic;
pmic.setChargeCurrent(0,0,1,1,1,0);
  • 512mA + (0+0+512mA+256mA+128mA+0) = 1408mA

getChargeCurrent()

PMIC::getChargeCurrent, getChargeCurrent, PMIC.getChargeCurrent

byte getChargeCurrent(void);

Returns the charge current register. This is the direct register value from the BQ24195 PMIC. The bits in this register correspond to the bits you pass into setChargeCurrent.

  • bit7 is the MSB, value 0x80
  • bit2 is the LSB, value 0x04