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.

MSP430F169: Can't get I2C communication between MSP430 and SI514-PROG-EVB

Part Number: MSP430F169

I am trying to first just establish I2C communication between an MSP430F169 and an SI514-PROG-EVB. This is how I have it connected:

And this is the output on the logic analyzer:

That is the problem, it always gives NAK, I can't get it to ACK.

Here is the sentence from the SI-514-PROG-EVB that explains how to make the I2C connection, to check that it matches the way I drew it (and connected

Also, when I have the MSP430 not connected to the SI514 at all, I get the exact same output on the logic analyzer (shown above). But when I have the MSP430 connected to the SI514, but I remove the USB power from the SI514, I get this on the logic analyzer:

Lastly, here is my code. It is mostly from some examples. The slave address is correct:

int main(void)

{
WDTCTL = WDTPW + WDTHOLD;

P3SEL |= 0x0A; // Set P3.3 to SCL and P3.1 to SDA
U0CTL |= I2C + SYNC; // Switch USART0 to I2C mode
U0CTL &= ~I2CEN; // Recommended I2C init procedure
I2CTCTL = I2CSSEL_2; // SMCLK
I2CSCLH = 0x03; // High period of SCL
I2CSCLL = 0x03; // Low period of SCL
I2CNDAT = 0x01; // Transmit one byte
I2CSA = 0x55; // Slave address
U0CTL |= I2CEN; // Enable I2C, 7 bit addr,

while(1)
{

U0CTL |= MST;
I2CTCTL |= I2CSTT + I2CSTP;

__no_operation();
}


}

  • Hi Charles,

    What is the slave address of the SI514-PROG-EVB?  The documentation mentions something about a user configurable address  The reason you see only a NACK is 1) the device is not connected or improperly connected, or 2) you are sending the wrong address.

    I see in your code you are sending 0x55, which gets shifted out = 0xAA, but the logic probe is showing 0xAB, which indiates you are performing a read operation.  Based on document, you need to perform a write first to set the register, then a read.  That might having something to do with it.

    Charles Wolfe1 said:
    But when I have the MSP430 connected to the SI514, but I remove the USB power from the SI514, I get this on the logic analyzer:

    Regarding the flat lines on your logic probe when you remove USB power, its hard to tell for certain but what supply are the 10k pullup resistors tied to?

    Charles Wolfe1 said:
    Also, when I have the MSP430 not connected to the SI514 at all, I get the exact same output on the logic analyzer (shown above).

    I'm not sure you are doing this.  Without the MSP430 connected, what is generating the I2C signals?

    And are you using the 3.3v supply configuration SI514-PROG-EVB?

  • 1.) I will try doing a write first, but I know I have tried to do just a write (not a write then read) and I still got a NACK and nothing else. Maybe I did the code wrong. I will try again

    edit: I tried doing a write, but it just outputs 0xAA and NACK instead of 0xAB and NACK. I don't think I can do anything without first getting an ACK, but maybe my code is wrong, here it is:

    U0CTL |= MST;                                    

    I2CTCTL |= I2CSTT + I2CSTP + I2CTRX; 

    while((I2CIFG & TXRDYIFG) == 0);       //wait for transmit to be ready

    I2CDRB = 0xFF;                                     // random data

    2.) The 10k pullup resistors are tied to the 3.3V power of the MSP430

    3.)  The MSP430 is connected to the computer, so it has power, but it is not connected to the SI514-PROG-EVB. So the MSP430 is generating the I2C master signals, but not getting any I2C signals in response, so it just says NACK.

    4.) The SI514-PROG-EVB is defaulting to 1.8 V when I connect it to the computer by USB. I can change it using the GUI that comes with it to 3.3 V, but it won't stay that way, it will go back to 1.8 V if I unplug it and plug it back in. So I want to connect it to the MSP430's 3.3 V power, but I need the right connectors to do that, I've been trying to get them. Do you think that might be the problem? That the SI514-PROG-EVB is at 1.8 V and not 3.3 V?

  • Hi Charles,

    Are you sure you don't have the SDA and SCL lines swapped?

    Your code looks fine.   The first byte sent by the master is the slave address and the slave will ACK if it matches its internal addrs.

    There is the possibility of damage to the 1.8v outputs on the SI514-PROG-EVB if its connected to the 3.3v I2C, so as long as you are able to configure it to 3.3v before connecting it to the 3.3v I2C lines you should be fine.

    Here is crazy idea.  You could try to scan the SI514-PROG-EVB for its slave address with a simple look that attempts to write the SI514-PROG-EVB starting with a slave address = 0x00 and increment it each time through the loop.  You might discover the slave address is something other than 0x55.  Just a thought.

  • We are just going to use the SI514 chip without the board, so it should be easier. If I have trouble with that, I will post another question. Thank you for helping.

**Attention** This is a public forum