Modelgauge m5 Host Side Software Implementation Guide
Modelgauge m5 Host Side Software Implementation Guide
Modelgauge m5 Host Side Software Implementation Guide
Guide
UG6595; Rev 4; 12/21
Abstract
The ModelGauge m5 Host Side Software Implementation Guide describes the startup sequence to
configure and use the MAX17260/1/2/3, MAX20355/7, MAX77658 fuel-gauge functions for EZ config
and custom models.
List of Tables
Table 1. Register LSBs for MAX1726x ........................................................................................................... 4
Register LSBs
Similar register types in the ModelGauge™ m5 devices share similar formats, i.e., all the SOC registers
share the same format, all the capacity registers share the same format, etc.
Or 0.5mAh with 10m. For internal RSense parts, refer to the IC datasheet for
Capacity 5.0Vh/RSENSE
Capacity LSB.
SOC 1/256% Or 1% at bit D8.
Voltage 0.078125mV Or 1.25mV at bit D4.
Or 156.25µA with 10m, signed two's complement number. For internal RSense
Current 1.5625V/RSENSE
parts, refer to the IC datasheet for Current LSB.
Temperature 1/256°C Or 1°C at bit D8, signed two's complement number.
WriteRegister
ReadRegister
WriteAndVerifyRegister
POWER-UP
RESET
FUEL-GAUGE POLLING
MAIN LOOP
while(ReadRegister(0x3D)&1) Wait(10);
//10ms Wait Loop. Do not continue until FSTAT.DNR==0
if (ChargeVoltage>4.275)
WriteRegister (0xDB , 0x8400) ; // Write ModelCFG
else
WriteRegister (0xDB , 0x8000) ; // Write ModelCFG
Proceed to Step 3.
Proceed to Step 3.
//See INI file at the end of this document for an example of the data to be
written.
Write16Registers (0x80, Table [0]) ; Table [0] is 16 words described data
described in INI file format
Write16Registers (0x90, Table [1]) ; Table [1] is 16 words described data
described in INI file format
WriteRegister (0xAF, RCompSeg); // RCompSeg value is described in INI file
format
The model can be read directly back from the IC. So simply read the 48 words
of the model back from the device to verify if it was written correctly. If
any of the values do not match, return to step 2.3.1.
Read16Registers (0x80) ;
Read16Registers (0x90) ;
ReadRegister (0xAF) ;
Poll the LdMdl bit in the Config2 register, proceed to step 2.3.8 when LdMdl
bit becomes 0.
//Poll Config2.LdMdl(0x0020)
//until it becomes 0 to confirm IC completes model loading
while (ReadRegister (0xBB)&0x0020){
WriteRegister (0x0A, 0x0000);
WriteRegister (0x0B, 0x0000);
Wait 10ms ; }
Proceed to Step 3.
The RepSOC has a LSB of 1/256%. Round the RepSOC to the nearest integer value.
Device=MAX1726X
Title=C:/xxxx/1234_1_111111.csv
ModelVersion=8745 //This keeps track of the version of the INI generator
DesignCap=0x1450
ichgterm=0x333
modelcfg=0x8000
QRTable00=0x1050
QRTable10=0x2012
VEmpty=0xa561
RCOMP0=0x004d
TempCo=0x223e
Device=MAX1726X
Title= C:/xxxx/1234_1_111111.csv
ModelVersion=8745
DesignCap=0x06ae
fullsocthr=0x5f05
ichgterm=0x100
modelcfg=0x8410
QRTable00=0x1050
QRTable10=0x0014
QRTable20=0x1300
QRTable30=0x0c00
VEmpty=0x965a
RCOMP0=0x0070
TempCo=0x223e
3 5/21 Updated Section 2.3.2, 2.3.5, 2.3.7. Quick Start, INI file format —
Updated the Title and Abstract, and section’s “Introduction”, “Register LSBs”,
“Initialize Registers to Recommended Configuration”, “2.2”, “2.3”, “Monitor the
4 12/21 1, 4, 6-10, 12-14
Battery”, “Read the Fuel-Gauge Results”, “Quick Start”, “Table 1” and title of the
Figure 1