<?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 Voltage conversion in mm91z638 in Power Management</title>
    <link>https://community.nxp.com/t5/Power-Management/Voltage-conversion-in-mm91z638/m-p/880122#M286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using the VSENSE2 as the voltage sensing pin to measure the voltage.&lt;/P&gt;&lt;P&gt;I simply taken the sample source code and i programmmed my costom board.It is updating the voltage in milli voltages.I refered the code,in that we are dividing the register reading value in the voltage register by 2 by right shifting the value&amp;nbsp; by one.Please give me the reason for dividing the register value by 2.&lt;/P&gt;&lt;P&gt;Here i am attaching the code where we modify the result register value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(VsenseGetValue(CH_VSENSE2,&amp;amp;VSensor[0])) {&lt;BR /&gt;#if (ISENSE_GND_REF==ISENSEL) &lt;BR /&gt; // ISENSEL is GND reference&lt;BR /&gt; //s16Vdrop = (s16)((-Battery.s32mAFilt)/G_SHUNT);&lt;BR /&gt; s16Vdrop = (s16)(Current_mA/G_SHUNT); // Calculated shunt drop voltage&lt;BR /&gt; //Battery.u16mV = (VSensor[0]&amp;gt;&amp;gt;1)-s16Vdrop; // Calculating the load voltage &lt;BR /&gt; Battery.u16mV = (VSensor[0]&amp;gt;&amp;gt;1)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Here i am not understanding the reason for dividing the register value&lt;BR /&gt; s32VolFiltered=s32VolFiltered+Battery.u16mV;&lt;BR /&gt; u16VolCnt++;&lt;BR /&gt;#endif&lt;BR /&gt; &lt;BR /&gt;#if (ISENSE_GND_REF==ISENSEH) &lt;BR /&gt; // ISENSEH is GND reference &lt;BR /&gt; Battery.u16mV = VSensor[0]&amp;gt;&amp;gt;1; // scale to mV and no correction &lt;BR /&gt;#endif&lt;BR /&gt; }&lt;BR /&gt; &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Mar 2019 06:14:45 GMT</pubDate>
    <dc:creator>prathapa_reddy</dc:creator>
    <dc:date>2019-03-22T06:14:45Z</dc:date>
    <item>
      <title>Voltage conversion in mm91z638</title>
      <link>https://community.nxp.com/t5/Power-Management/Voltage-conversion-in-mm91z638/m-p/880122#M286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using the VSENSE2 as the voltage sensing pin to measure the voltage.&lt;/P&gt;&lt;P&gt;I simply taken the sample source code and i programmmed my costom board.It is updating the voltage in milli voltages.I refered the code,in that we are dividing the register reading value in the voltage register by 2 by right shifting the value&amp;nbsp; by one.Please give me the reason for dividing the register value by 2.&lt;/P&gt;&lt;P&gt;Here i am attaching the code where we modify the result register value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(VsenseGetValue(CH_VSENSE2,&amp;amp;VSensor[0])) {&lt;BR /&gt;#if (ISENSE_GND_REF==ISENSEL) &lt;BR /&gt; // ISENSEL is GND reference&lt;BR /&gt; //s16Vdrop = (s16)((-Battery.s32mAFilt)/G_SHUNT);&lt;BR /&gt; s16Vdrop = (s16)(Current_mA/G_SHUNT); // Calculated shunt drop voltage&lt;BR /&gt; //Battery.u16mV = (VSensor[0]&amp;gt;&amp;gt;1)-s16Vdrop; // Calculating the load voltage &lt;BR /&gt; Battery.u16mV = (VSensor[0]&amp;gt;&amp;gt;1)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Here i am not understanding the reason for dividing the register value&lt;BR /&gt; s32VolFiltered=s32VolFiltered+Battery.u16mV;&lt;BR /&gt; u16VolCnt++;&lt;BR /&gt;#endif&lt;BR /&gt; &lt;BR /&gt;#if (ISENSE_GND_REF==ISENSEH) &lt;BR /&gt; // ISENSEH is GND reference &lt;BR /&gt; Battery.u16mV = VSensor[0]&amp;gt;&amp;gt;1; // scale to mV and no correction &lt;BR /&gt;#endif&lt;BR /&gt; }&lt;BR /&gt; &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2019 06:14:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Power-Management/Voltage-conversion-in-mm91z638/m-p/880122#M286</guid>
      <dc:creator>prathapa_reddy</dc:creator>
      <dc:date>2019-03-22T06:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Voltage conversion in mm91z638</title>
      <link>https://community.nxp.com/t5/Power-Management/Voltage-conversion-in-mm91z638/m-p/880123#M287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prathapreddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is because 1 LSB corresponds to 0.5 mV for VSENSE2:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67024i0B4A8F9A2A1E13B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="border: none windowtext 1.0pt; padding: 0in; color: #3d3d3d; font-size: 9.0pt;"&gt;&lt;EM&gt;PS:&amp;nbsp;If my answer helps to solve your question, please mark it as "Correct" or “Helpful”. Thank you.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 13:00:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Power-Management/Voltage-conversion-in-mm91z638/m-p/880123#M287</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2019-03-25T13:00:44Z</dc:date>
    </item>
  </channel>
</rss>

