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.

TMS320F28335: I2C 10 bit addressing

Part Number: TMS320F28335


Do you manually set the high bits of a ten bit address before writing it to the I2CSAR register (i.e. I2CCAR = 0x7800 + SlaveAddress) or does the module take care of that for you when 10 bit addressing mode is selected?

  • Andrew,

    I regret I am unable to understand your concern. Could you please explain further? Also, there is no register called "I2CCAR"

  • For I2C 10 bit addressing the master sends the slave address in two separate byte transfers. The first byte consists of 11110b, the two MSB's of the 10 bit address, and R/Wn=0 (write). My question is does the I2C module prepend the 11110b to the salve address in 10 bit addressing mode or is the coder supposed to prepend the 11110b to the slave address before writing the address to the I2CSAR register?
  • To tell the module to use 10-bit addresses, you set the XA bit in the I2CMDR register. This applies to both master and slave modes. After this, all you need to do is to write the 10-bit address “as is” into I2CSAR. The IP understands this is a 10-bit address. It then automatically appends that “11110” to the two MSB's of the 10 bit address in the first byte. The rest 8-bits of the 10-bit address follow in the next byte.