M
*
Digitally Controlled
Fuel-Gauge Interfac e
______________________________________________________________________________________
15
WriteConfig() Command
The host configures the MAX1660 using the
WriteConfig() command. Table 6 describes each of the
configuration word’s bits.
Applic ations Information
Choosing R
CS
For greatest accuracy, choose R
CS
to ensure that the
product of the maximum current to be measured (I
MAX
)
and R
CS
does not exceed 120mV. Calculate the proper
sense-resistor value as follows:
= 120mV
CS
where I
MAX
is the maximum current to be accurately
measured. Use only surface-mount metal-film resistors;
wire-wound resistors are too inductive to provide ac-
*Patent pending
ceptable results. Be sure to consider power dissipation
when choosing the current-sense resistor to avoid
resistor self-heating.
S etting the Overc urrent T hreshold
Set the current at which the voltage on CS exceeds the
voltage on OCI with a voltage divider placed between
REF and GND (Figure 10a). To set the overcharge
threshold, choose R5 in the 1M
range and calculate
R6 from:
where V
REF
= 2.00V, I
CHG,MAX
is the maximum allow-
able charging current, and R
CS
is the current-sense
resistor value.
R6 =
R5
V
I
- 1
REF
CHG,MAX CS
R
I
MAX
Table 5. ReadStatus() Bit Functions
Unused. Always returns 1.
—
0
—
The bit sets when the current flow changes direction. This bit clears when the
configuration word’s CLRINT or SOFTSHDN bit is set, or following a power-on
reset. See Direction-Change Detection Functionsection.
0
1
DIRCHANGE
Charge-Status Indicator. This bit sets upon detection of charging current. The
bit clears upon detection of discharging current.
0
2
CHARGESTATUS
Soft-Shutdown Status Indicator. Returns 1 when the device is in soft-shutdown
mode; returns 0 when it is not in soft-shutdown mode.
0
3
SHDNSTATUS
SETCOUNT Status Indicator. This bit sets when the configuration word’s
SETCOUNT bit is set. This bit clears when SETCOUNT clears.
—
4
COUNTSTATUS
COMPINT-Interrupt Status. This bit sets upon generation of the COMPINT
interrupt. This bit clears in soft shutdown, on a power-on reset, or when the
configuration word’s CLRINT bit is set.
0
5
COMPSTATUS
Overcurrent-Interrupt Status. This bit sets when an overcurrent condition
occurs in the charging direction. This bit clears in soft shutdown, following a
power-on reset, or when the configuration word’s CLRINT bit is set.
0
6
OCSTATUS
Overcurrent-Interrupt Status. This bit sets when an overcurrent condition
occurs in the discharging direction. This bit clears in soft shutdown, following a
power-on reset, or when the configuration word’s CLRINT bit is set.
0
7
ODSTATUS
Unused. Always returns 1.
1
8
—
Unused. Always returns 1.
1
9
—
Unused. Always returns 1.
1
10
—
Unused. Always returns 1.
1
11
—
Unused. Always returns 1.
1
12
—
Unused. Always returns 1.
1
13
—
Unused. Always returns 1.
1
14
—
Unused. Always returns 1.
1
15
—
DESCRIPTION
POWER-ON
RESET STATE
BIT
POSITION
BIT NAME