Is there a True RMS Converter example project available?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a True RMS Converter example project available?

492 Views
adamgarrison
Contributor III

Is there example project available for the True RMS Converter?  There have been rumors that there is one available for the M series, but it is not available in the SDK 1.3.  I am hoping to use it on a K02.

Labels (2)
Tags (2)
0 Kudos
1 Reply

353 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Adam Garrison,

    I didn't find the RMS converter in the KSDK1.3.0, so you can use the code to generate it.

    The following code is for your reference:

#include "math.h"

double calc(double* pData, int nNum)

{

    double fSum = 0;

    for(int i=0; i<nNum; ++i)

    {

        fSum += pData[i] * pData[i];

    }

    return sqrt(fSum/nNum);

}

Wish it helps you!


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos