<?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>Kinetis MicrocontrollersのトピックRe: Calculating voltage from AFE differential value</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1154835#M58147</link>
    <description>&lt;P&gt;I'm still confused about the voltage references. The VREF pin can be used for giving the AFE an external voltage reference, right? So say I input 2.00V on the VREF pin, and set S3=L to use the external voltage reference for the AFE. How do I now calculate the voltage? The value should be different if I use for instance 1.50V and 2.00V on the VREF pin, so surely I can't just use the simple formula&amp;nbsp;&lt;EM&gt;V_calc = (val/(2^24)) * 0.5&amp;nbsp;&lt;/EM&gt;in all these cases.&lt;/P&gt;&lt;P&gt;Also, what is the allowed voltage range on the VREF pin? I can't find any information on that.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Sep 2020 13:31:19 GMT</pubDate>
    <dc:creator>Larbohell</dc:creator>
    <dc:date>2020-09-17T13:31:19Z</dc:date>
    <item>
      <title>Calculating voltage from AFE differential value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152133#M58054</link>
      <description>&lt;P&gt;I'm having a very basic problem with the AFE module (Sigma-delta ADC) on the&amp;nbsp;TWR-KM34Z50M devkit (KM34 MCU). I simply cannot find the right way to calculate voltage from the measured ADC value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm doing is to input some differential voltage between the&amp;nbsp;SD_ADP0 and&amp;nbsp;SD_ADM0 input pins, say 500 mV, supplied from a basic power supply. I then take a bunch of ADC readings and use this forumla:&lt;BR /&gt;&lt;BR /&gt;V_calc = (val/0x7FFFFF) * V_ref&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One part of my problem is determining what V_ref should be. I find the datasheet and reference manual very confusing in explaining this aspect, as there are internally generated &lt;EM&gt;VREFH&lt;/EM&gt; (1.2V) and &lt;EM&gt;VREFL&lt;/EM&gt; (0.4V) signals, as well as two&amp;nbsp;&lt;EM&gt;pins&lt;/EM&gt; called&amp;nbsp;&lt;EM&gt;VREFH&amp;nbsp;&lt;/EM&gt;and&amp;nbsp;&lt;EM&gt;VREFL&lt;/EM&gt; which seem to always be connected to these two signals. Then there is also a&amp;nbsp;&lt;EM&gt;VREF&lt;/EM&gt; pin, which can optionally be used as an external reference input instead of the internal&amp;nbsp;&lt;EM&gt;VREFH.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Now, I've tried to use &lt;EM&gt;VREFH&lt;/EM&gt;,&amp;nbsp;&lt;EM&gt;VREFL &lt;/EM&gt;and &lt;EM&gt;(VREFH-VREFL)&amp;nbsp;&lt;/EM&gt;as the V_ref in my calculation above, and I've tried supplying an external reference on the&amp;nbsp;&lt;EM&gt;VREF&lt;/EM&gt; pin as well. I've used the S0, S1 and S2 switches to set the reference going to the AFE. No combinations of this lead to me calculating the correct voltage.&lt;/P&gt;&lt;P&gt;What am I doing wrong here?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 12:41:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152133#M58054</guid>
      <dc:creator>Larbohell</dc:creator>
      <dc:date>2020-09-11T12:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating voltage from AFE differential value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152502#M58077</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Hope this link will give you some ideals. &lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/Kinetis-Microcontrollers/Resolution-AFE-MKM34Z256/m-p/847175" target="_blank"&gt;https://community.nxp.com/t5/Kinetis-Microcontrollers/Resolution-AFE-MKM34Z256/m-p/847175&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 days after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 01:36:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152502#M58077</guid>
      <dc:creator>nxf56274</dc:creator>
      <dc:date>2020-09-14T01:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating voltage from AFE differential value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152689#M58086</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Scaling the voltage measurement &lt;EM&gt;val&amp;nbsp;&lt;/EM&gt;using the given +/- 500 mV input range actually produces okay-ish results:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;V_calc = (val/0x7FFFFF) * 0.5V&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;but I don't think that's the correct way to do it. First of all, the 500 mV is only a "typical" value given in the datasheet (&lt;SPAN class="fontstyle0"&gt;6.4.4.1)&lt;/SPAN&gt;, and may therefore vary enough to make &lt;EM&gt;V_calc&lt;/EM&gt; useless. Secondly, what would then be the point of the reference voltages, &lt;EM&gt;VREFH&lt;/EM&gt;, &lt;EM&gt;VREFL&lt;/EM&gt; and &lt;EM&gt;VREF&lt;/EM&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 07:46:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152689#M58086</guid>
      <dc:creator>Larbohell</dc:creator>
      <dc:date>2020-09-14T07:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating voltage from AFE differential value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152749#M58089</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;It is a limitation.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/125046i35C20CDE503789A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This device includes a voltage reference (VREF) to supply an accurate 1.2 V voltage&lt;BR /&gt;output. VREFH and VREFL use for output.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/125049i9DB55CE5E0A92558/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2.PNG" alt="2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 days after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 08:47:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152749#M58089</guid>
      <dc:creator>nxf56274</dc:creator>
      <dc:date>2020-09-14T08:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating voltage from AFE differential value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152759#M58090</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I know and understand all that. My question is simply: How do I calculate the input voltage from the digital output value?&lt;/P&gt;&lt;P&gt;Say I use the AFE and get a measurement of&amp;nbsp;&lt;EM&gt;4538388 /&amp;nbsp;0x454014&amp;nbsp;&lt;/EM&gt;from channel 0. How do I calculate the actual voltage value?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 08:51:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1152759#M58090</guid>
      <dc:creator>Larbohell</dc:creator>
      <dc:date>2020-09-14T08:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating voltage from AFE differential value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1153246#M58109</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;V_calc = (val/(2^24)) * 0.5&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the value smaller than 0, the digital value should convert. Because the result is 2's complement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 days after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 06:02:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1153246#M58109</guid>
      <dc:creator>nxf56274</dc:creator>
      <dc:date>2020-09-15T06:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating voltage from AFE differential value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1154835#M58147</link>
      <description>&lt;P&gt;I'm still confused about the voltage references. The VREF pin can be used for giving the AFE an external voltage reference, right? So say I input 2.00V on the VREF pin, and set S3=L to use the external voltage reference for the AFE. How do I now calculate the voltage? The value should be different if I use for instance 1.50V and 2.00V on the VREF pin, so surely I can't just use the simple formula&amp;nbsp;&lt;EM&gt;V_calc = (val/(2^24)) * 0.5&amp;nbsp;&lt;/EM&gt;in all these cases.&lt;/P&gt;&lt;P&gt;Also, what is the allowed voltage range on the VREF pin? I can't find any information on that.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 13:31:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1154835#M58147</guid>
      <dc:creator>Larbohell</dc:creator>
      <dc:date>2020-09-17T13:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating voltage from AFE differential value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1155120#M58155</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;VREF is used to generate fixed voltage for VREFH(1.2V) and VREFL(0.4V). VREF should be around 1.2V.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 days after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 01:12:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-voltage-from-AFE-differential-value/m-p/1155120#M58155</guid>
      <dc:creator>nxf56274</dc:creator>
      <dc:date>2020-09-18T01:12:03Z</dc:date>
    </item>
  </channel>
</rss>

