<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RMS Measurement in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/RMS-Measurement/m-p/124483#M334</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;FONT color="#ff0000"&gt;This message contains an entire topic ported from a separate forum. The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value to you as you search for answers to your questions.&lt;NAMESPACE ns="urn:schemas-microsoft-com:office:office" prefix="o"&gt;&lt;/NAMESPACE&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;STRONG&gt;Posted: Nov 18, 2005, 12:19 p.m.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;How can&amp;nbsp;I calculate the RMS value of the AC voltage in assembly code? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;I need the technical method which is used in any digital voltmeter project or something like that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;Thanks -- &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN lang="DE" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-ansi-language: DE;"&gt;&lt;STRONG&gt;Posted: Nov 18, 2005, 2:49 p.m.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;This is very simple on the '08. You find the area under the curve. Simply multiply sample by itself and accumulate per sample. It is just limited by the bandwidth of your signal, and how fast you can perform the math.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;To go one step further, use a IFR style filter to hold the dynamic result:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;RMSSUM = RMSSUM + (NewSample * NewSample) - (RMSSUM&amp;gt;&amp;gt;8);&amp;nbsp; RMS = SQR(RMSSUM) &amp;gt;&amp;gt; 4; //True because sqr(X/Y) = sqr(X)/sqr(Y)&lt;/PRE&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;RMS Sum will eventually become the (RMS value * 8 ^2), and will be the average of 256 points. You will need a large enough data type to hold the maximum value of ((NewSample * newSample) &amp;lt;&amp;lt;8).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;Look to earlier links for efficient square root functions on integers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2006 03:17:57 GMT</pubDate>
    <dc:creator>RChapman</dc:creator>
    <dc:date>2006-01-27T03:17:57Z</dc:date>
    <item>
      <title>RMS Measurement</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/RMS-Measurement/m-p/124483#M334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;FONT color="#ff0000"&gt;This message contains an entire topic ported from a separate forum. The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value to you as you search for answers to your questions.&lt;NAMESPACE ns="urn:schemas-microsoft-com:office:office" prefix="o"&gt;&lt;/NAMESPACE&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;STRONG&gt;Posted: Nov 18, 2005, 12:19 p.m.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;How can&amp;nbsp;I calculate the RMS value of the AC voltage in assembly code? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;I need the technical method which is used in any digital voltmeter project or something like that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;Thanks -- &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN lang="DE" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-ansi-language: DE;"&gt;&lt;STRONG&gt;Posted: Nov 18, 2005, 2:49 p.m.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;This is very simple on the '08. You find the area under the curve. Simply multiply sample by itself and accumulate per sample. It is just limited by the bandwidth of your signal, and how fast you can perform the math.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;To go one step further, use a IFR style filter to hold the dynamic result:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;RMSSUM = RMSSUM + (NewSample * NewSample) - (RMSSUM&amp;gt;&amp;gt;8);&amp;nbsp; RMS = SQR(RMSSUM) &amp;gt;&amp;gt; 4; //True because sqr(X/Y) = sqr(X)/sqr(Y)&lt;/PRE&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;RMS Sum will eventually become the (RMS value * 8 ^2), and will be the average of 256 points. You will need a large enough data type to hold the maximum value of ((NewSample * newSample) &amp;lt;&amp;lt;8).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;Look to earlier links for efficient square root functions on integers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;"&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2006 03:17:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/RMS-Measurement/m-p/124483#M334</guid>
      <dc:creator>RChapman</dc:creator>
      <dc:date>2006-01-27T03:17:57Z</dc:date>
    </item>
  </channel>
</rss>

