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.

Readout Registers x21 - x25 via Matlab

Hi everyone

I have an issue/question regarding the software code which was provided with the software of the EVM-board LDC1000.

Since the last improvments the sensor frequency of my sensor is now way lower than a few days ago, causing the frequency counter getting higher.

If I understand the code correctly

    c=sport.BytesAvailable;
    while(c<1*2048)
        c=sport.BytesAvailable;
    end
    d=fread(sport,2048);
    
    d1=d(1:2:1024);
    d2=d(2:2:1024);
    Rp=d1*256+d2;
    Rp_buf([1:512]'+mod(dcount,N),:)=Rp;
    
    d1=d(1025:2:2048);
    d2=d(1026:2:2048);
    Tp=d1*256+d2;
    Tp_buf([1:512]'+mod(dcount,N),:)=Tp;

the value of Tp is calculated with a low byte and a high byte. But the LDC1000 provides a 24-bit resolution.

How has the code to be improved to use all three registers for the calculation?

Also see this post

Thanks in advance

Stephan

  • Hello Stephan,

    Unfortunately we do not support Matlab. Please note that the sensor frequency you set in the register is directly related to the internal watchdog timer. It is translated to the period that tells the watchdog timer how often to check for oscillation.

    Best Regards,
    Natallia Holubeva
  • Hi Natallia,
    the cited source code is taken from LDC1000 EVM Software GUI.
    The change in sensor frequency was caused by the fact that only the last 2 bytes of the L-measurement were used for the calculation. The highest byte was left out (Tp=d1*256+d2;).
  • Hi Stephen, Simply change the equation: Tp=d0*65536+d1*256+d2;
    Where d0 is the contents of Register 0x24.
    We transferred only the 16 LSBs instead of all 24bits was to support higher sample rates. This tradeoff would only affect sensors with frequencies below 250kHz when the response time was set to 6144.