beautypg.com

Current accumulation, Figure 7. accumulated current register format, Current offset bias – Rainbow Electronics DS2745 User Manual

Page 9: Figure 8. current offset bias register format

background image

DS2745 Low-Cost I

2

C Battery Monitor

9 of 14

CURRENT ACCUMULATION

The Accumulated Current register (ACR) serves as an up/down counter holding a running count of charge stored in
the battery. Current measurement results, plus a programmable bias value are internally summed, or accumulated,
at the completion of each current measurement conversion period with the results displayed in the ACR. The ACR
has a range of 0mVh to +409.6mVh with an LSb of 6.25µVhAdditional registers hold fractional results of each
accumulation, however, these bits are not user accessible. The ACR count clamps at FFFFh when accumulating
charge values and at 0000h when accumulating discharge values.

Read and write access is allowed to the ACR. Whenever the ACR is written, fractional accumulation results are
cleared. A write to the ACR also forces the ADC to measure its offset and update the offset correction factor.
Current measurement and accumulation resume (using the new offset correction) with the second conversion
following the write to the ACR. Figure 7 describes the ACR address, format, and resolution.

Figure 7. ACCUMULATED CURRENT REGISTER FORMAT

MSB—Address

10 LSB—Address

11

S 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

“S”: sign bit

Units:

6.25

mVh/Rsns

Table 4. ACCUMULATED CURRENT RANGE FOR VARIOUS RSNS VALUES

ACR RANGE

R

SNS

V

SS

- V

SNS

20m

m 15mm 10mW 5mW

409.6mVh 20.48Ah 27.31Ah 40.96Ah 81.92Ah

CURRENT OFFSET BIAS

The Current Offset Bias register (COBR) allows a programmable offset value to be added to raw current
measurements. The result of the raw current measurement plus the COBR value is displayed as the current
measurement result in the CURRENT register, and is used for current accumulation. The COBR value can be used
to correct for a static offset error, or can be used to intentionally skew the current results and therefore the current
accumulation.

Read and write access is allowed to COBR. Whenever the COBR is written, the new value is applied to all
subsequent current measurements. COBR can be programmed in 1.56

mV steps to any value between +198.1mV

and -199.7

mV. The COBR value is stored as a two’s complement value in volatile memory, and must be initialized

via the interface on power-up. Figure 8 describes the COBR address, format, and resolution.

Figure 8. CURRENT OFFSET BIAS REGISTER FORMAT

Address

61

S 2

6

2

5

2

4

2

3

2

2

2

1

2

0

MSb

LSb

“S”:

sign

bit

Units:

1.56

mV/Rsns