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.

CCS/BQ76PL455A-Q1: Reading bFrame in example code

Part Number: BQ76PL455A-Q1

Tool/software: Code Composer Studio

Hi,

Im using the example code to read cell voltages and storing them in bFrame as is already written there, when doing this I get some very strange values that are not hexadecimal numbers, the screenshot below shows these, why could these be occurring as the voltage readings of the connected cells are currently not decipherable without hexadecimal numbers?

Thanks,

Alex

  • Hi Alex,

    Please try to right click on the value and "select all" (alternatively highlight all of the "Value" column). There should be an option to change the format of the data to Hex
  • Hi David, Thanks for showing me how to do this, for some reason the readings I'm getting are showing the cells are in the order of mV rather than the actual 3.5V, Ive measured the voltage at the Vsense pins at it is the same as the cells measure when using a multimeter, could I be reading the bFrame array incorrectly?

    Thanks,
    Alex
  • Hi Alex,

    I am happy to help.

    The first byte in the return packet is an initialization frame, not cell data.

    The second and third byte will be the MSB and LSB of the first thing you have selected in the CHANNELS register.

    For a cell voltage, you have to concatenate the MSB and LSB [something like this - (MSB<<8)|LSB ]. This will give you the 16 bit ADC reading in hex.

    From there, you must convert the hex to decimal (the compiler will likely do this for you, if doing the math by hand I use a simple phone app or google). Then, multiply the two byte value by 5/65535. This is 2x the reference voltage, divided by (2^16)-1. This will get you to the cell voltage.

    For other measurements, you can find the formulas in the datasheet.
  • Hi David,

    Once again you've been a great help, cheers for all the information!

    Have a great weekend,

    Thanks,
    Alex
  • Thanks Alex, always happy to help.

    Enjoy your weekend as well.