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.

FDC1004EVM: MSP432 + FDC1004 over I2C; Having trouble establishing connection

Part Number: FDC1004EVM
Other Parts Discussed in Thread: FDC1004, ENERGIA

Hello, I am trying to sense liquid level using an FDC1004 and an MSP432. I purchased the EVM board and broke off the FDC1004 in order to connect it to an MSP432. I have been trying for the past week to get the information from the 1004 to the MSP432 over the I2C protocol but I have had no luck. I have downloaded the sample project for Energia and attempted to run it without any luck (uses Wire library). It seems the code is hanging on 

Wire.endTransmission();

• I thought there may be an I2C issue, so I ran an I2C sweep in Energia and sure enough it doesn‘t find the 1004. Strangely enough I attempted to run the I2C sweep on an Arduino Uno and it was able to find the FDC1004 at address 0x50 sometimes.

• I have 10k pull-up resistors to 3.3v on both SDA and SCL

• I connected FDC1004 SDA->6.4 & SCL->P6.5 of MSP432 (I also tried 1.6 & 1.7 on MSP432 with no luck)

• FDC1004 is connected to MSP432 3.3V

• I am doing this all on a standard breadboard

Please if anyone can help me it would be much appreciate, I am still new to I2C and TI. I am willing to use other software, anything to get it working! Looking forward to hearing back. 

  • Dan,

    A couple of preliminary items to confirm before we take a deeper dive into your problem:

    1. The FDC1004 EVM schematic shows ~5k resistors on the SDA and SCL lines.
    Its hard to imagine the value differences could be the problem, but please change your board's values to 4.99k to see if it helps.

    2. The data sheet gives the following:

    8.5.1 Serial Bus Address
    To communicate with the FDC1004, the master must first address slave devices via a slave address byte. The slave address byte consists of seven address bits and a direction bit that indicates the intent to execute a read or write operation. The seven bit address for the FDC1004 is (MSB first): b101 0000.

    Are your  protocols following this?

    Regards,
    John

  • Hi John,

    1) I happen to have 4.7k resistors on the right now, will these suffice? Don't think I have the exact value (4.99k).

    2) I open the I2C connection with Wire.begin() and then every time I wish to communicate I do Wire.beginTransmission(0x50). This is the address from that data sheet. I wanted to be sure, so I ran the code below (simple I2C scanner) but it doesn't find the 1004 at any address. However, when I run the scanner on an Arduino Uno, it will (if I hold the wires in the breadboard juuust right). This makes me think I have something wrong wired up? But I cannot for the life find where it might be.

    #include <Wire.h>
    
    void setup() {
      Wire.begin();
    
      Serial.begin(9600);
      while (!Serial); // Leonardo: wait for serial monitor
      Serial.println("\nI2C Scanner");
    
    }
    
    void loop() {
      int nDevices = 0;
    
      Serial.println("Scanning...");
    
      for (byte address = 1; address < 127; ++address) {
        // The i2c_scanner uses the return value of
        // the Write.endTransmisstion to see if
        // a device did acknowledge to the address.
        Wire.beginTransmission(address);
        byte error = Wire.endTransmission();
    
        if (error == 0) {
          Serial.print("I2C device found at address 0x");
          if (address < 16) {
            Serial.print("0");
          }
          Serial.print(address, HEX);
          Serial.println("  !");
    
          ++nDevices;
        } 
        else{
          Serial.print("Error ");
          Serial.print(error);
          Serial.print(" at address 0x");
          if (address < 16) {
            Serial.print("0");
          }
          Serial.println(address, HEX);
        }
      }
      if (nDevices == 0) {
        Serial.println("No I2C devices found\n");
      } else {
        Serial.println("done\n");
      }
      delay(2000); // Wait 5 seconds for next scan
    
    }

  • I also put LED's in place on the SCL and SDA lines to see when there is data being passed. When connected to the Arduino they seem to flash properly to indicate data is being transmitted, however they are always off when connected to the MSP432.

  • Dan,

    Can your MSP432 to communicate with some other board via the I2C?

  • Hi John,

    I used the arduino board to test this.

    The arduino acting as a master can find the 432 as a slave. BUT the 432 acting as a master cannot find the arduino as a slave.

  • Dan,

    After conferring with my colleagues, this sounds like an issue with the MSP432.

    I will transfer this thread to that E2E forum so the experts can help get it resolved.

    Thank you for your patience.

  • Hello, thank you for the help! I will keep checking back and try to get some more work over the weekend. Hopefully I can get something new to work. 

**Attention** This is a public forum