Datasheet

n
Read block
The particular protocol used is a function of the com-
mand. The protocols used are shown in Figure 3.
Host-to-bq2040 Messages
(see Table 4)
ManufacturerAccess() (0x00)
This read/write word is an open location.
Input/Output: word.
RemainingCapacityAlarm() (0x01)
This function sets or returns the low-capacity alarm
value. When RM falls below the RemainingCapac
-
ityAlarm value initialized from the external EE
-
PROM, the Remaining_Capacity_Alarm bit is set in
BatteryStatus. The system may alter this alarm dur
-
ing operation.
Input/Output: unsigned integer. This sets/returns
the value where the Remaining_Capacity_Alarm
bit is set in Battery Status.
Units: mAh
Range: 0 to 65,535mAh
RemainingTimeAlarm() (0x02)
This function sets or returns the low remaining time
alarm value. When the AverageTimeToEmpty falls be
-
low this value, the Remaining_Time_Alarm bit in Bat
-
teryStatus is set. The default value for this register is
programmed in EE 0x02-0x03.. The system may alter
this alarm during operation.
Input/Output: unsigned integer. This sets/returns
the value where the Remaining_Time_Alarm bit is
set in Battery Status.
Units: minutes
Range: 0 to 65,535 minutes
BatteryMode() (0x03)
This read/write word selects the various battery opera-
tional modes. The bq2040 supports the battery capacity
information specified in mAh. This function also deter-
mines whether the bq2040 charging values are broad-
casted to the Smart Battery Charger address.
Writing bit 14 to 1 disables voltage and current Master
Mode broadcasts to the Smart Battery Charger. Bit 14 is
automatically reset to 0 if SMBC and SMBD = 0 for
greater than 2 seconds (i.e. pack removal).
Writing bit 13 to 1 disables all Master Mode broadcasts
including alarm messages to the Smart Battery Charger
and Host. The bit remains set until overwritten. Pro
-
gramming bit 3 of FLAGS2 in the EEPROM (EE0x3f)
initializes this bit to a 1.
Bit 7 is the condition request flag. It is set when the
bq2040 is initialized from the EEPROM and reset when a
learning cycle has been completed. It is also set toa1if
CycleCount increases by 32 without a new learning cycle.
AtRate() (0x04)
This read/write word is the first half of a two-function
set used to set the AtRate value used in calculations
made by the AtRateTimeToFull and AtRateTime
-
ToEmpty.
11
bq2040
FG204001.eps
S
Battery Address
0001011
0 A Command Code A Data byte low A Data byte high AP
11818181171
S
Battery Address
0001011
0 A Command Code A Battery Address A1
117181171
S
1
AA
1818
PData byte low Data byte high
S
Battery Address
0001011
0
A Command Code A Battery Address A1
117181171
S
1
AA
1818
Byte Count =N Data byte 1
AA
1818
PData byte 2 Data byte N
1
bq2040
System Host
Block Read
Read Word
Write Word
A – ACKNOWLEDGE
A – NOT ACKNOWLEDGE
S – START
P – STOP
Figure 3. Host Communication Protocols