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.

TMDSDOCK28069: I2C implementation

Part Number: TMDSDOCK28069
Other Parts Discussed in Thread: CONTROLSUITE

I have interfaced PCF8563 RTC using I2C by bit banging.

I wanted to use inbuilt I2C peripheral on F28069 device by enabling interrupt.

Is there any example provided for the same? 

  • Hello Ravi,

    All available software examples can be found by installing controlSUITE and looking in ...ti\controlSUITE\device_support\f2806x.

    Best Regards,
    Adam Dunhoft
  • Please Sir can you put more light into this, 

    I'm referring  to the I2C eeprom example given in controlSUITE. If I have to write the below code before the infinite loop.

    Start | Write(address)+receive ACK from slave |  Write(register)+receive ACK from slave | Write(data)+receive ACK from slave | Stop

    how can the above be achieved if it is repeated for 6 times with different register locations with the I2C example code? the address, register location and data is of 8-bit.

    If I have to write to different register locations what should be done?.

    Inside the infinite loop:

    Now for reading I was using:

    Start | Write Address | Write register address | Stop | Start | Write Read address | Read 8-bit from SDA line & send ACK | Read 8-bit from SDA line & send ACK | Read 8-bit from SDA line & send NACK | Stop.

    How can the above be achieved using I2C hardware?

    Please help.

  • We can't write your code for you, but if you have specific questions, we'll be happy to help. You can learn more about the I2C module in the F2806x TRM:

  • 1)

    The initialization of I2C is:
    void I2CA_Init(void)
    {
    // Initialize I2C
    I2caRegs.I2CSAR = 0xA2; // Slave address - PCF8563

    I2caRegs.I2CPSC.all = 8; // (90MHz/9)
    I2caRegs.I2CCLKL = 20;
    I2caRegs.I2CCLKH = 20;
    I2caRegs.I2CIER.all = 0x24; // Enable SCD & ARDY interrupts

    I2caRegs.I2CMDR.all = 0x0020; // Take I2C out of reset
    // Stop I2C when suspended

    I2caRegs.I2CFFTX.all = 0x6000; // Enable FIFO mode and TXFIFO
    I2caRegs.I2CFFRX.all = 0x2040; // Enable RXFIFO, clear RXFFINT,

    return;
    }

    The PLL clock settings are:
    InitPll(18,2);

    I'm getting the I2C clock of 100 kHz, but as per calculation the clock should be of 200 kHz.
  • Strange. Do you have any other clock setup code? You might try scoping XCLKOUT to verify that the system is really running at 90 MHz.