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.

TDC TOF AVERAGE MEASUREMETN AND TRRIGER PIN USE IN PROGRAMM

Other Parts Discussed in Thread: TDC1000, TDC7200

Hello Sir,

 i am using TDC1000-7200evm for flow metering  and also developed a new code as i am using my own controller to use TDC1000 and 7200.

I am able to get TOF1 TO TOF5 but  the problem i am facing are :

1. How to measure the delta TOF and Average it .

2. I always have to  set the START_Meas bit to start new measurement.

3. after some time TDC7200 spi stop responding.

4. the TOF values i am getting is not relevant i.e they are not changing according to flow .

  • Lakhbir,

    FYI, the T1000-TDC7200EVM firmware source code is part of the GUI installation and can be found under in the following install folder

    C:\Program Files (x86)\Texas Instruments\TDC1000_7200EVM\Firmware

    You can refer to the function "tdc_trigger_measure()" in file timer_queue.c to see how up and downstream measurements are made for flow. Also, you can refer to the attached documents

    Thanks,

    Vishy

    www.ti.com/.../snia020.pdf

    Interfacing a water flow sesnor to TDC1000-TDC7200EVM (1).pdf

  • hi vishy,

    Thanks for responce  i have gone through your  these document and code they have calculated the TOF accurately .But i hink the code i have created for TOF measurement is also workable or not. calculation part of code is as follow

    void CalDelta_TOF()
    {
    switch(count)
    {
    case 0:
    for(int n=0; n < MAX_STOPS; n++)
    {
    TOF_up[n]=start2stop[n];
    }
    c=1;
    count++;
    break;

    case 1:
    for(int n=0; n < MAX_STOPS; n++)
    {
    TOF_DN[n]=start2stop[n];
    }
    b=1;
    count=0;
    break;
    default:
    printf_string("\n TOF NOT YET CALCULATED");
    }
    if(c&&b)
    {
    for(int n=0; n < MAX_STOPS; n++)
    {
    Delta_TOF[n]= ((TOF_DN[n] - TOF_up[n]));
    array[0]=array[1];
    array[1]=array[2];
    array[2]=array[3];
    array[3]=array[4];
    array[4]=Delta_TOF[n]/100;
    avg[n] = (array[0]+array[1]+array[2]+array[3]+array[4])/5;
    sprintf((char *)outString, "\nAverage Delta TOF[%d]: %4.6f \t ", n, avg[n]);
    printf_string((char *)outString);
    sprintf((char *)outString, " TOF[%d]: %6.6f \t",n,start2stop[n]);
    printf_string((char *)outString);
    /* sprintf((char *)outString, "DELTA TOF[%d]: %6.6f \r",n,Delta_TOF[n]/1000);
    printf_string((char *)outString);*/
    }
    D=(1487*(start2stop[0])/2); //(start2stop[0]) ;


    }
    printf_string("\n \n");

    }

    Also tell is  i have to calculate the Avg to get a stabel accurate and preciese result.