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.

MSP430 I2C communication

Other Parts Discussed in Thread: BQ27500

Hi,

Has anyone tried I2C communication with MSP430 and bq27500(fuel guage),

http://focus.ti.com/docs/toolsw/folders/print/bq27500evm.html

I tried using the USCI I2C Master program from the below link,

http://focus.ti.com/lit/an/slaa382/slaa382.pdf

I have set the I2C address of bq27500 as 0xAA ,but everytime I execute the program

in the slave_present() routine I get no acknowlegment(i.e address was not found)..

Does anyone has a proper algorithm or sample code to communicate between MSP430 and bq27500..

please help me...

Thankyou and regards....

 

 

  • Chakra,

    I have not personally used this BQ device, but I’ve seen this several times before with our I2C modules and the “problem” could amount to semantics.  The address is a 7-bit value placed into an 8-bit register, and it gets justified in a specific way, but other manufacturers or users may expect it to get justified the other way.  Basically, the “workaround” is to simply shift the address that one puts in the register.  That’s the only way to get two “mis-matched” devices to align.

    Hope that helps!

  • The I2C slave address register is only 7 bits, so the address must be right-shifted one bit:  0x55. The LSB in 0xAA is the R/W bit, ie. 0xAA for read, 0xAB for write.

  • Actually, it's 0xAA for write, 0xAB for read. Either way, you need 0x55 in the slave-address register.

  • Hello,

    Thankyou for the quick reply,it worked fine with the slave address 0x55,

    I checked writing/reading data with addresses 0xAA and 0xAB,I am reading the Cell Voltage using the

    command 0x08 as given in the below appl note,

    http://focus.ti.com/lit/an/slua467/slua467.pdf

    In the MSP430 ram I am getting the values like 0x01,0xA1 from bq27500,

    how do I decode these values into voltage?

    and also does anybody has sample programs on DFI Programming(bq27500) using MSP430....

     

    Thanks for your help...

  • Chakra said:

    In the MSP430 ram I am getting the values like 0x01,0xA1 from bq27500,

    how do I decode these values into voltage?

    and also does anybody has sample programs on DFI Programming(bq27500) using MSP430....


    I would suggest looking at the bq27500 datasheet to determine how to interpret the value 0xA101 into a voltage.
    http://focus.ti.com/docs/prod/folders/print/bq27500.html

    The resolution of this value is mV.

**Attention** This is a public forum