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.

MSP430F249: I2C Not functioning as expected

Part Number: MSP430F249


I am trying to set up I2C communications with a touch screen controller. I am using the routines from TI for this chip. I have attached my code and the I2C driver code I got from TI as well as screen shots of an o-scope attached to I2C bus clk and data pins. I am trying to send to I2C address 0x4A but the waveforms appear to be addressed to 0x95. I am also trying to send two bytes of data but it appears that only one byte is sent. Any suggestions on what is wrong?WFO_files.zip

  • [I'll take the easy part:] If you set I2CSA=0x4A, the SLA byte (for a Read) will look like 0x95=((I2CSA << 1) | 0x01). I.e. I think that part is normal.

  • Yes you are correct, with a 7 bit address the xmitted address is shifted over one bit and lsb of byte set to either read or write. I also fixed the other issue of not sending the correct amount of data. My routine was allowing a second I2C process to start before the first was done and this over wrote some registers while I2C was in process. Used notready function to not allow multiple I2C processes to start.

**Attention** This is a public forum