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 code

Other Parts Discussed in Thread: PCF8575, TMS320F28069

Hi,

          I am sagar Yadav. I am using TMS320F28069 Micro controller for my application.In which I am using Internal I2C as well as we required one more I2C Peripheral so I wrote I2C Driver.But I am not able to communicate with slave i.e. PCF8575.I can communicate with this slave through internal I2C.We want to run I2C on 100Khz. I think my SCL is not properly working.

Please find attached file of code for information.

  • I hope you are aware I2C bus can support multiple devices, why don't you connect all your devices in the available I2C channel? Up to 8 nos of PCB8575 can be connected together as they have 3 address pins.

    Bit bang method cannot work without a accurate clock, not possible with program delays.

    Your delay function generate approx 50x4x11ns = 2uS, and not guaranteed with ISR running.

    Cheers

    Joy

  • Hi Joy ,

          Thanks for the reply.

            My application is required 16 nos. of PCF8575 out of which 8 nos. of PCF8575  I am interface with the Internal I2C. Remaining 8 ICs  I am interface with I/O based I2C Driver.

    Why address is different as per the I2C driver?

    I am interfacing PCF8575 with controller using inbulid I2C it  take address 0x20 and with the same IC using I/O based I2C driver it take add. is 0x40;