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.

TMS320F28379D: I2C RTC EEPROM Query

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Dear Support team,

I want to interface MCP79412 - I2C Real-Time Clock/Calendar with SRAM, EEPROM with TMS320F28379D, For RTC as well as EEPROM. 

As was referring C2000ware example I2C_ex2_eeprom and i have seen in this code that SLAVE_ADDRESS is 0x50 (8 bit) and in struct I2CMSG i2cMSGOut MSG_STATUS_SEND_WITHSTOP is 0x0010 and I2CMSG i2cMSGIn MSG_STATUS_SEND_NOSTOP is 0x0020 which is used for write and read bit.

But as per datasheet of MCP79412 it has 7 bit slave address and last bit represent to read or write bit so complete address become 8 bit (include read or write bit). But in C2000ware example I2C_ex2_eeprom slave address is itself 8 bit and read/write bit is extra 1 bit.

So please provide solution or suggest which code i need to refer from C2000ware.

Regards

Sachin Kumar Gupta

  • Hi Sachin,

    I'd recommend you reference the SW examples in C2000WARE that utilize the i2cLib_FIFO files. Directory location is below, see ex4-ex6 for this. They should be easier for you to utilize.

    C:\ti\c2000\C2000Ware_4_01_00_00\driverlib\f2837xd\examples\cpu1\i2c

    But as per datasheet of MCP79412 it has 7 bit slave address and last bit represent to read or write bit so complete address become 8 bit (include read or write bit). But in C2000ware example I2C_ex2_eeprom slave address is itself 8 bit and read/write bit is extra 1 bit.

    The slave address will be 7-bits, i.e. 7-bit addressing mode will be used. The R/W bit is set based on if the C2000 I2C module is in transmit or receive mode (I2CMDR register).

    Best,

    Kevin