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.

FDC1004 i2c communication

Other Parts Discussed in Thread: FDC1004

Hello I wander "fdc1004" about Write and Read Freame. This datsheet suggest Device Usage.

1. Configure measurements (for details, refer to Measurement Configuration).

2. Trigger a measurement set (for details, refer to Triggering Measurements).

3. Wait for measurement completion (for details, refer to Wait for Measurement Completion).

4. Read measurement data (for details, refer to Read of Measurement Result).

So, I think like that as below.

-----------------------------------------------------------------------------------------

1. Configure measurements(I think that this step is "Write Frame")

(1) i2c start bit

(2) serial bus address+write bit --Frame1

0xa0

(3) pointer register --Frame2

0x08 (CONF_MEAS1)

(4) data msb from slave --Frame3

 0x10

(5) data lsb from slave --Frame4

0x00

(6) i2c stop bit

2. Trigger a measurement set(I think that this step is "Write Frame")

(1) i2c start bit.

(2) serial bus address+write bit --Frame1

 0xa0

(3) pointer register --Frame2

 0x0c (FDC_CONF)

(4) data msb from slave --Frame3

 0x04

(5) data lsb from slave --Frame4

 0x00

(6) i2c stop bit

3. Wait for Measurement Completion I don't know which is proper frame.

I also wander how to make steps.

4. Read measurement data

In my opinion, this step need "two Read Frame" because of Meas1_MSB and Meas1_LSB, That is to say the measurement results span 2 register address.

4.1 about MEAS1_MSB

(1) i2c start bit

(2) serial bus address+write bit --Frame1  

0xa0

(3) pointer register --Frame2

0x00 (MEAS1_MSB)

(4) serial bus address+read bit  --Frame3

0xa1

(5) data msb from slave --Frame4

 I don't konw how to configure

(6) data lsb from slave --Frame5  

I don't konw how to configure

(7) i2c stop bit --Frame6

4.2 about MEAS1_LSB

(1) i2c start bit

(2) serial bus address+write bit --Frame1

0xa0

(3) pointer register --Frame2  0x00 (MEAS1_MSB)

(4) serial bus address+read bit  --Frame3

 0xa1

(5) data msb from slave --Frame4

 I don't konw how to configure

(6) data lsb from slave --Frame5  

I don't konw how to configure

(7) i2c stop bit --Frame6

-----------------------------------------------------------------------------------------

even if I read datasheet, some information is confused. So, I guess it. I want to konw that my thiking is correct or not. And I want more detail steps using

example like that my opinion.

  • Moved to Capacitive Sensing Forum for support of FDC1004
  • Hi:

    If you do not understand the standard I2C protocol, please review it using one of the many tutorials online out on the internet. The same protocol applies, it's just the way you need to send the data, which is explained below. We do not explain the entire protocol, only how the data is suppose to be send to communicate with the device.

    For writes:

    TX Slave Addr

    TX Register Addr

    TX MSB data

    TX LSB data

    For reads:

    TX Slave Addr

    TX Register Addr

    RX MSB data

    RX LSB data

    You need to perform a write if you need to change any register settings for operation of the device. You need to perform a read if you need to read back data. The actual commands and how to transmit and receive will be dependent on what I2C driver codes you use.

    Thanks

    -David Wang

    Capacitive Sensing Applications

  • Hi David,
    I'm looking at the datasheet for the FDC1004 (Revised April 2015), and it seems like the "for reads" steps you list above have one more step that I don't understand. Page 14 says reads go like this:
    Frame 1: TX slave address
    Frame 2: TX Register byte
    Frame 3: [I don't know what is happening in this frame]
    Frame 4: RX MSB from slave
    Frame 5: RX LSB from slave

    Can you tell me what is happening in Frame 3?

    Also, in Figure 13 on page 14, both Frames 3 and 4 say "Data from slave". Since this is the WRITE frame, should that be "Data from Master to Slave"?

    Thanks,
    Eric
  • Hi Eric,

    Frame 3 is the actual "Read" command. Notice that the bit after the slave address is R, whereas for Frame 1 it's W.

    You are right about Figure 13. Thank you for pointing it out.

    Thanks,
    Yibo