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.

BQ76940: Setting the OV_TRIP value

Part Number: BQ76940

Good day,

Can someone please confirm if I did the proper steps in setting the correct OV_TRIP value?

From the AFE datasheet:

1. Determine desired OV.

-> Let's say I choose 4.1V

2. Read out [ADCGAIN] and [ADCOFFSET] from their corresponding registers. Note that ADCGAIN is stored in units of μV/LSB, while ADCOFFSET is stored in mV.

-> From reading ADCGAIN1 and ADCGAIN2, I got 0b00000101, and 0b10000010 respectively. Thus, ADCGAIN is 0b00010, which is 367μV/LSB. From reading ADCOFFSET, I got 0b00110000, which is 30mV

3. Calculate the full 14-bit ADC value needed to meet the desired OV trip threshold as follows: OV_TRIP_FULL = (OV – ADCOFFSET) ÷ ADCGAIN

-> Using the formula, OV_TRIP_FULL = (4.1V - 30mV) ÷ 367μV = 11090, or 10 10110101 0010

4. Remove the upper 2 MSB and lower 4 LSB from the full 14-bit value, retaining only the remaining middle 8 bits. This can be done by shifting the OV_TRIP_FULL  binary values 4 bits to the right and removing the upper 2 MSB.

->The result would be 0b10110101. Would this be the correct value?

5. Write OV_TRIP and UV_TRIP to their corresponding registers.


Also, I'm not sure if this is the latest version, but I found a small typographical error (highlighted) in the datasheet:


Thank you very much,

Robert

  • Hi Robert,

    The register bits are numbered right to left with the LSB starting as bit 0, see the BQ76940 data sheet tables 21 and 22: http://www.ti.com/document-viewer/BQ76940/datasheet/read-only-registers-slusbk21201#SLUSBK21201 For the values you read: 

    Gain: 0b00000101, and 0b10000010  Concatenate the bits so gain is 0b01100 or 0x0C; from the lookup table 377uV/LSB or 0.377mV/LSB

    Offset is 0x30 or 48, it is direct mV as you indicate, use the decimal value.

    Calculating those as you did gives a desired OV code of 10748, or 0x29FC.  Picking the middle 2 characters for the register setting would be 0X9F. 

    Thanks for pointing out the typo, we have marked it for a future correction.