English
Language : 

MAX17201 Datasheet, PDF (113/115 Pages) Maxim Integrated Products – Stand-Alone ModelGauge m5 Fuel Gauge
MAX17201/MAX17205/
MAX17211/MAX17215
Stand-Alone ModelGauge m5 Fuel Gauge
with SHA-256 Authentication
word = (int)( loop/8 );
position = loop % 8 ; //remainder
flag1 = (WriteFlags[word] >> position) & 0x0001;
flag2 = (WriteFlags[word] >> (position+8)) & 0x0001;
flag3 = (ValidFlags[word] >> position) & 0x0001;
flag4 = (ValidFlags[word] >> (position+8)) & 0x0001;
if (flag1 || flag2) && (flag3 || flag4)
PageGood[loop] = True;
else
PageGood[loop] = False;
}
//Read all the history data from the IC
HistoryLength = 0;
For loop = 0 to 202
{
if(PageGood[loop]) == TRUE
{
SendCommand(0xE226 + loop);
Wait(tRECALL);
HistoryData[HistoryLength][0] = ReadData(0x1E0);
...
HistoryData[HistoryLength][15] = ReadData(0x1EF);
HistoryLength++;
}
}
www.maximintegrated.com
Maxim Integrated │  113