This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ2050h PPU/D register read

Other Parts Discussed in Thread: BQ2050H, UC3906, BQ2050

Hello,

I have a design that is utilising a BQ2050h gas gauge IC to report battery capacity. The battery is a 12V lead acid and is charged using a UC3906 IC.

I am at a stage where I am attempting to program the expected battery capacity using pull-up/down resistor on the SEGx lines. The values reported when reading the PPU/PPD registers, though appear fixed at 0x81 and 0x80 respectively with no changes when the resistors are changed from SEGx lines. I am using 100K as suggested in the application circuits. I presume these registers only update on initialisation and hence am power cycling the BQ2050h on changes to the resistors.

Look forward to your replies.

 

  • Hello Chakras,

    Please read the pin description for LCOM in the data sheet.  The program pins are also used for LED drivers, so the LCOM output that provides power to the LEDs cannot be enabled while the programming resistors are read.  The program resistors are only read on a Power on Reset.

    Bill

  • Thank you for the reply Bill.

    I understand your statement about LCOM and its relevance to the programming pins only being read at power on. This doesn't though explain why PPU?PPD and LMD registers are not updated in accordance to the programming resistors.

  • Hello Shakras,

    Tthe RBI capacitance tries to preserve the RAM content during a power loss.  If you only have power off for a little while, the RAM corruption test won't detect loss of content and there will not be a full reset.  The Reset requirements are on page 4 of the data sheet.  You can short from RBI to Vcc for 15 seconds while power is removed, or you can write 0x00 over the HDQ line to addresses 0x1E and 0x05.

    Bill

  •  

    Thanks for your response Bill. As a continuation to the issue I have outlined above, I have implemented code to reset the BQ2050 via HDQ line.

    Further questions arise as the reset register doesn't confirm the reset as the RST bit remains fixed at  '0'. Positive response of sorts is seen in the LMD register which changes according the PROG1 and 2 programming resistors, but remains fixed for all PROG3/4 settings. Also PPU and PPD remain unchanged at 0x81 and 0x80.

    Hence I still am unable to confirm the correct setting of PFC for the required battery on initial power-up, which is required prior to the learning of the actual battery capacity.

    I would be grateful if you could confirm the issue I am seeing and offer remedial assistance.

    As an aside, I can confirm that the registers are being read and written correctly by the PIC program due to the expected response from the BATID register.

  • Hello Chakras,

    The RST bil will not set if you force the reset by writing 0 to PPFC and LMD.  The gauge will also reset if you set the RST bit in register 0x39, but this is not recommended as described in the data sheet, since if you accidently set other bits in this register, you may get unexpected results.

    LMD is initially set to the high byte of PPFC (PPFC/256), so if LMD is changing with different PROG1 and PROG2 values, you know PPFC is also changing.  Also the PPFC is shown in the second column of the evaluation software data screen.  LMD (or PPFC) does not change with PROG3 or PROG4 values (see data sheet Table 2).  The gauge handles a number of different battery capacities for each PPFC value (PROG3 and PROG4 settings) by causing the gauge to add or subtract different count values for a fixed coulometric change (scale factor).  Perhaps you are having some communication problems that may explain why you aren't seeing PPU and PPD change with different program resistors (after resetting the part).  If you have an EV2200 interface module from TI, you can download and use the EV22xx-H evaluation software from the TI web site at the link:  http://focus.ti.com/docs/toolsw/folders/print/ev2200.html

    Since you have indicated that LMD changes with PROG1 and PROG2, it's also clear that PPU and PPD are changing when the program resistors are changed.  When the gauge is reset, the PPU and PPD values are first recalculated.  The firmware subsequently determines the new PPFC, LMD, and other internal values from the PPU and PPD registers.  If PPU and PPD don't change, then it's clear that PPFC, LMD, and other internal values won't change.

    Bill