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.

msp430 I2C issue

Other Parts Discussed in Thread: MSP-EXP430F5529LP

Hello,

I am using a MSP-EXP430F5529LP and a MSP-EXP430G2 for I2C test. The F5529 as a master receive data from G2553 as a slave.The code is examples  MSP430F55xx_uscib0_i2c_04 and msp430g2xx3_uscib0_i2c_05  from CCS

However,it does not work.And when a start condition is sent ,the UCNACKIFG of F5529 is set.What wrong did I do?

PS:I use two 10K Pull up resistors. Slave address is set as 0x48.Is it right? I have tested it as 0x24 and the result is the same. 

Thanks for your help. 

  • Several things come to mind. First are you trying to send a command from the F5529 to the G2553 and then have the G2553 respond back to the F5529? If so, how about trying just sending a command from the G2553 to the F5529? Also, make sure your hardware is correct. I would make sure that both boards have the same ground. In other words you should have three wires connecting the MSP-EXP430F5529LP to the MSP-EXP430G2. As far as the slave address, from my understanding you can set it to whatever you want whenever you initialize the USCI module. Hope this helps.

  • Thanks for your response,Ricardo.

    I neglected to make the two boards have the same ground. However,after I did that the F5529 program hang on the line "while(UCB0CTL1 & UCTXSTT)" just like that the  Pull up resistors are not used.

  • Try Reading this documents...

    www.ti.com/lit/ug/slau412c/slau412c.pdf

    www.ti.com/lit/an/slaa382/slaa382.pdf

    www.ti.com/lit/an/slaa383/slaa383.pdf

     

    The documents explain in great detail how i2c works. Get the snippet of code and paste it to or project.

  • In master transmit mode, UXTXSTT won’t clear (the USCI won’t complete the start byte) unless you write the first byte to send to TXBUF or set UCTXSTP.

    falling leaves said:
    Pull up resistors are not used.

    What do you mean by this? Don'T oyu use hte internal pull-ups or don't you have external ones or none at all?

    Note that the internal pull-ups are way too weak for I2C. You need external pull-ups of 10k or less (for higher speeds, 4.7k or even down to 1k, the internal ones are ~40k). Also, on 5x family, the internal pull-ups are automatically deactivated if a port pin is in output direction.

**Attention** This is a public forum