beautypg.com

Ds 2 7 8 8, Stand-alone fuel-gauge ic with led display drivers, Sense resistor temperature compensation – Rainbow Electronics DS2788 User Manual

Page 10: Current accumulation

background image

D

S

2

7

8

8

current-sense resistors. RSGAIN is an 11-bit value

stored in 2 bytes of the parameter EEPROM memory

block. The RSGAIN value adjusts the gain from 0 to

1.999 in steps of 0.001 (precisely 2

-10

). The user must

program RSGAIN cautiously to ensure accurate current

measurement. When shipped from the factory, the gain

calibration value is stored in two separate locations in

the parameter EEPROM block: RSGAIN, which is repro-

grammable, and FRSGAIN, which is read only. RSGAIN

determines the gain used in the current measurement.

The read-only FRSGAIN (address B0h and B1h) is pro-

vided to preserve the factory value only and is not used

in the current measurement.

Sense Resistor Temperature

Compensation

The DS2788 is capable of temperature compensating

the current-sense resistor to correct for variation in a

sense resistor’s value over temperature. The DS2788 is

factory programmed with the sense resistor temperature

coefficient, RSTC, set to zero, which turns off the tem-

perature compensation function. RSTC is user accessi-

ble and can be reprogrammed after module or pack

manufacture to improve the current accuracy when

using a high temperature coefficient current-sense

resistor. RSTC is an 8-bit value stored in the parameter

EEPROM memory block. The RSTC value sets the tem-

perature coefficient from 0 to +7782ppm/°C in steps of

30.5ppm/°C. The user must program RSTC cautiously to

ensure accurate current measurement.

Temperature compensation adjustments are made

when the Temperature register crosses 0.5

°

C bound-

aries. The temperature compensation is most effective

with the resistor placed as close as possible to the V

SS

terminal to optimize thermal coupling of the resistor to

the on-chip temperature sensor. If the current shunt is

constructed with a copper PCB trace, run the trace

under the DS2788 package if possible.

Current Accumulation

Current measurements are internally summed, or accu-

mulated, at the completion of each conversion period

with the results displayed in the ACR. The accuracy of

the ACR is dependent on both the current measure-

ment and the conversion time base. The ACR has a

range of 0 to 409.6mVh with an LSb (least significant

bit) of 6.25µVh. Additional read-only registers (ACRL)

hold fractional results of each accumulation to avoid

truncation errors. Accumulation of charge current

above the maximum register value is reported at the

maximum register value (7FFFh); conversely, accumu-

lation of discharge current below the minimum register

value is reported at the minimum value (8000h).

Read and write access is allowed to the ACR. The ACR

must be written MSB (most significant byte) first, then

LSB (least significant byte). The write must be complet-

ed within 3.515s (one ACR register update period). A

write to the ACR forces the ADC to perform an offset

correction conversion and update the internal offset

correction factor. Current measurement and accumula-

tion begins with the second conversion following a write

to the ACR. Writing the ACR clears the fractional values

in ACRL. ACR’s format is shown in Figure 8, and

ACRL’s format is shown in Figure 9.

To preserve the ACR value in case of power loss, the

ACR value is backed up to EEPROM. The ACR value is

recovered from EEPROM on power-up. See the memo-

ry map in Table 3 for specific address location and

backup frequency.

Stand-Alone Fuel-Gauge IC with
LED Display Drivers

10

______________________________________________________________________________________

ACR

R/W AND EE

MSB—ADDRESS 10h

LSB—ADDRESS 11h

2

15

2

14

2

13

2

12

2

11

2

10

2

9

2

8

2

7

2

6

2

5

2

4

2

3

2

2

2

1

2

0

MSb

LSb

MSb

LSb

UNITS: 6.25µVh/R

SNS

Figure 8. Accumulated Current Register (ACR) Format