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.

I2C master mode with read & write operations MSP430F5438

Other Parts Discussed in Thread: MSP430F5438

Hi,

I am new to I2C. I am working on MSP430F5438 experimental board.

I have interfaced STw4102 IC (dual PS usb/wall adapter LiOnCharger with gas gauge ) with it.

I need to communicate with STw4102 (Slave )with I2C protocol(MSP430F5438 as Master)

operation to perform are like

1.read registers of STw4102(for battery monitoring and gas gauge discharge and charge registers)

2.write register of STw4102(control registers)

 

I need help as well as suggestions to write code for above.

I have referred   sample code for Tx and Rx.

MSP430x54x_uscib0_i2c_10.c

MSP430x54x_uscib0_i2c_08.c

 

Thank You,

Pratik KUNJIR.

  • Hi,

    maybe the following app note helps:

    http://focus.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=slaa382&docCategoryId=1&familyId=342

    The associated files contains also the source code for I2C communication. This code is quite modular and allows to operate the I2C module by just calling read and write operations. So with this is should be simple to send the slave specific commands...

    It seems that the app note is written for 2xx family. However, I think the same USCI module is used within the 5xx family. So it should even work there....

    You may take care about the Port pin setup (use PSEL to select module function => the I2C pins ...) .


    Regards.

  • thank you Voyager

     

    Regards,

    Pratik KUNJIR

**Attention** This is a public forum