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: FDC1004 configuration and trigger registers

Part Number: FDC1004
Other Parts Discussed in Thread: ENERGIA

Hello,

I wanted to inquire about a proper register configuration and measurement procedure for both single channel measurement and continuous multi-channel measurements.

Single channel measurement

If I want to measure 4 channels at 100Hz with CHB disabled, then:

1). configure Measurement Configuration Registers(0x08, 0x09, 0x0A, 0x0B) to be {0b0001110000000000, 0b0011110000000000, 0b0101110000000000, 0b0111110000000000}, respectively;

2). configure FDC Configuration Register(0x0C) to measure first channel/measurement by setting  {0b0000010010000000} (0x480 in hex);

3). wait till register0x0C:bit[3] is equal to 1 (about 10 ms at 100 Hz &3 ms at 400 Hz), indicating measurement is ready;

4). read out data;

5). trigger second channel measurement by setting (0x0C) register to {0b0000010001000000}(0x440 in hex);

6)...wait...read-out...& so on...

Is it correct?

For some reason, I'm accumulating another 2 ms between measurements-any suggestions how to get rid of it?

Continuous multi-channel measurement 

To measure 4 channels at 100Hz with CHB disabled:

1). configure Measurement Configuration Registers(0x08, 0x09, 0x0A, 0x0B) to be {0b0001110000000000, 0b0011110000000000, 0b0101110000000000, 0b0111110000000000}, respectively;

2). configure FDC Configuration Register (0x0C) to measure channels/measurements in repeat mode by setting it to {0b0000010111111111} (0x5FF in hex)

(we tried to set last 4 DONE_x fields to 0 and got same result)

3). read out measurements?!!!

Question: how do I know that measurements are ready for read out? Are they measured and read-out sequentially or simultaneously?

When I check the DONE_x fields seem always to be set to 1 in repeat mode, indicating measurements are complete, but I would expect sometimes they should not be ready (which what I observe with FDC1004EVM GUI).

Moreover, when I check for appropriate DONE_x field is 1 (register 0x0C:bits[3:0] depending on channel), I can read out channels 2-3 ms in between (1->2->3) and with 38ms between rounds (channel 4->1).

But it looks like something wrong here, because individual measurements dont take 10ms as they should at 100 Hz. Eventually results look much noisier than with FDC1004EVM GUI.

What is the right way of doing it?

Is there a sample code that could walk us through configuration and measurements (except for the Energia code).

Thank you,

Alex

 

  • Hi Alex,
    I've got your request. Allow me some time to think about this and get back to you.

    Best Regards,
    Bala Ravi
  • Hi Alex,
    You're correct about single-channel measurement. I am not sure why you're accumulating an extra 2ms, can you verify if this still happens at higher frequency as well? The measurements are measured and read out in a sequential manner. When the measurement is complete the DONE_x field (register 0x0C) will be set to 1 and when the measurement is ready to be read out the DONE_x field (register 0x0C) will be set to 0. If you do not notice change in this register, I would recommend resetting the device before setting up the register. Here is the link to an E2E post that talks about single-channel measurement: e2e.ti.com/.../1482389.

    Also you're right about lower measurement time as the frequency increases. Please check out some sample code for continuous multi-channel measurement available in our product page: www.ti.com/.../toolssoftware. There is sample code available for TI designs: 1. Backlight and Smart Lighting and 2. Capacitive based human proximity detection.

    I hope this helps!

    Best Regards,
    Bala Ravi