<?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>8-bit Microcontrollersのトピックabout s12vr64  AD Temperature</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/about-s12vr64-AD-Temperature/m-p/786724#M22592</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp; want to ask about s12vr64&amp;nbsp; AD&amp;nbsp;Temperature,&amp;nbsp; my&amp;nbsp; init&amp;nbsp; as follow.but the result of ADvalue isn't&amp;nbsp; &amp;nbsp;correct.The channel&amp;nbsp; is&amp;nbsp; &amp;nbsp;0x41,&lt;SPAN style="color: #5f6266; background-color: #f9fbfc; font-weight: normal; font-size: 12.666667938232422px;"&gt;There was no significant difference at different temperatures.&lt;SPAN style="font-weight: normal; font-size: 12.666667938232422px;"&gt;Can you tell me the solution?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;void ADC_init(unsigned long BUS_CLK){&lt;BR /&gt; // ATD0TEST1 ATD0CTL2&lt;BR /&gt; /* Select 8-bit resolution*/&lt;BR /&gt; ATDCTL1_SRES =0;&lt;BR /&gt; /* Right justify data */&lt;BR /&gt; ATDCTL3_DJM = 1; // ATDCTL2&lt;BR /&gt; /* One conversion per sequence */&lt;BR /&gt; ATDCTL3_S1C = 1;&lt;BR /&gt; ATDCTL3_S2C = 0;&lt;BR /&gt; ATDCTL3_S4C = 0;&lt;BR /&gt; ATDCTL3_S8C = 0;&lt;BR /&gt; /* Select sample time 4 ATD clock cycles */&lt;BR /&gt; ATDCTL4_SMP = 0; &lt;BR /&gt; /*The temperature sensor and bandgap voltage amplifier is enabled.*/ &lt;BR /&gt; CPMUHTCTL_HTE =1;&lt;BR /&gt; /* An internal temperature proportional voltag VeHT can be accessed internally */&lt;BR /&gt; CPMUHTCTL_VSEL =0; &lt;BR /&gt; /* ATD clock Prescaler */&lt;BR /&gt; ATDCTL4_PRS = (unsigned char) ((BUS_CLK/(2*ATD_CLK)) - 1);&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Sep 2018 08:52:37 GMT</pubDate>
    <dc:creator>1073522577</dc:creator>
    <dc:date>2018-09-03T08:52:37Z</dc:date>
    <item>
      <title>about s12vr64  AD Temperature</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/about-s12vr64-AD-Temperature/m-p/786724#M22592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp; want to ask about s12vr64&amp;nbsp; AD&amp;nbsp;Temperature,&amp;nbsp; my&amp;nbsp; init&amp;nbsp; as follow.but the result of ADvalue isn't&amp;nbsp; &amp;nbsp;correct.The channel&amp;nbsp; is&amp;nbsp; &amp;nbsp;0x41,&lt;SPAN style="color: #5f6266; background-color: #f9fbfc; font-weight: normal; font-size: 12.666667938232422px;"&gt;There was no significant difference at different temperatures.&lt;SPAN style="font-weight: normal; font-size: 12.666667938232422px;"&gt;Can you tell me the solution?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;void ADC_init(unsigned long BUS_CLK){&lt;BR /&gt; // ATD0TEST1 ATD0CTL2&lt;BR /&gt; /* Select 8-bit resolution*/&lt;BR /&gt; ATDCTL1_SRES =0;&lt;BR /&gt; /* Right justify data */&lt;BR /&gt; ATDCTL3_DJM = 1; // ATDCTL2&lt;BR /&gt; /* One conversion per sequence */&lt;BR /&gt; ATDCTL3_S1C = 1;&lt;BR /&gt; ATDCTL3_S2C = 0;&lt;BR /&gt; ATDCTL3_S4C = 0;&lt;BR /&gt; ATDCTL3_S8C = 0;&lt;BR /&gt; /* Select sample time 4 ATD clock cycles */&lt;BR /&gt; ATDCTL4_SMP = 0; &lt;BR /&gt; /*The temperature sensor and bandgap voltage amplifier is enabled.*/ &lt;BR /&gt; CPMUHTCTL_HTE =1;&lt;BR /&gt; /* An internal temperature proportional voltag VeHT can be accessed internally */&lt;BR /&gt; CPMUHTCTL_VSEL =0; &lt;BR /&gt; /* ATD clock Prescaler */&lt;BR /&gt; ATDCTL4_PRS = (unsigned char) ((BUS_CLK/(2*ATD_CLK)) - 1);&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2018 08:52:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/about-s12vr64-AD-Temperature/m-p/786724#M22592</guid>
      <dc:creator>1073522577</dc:creator>
      <dc:date>2018-09-03T08:52:37Z</dc:date>
    </item>
  </channel>
</rss>

