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 on a C6414/5/6

We need to use an I2C interface on our existing design which has a C6416 chip. Obviously this DSP does not support I2C natively, and so we either need an interface chip or do some bit banging using GPIO. Because I2C is such a popular interface, does anyone know if there is a an application note to this effect, or if there is already some example code that is available for reference. I know there is an app note on how to make a UART out of a McBSP, but I didn't see one on I2C. If anyone has any ideas, that would be great. 

Kris

  • I don't recall there ever having been an app note to implement software I2C on 64x.  I've seen such app notes for other processors.  For example:

    MSP430 Interface to TPS60250 via I2C Master Software

    Perhaps you could port that example to run on the 6416.  Just make sure you don't actually drive the pin high.  You want to instead change the direction to "input" so the pin goes to high impedance and then let the external pullup resistor bring the pin back high.  After changing the clock pin to an input you should poll the status of that register to wait for it to return high, i.e. to allow for "clock stretching" by the slave device.  (Perhaps the MSP430 implementation already does that, but if not I would add the extra line of code.)

    Good luck!

    Brad

     

  • Another option is to use the McBSP in SPI mode with an SPI to I2C bridge. The "TMS320C6000 McBSP: Interface to SPI ROM (rev C) app note (SPRA487C) can be used as an example.