<?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 Re: LPC11U68 - internal temperature sensor in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-internal-temperature-sensor/m-p/646722#M25608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there is an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-mcus/lpc1100-cortex-m0-plus-m0/lpcopen-software-development-platform-lpc11xx:LPCOPEN-SOFTWARE-FOR-LPC11XX" title="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-mcus/lpc1100-cortex-m0-plus-m0/lpcopen-software-development-platform-lpc11xx:LPCOPEN-SOFTWARE-FOR-LPC11XX"&gt;LPCOpen Software for LPC11XX|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Feb 2017 17:50:31 GMT</pubDate>
    <dc:creator>rocketdawg2</dc:creator>
    <dc:date>2017-02-17T17:50:31Z</dc:date>
    <item>
      <title>LPC11U68 - internal temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-internal-temperature-sensor/m-p/646721#M25607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since I have no luck in another thread (&lt;A _jive_internal="true" href="https://community.nxp.com/thread/421121" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://community.nxp.com/message/764698" rel="nofollow noopener noreferrer" target="test_blank"&gt;https://community.nxp.com/message/764698&lt;/A&gt;), I want to ask my question in a different way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do use an LPC11U68 on an Xpresso V2 Rev C&lt;/P&gt;&lt;P&gt;The data sheet and manuals say that there is an 12bit ADC.&lt;/P&gt;&lt;P&gt;The internal temperature sensor is connected to channel 0 when powered up.&lt;/P&gt;&lt;P&gt;The sensor measures the temperature inverse to the ADC value.&lt;/P&gt;&lt;P&gt;The temperature range is from -40 to 105°C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a raw ADC value of about 650.&lt;/P&gt;&lt;P&gt;So I calculate:&lt;/P&gt;&lt;PRE class="language-cpp line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;constexpr&lt;/SPAN&gt; std&lt;SPAN class="operator token"&gt;::&lt;/SPAN&gt;int32_t maxRawValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4095&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//12bit ADC&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;constexpr&lt;/SPAN&gt; std&lt;SPAN class="operator token"&gt;::&lt;/SPAN&gt;int32_t temperatureRange &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;145&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;constexpr&lt;/SPAN&gt; std&lt;SPAN class="operator token"&gt;::&lt;/SPAN&gt;int32_t temperatureOffset &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;40&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; std&lt;SPAN class="operator token"&gt;::&lt;/SPAN&gt;int32_t rawValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;getRawValue&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; std&lt;SPAN class="operator token"&gt;::&lt;/SPAN&gt;int32_t invertedRawValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; maxRawValue &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; rawValue&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; std&lt;SPAN class="operator token"&gt;::&lt;/SPAN&gt;int32_t result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;invertedRawValue &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; temperatureRange &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; maxRawValue&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; temperatureOffset&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My result is than -17.&lt;/P&gt;&lt;P&gt;When I use some coolant spray, the &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;rawValue&lt;/SPAN&gt; will not change much.&lt;/P&gt;&lt;P&gt;Does anybody have some suggestions what I could do wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I get correct ADC values when I turn off the internal temperature sensor and do connect a potentiometer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 10:11:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-internal-temperature-sensor/m-p/646721#M25607</guid>
      <dc:creator>johanntaferl</dc:creator>
      <dc:date>2017-02-17T10:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68 - internal temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-internal-temperature-sensor/m-p/646722#M25608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there is an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-mcus/lpc1100-cortex-m0-plus-m0/lpcopen-software-development-platform-lpc11xx:LPCOPEN-SOFTWARE-FOR-LPC11XX" title="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-mcus/lpc1100-cortex-m0-plus-m0/lpcopen-software-development-platform-lpc11xx:LPCOPEN-SOFTWARE-FOR-LPC11XX"&gt;LPCOpen Software for LPC11XX|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 17:50:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-internal-temperature-sensor/m-p/646722#M25608</guid>
      <dc:creator>rocketdawg2</dc:creator>
      <dc:date>2017-02-17T17:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68 - internal temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-internal-temperature-sensor/m-p/646723#M25609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the&amp;nbsp;example "periph_temp", but it only prints the raw 12bit hex values from the ADC. I try to figure out how to translate these values to degree Celsius.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did I miss another example, or the conversion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Johann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 09:28:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-internal-temperature-sensor/m-p/646723#M25609</guid>
      <dc:creator>johanntaferl</dc:creator>
      <dc:date>2017-02-20T09:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68 - internal temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-internal-temperature-sensor/m-p/646724#M25610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johanntaferl,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; What the temperature formula you are using?&lt;/P&gt;&lt;P&gt;&amp;nbsp; From the lpc11u68 datasheet, we can get that:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15881i348257D4042A18EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&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/15922i0195E54772B2AE80/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;So, the temperature formula should be:&lt;/P&gt;&lt;P&gt;Vtemp= -2.36T+606;&lt;/P&gt;&lt;P&gt;=&amp;gt;T=(Vtemp-606)/(-2.36),&lt;/P&gt;&lt;P&gt;Take care, Vtemp should be mV.&lt;/P&gt;&lt;P&gt;Besides, in the code, please note the user manual mentioned points:&lt;/P&gt;&lt;P&gt;For an accurate measurement of the temperature sensor by the ADC, the ADC must be configured in single-channel burst mode. The last value of a nine-conversion (or more)&lt;BR /&gt;burst provides an accurate result.&lt;BR /&gt;After the Temperature Sensor is powered, it requires some time to stabilize and output a voltage that correctly represents the device temperature. A much shorter settling time&lt;BR /&gt;applies after switching the A/D converter to use the sensor output. Software can deal with both of these factors by repeatedly converting and reading the Temperature Sensor output&lt;BR /&gt;via the A/D converter until a consistent result is obtained.&lt;/P&gt;&lt;P&gt;Please also do the calibration of the temperature sensor in the code.&lt;/P&gt;&lt;P&gt;Please check these points, and test it again.&lt;/P&gt;&lt;P&gt;Wish it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2017 10:03:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-internal-temperature-sensor/m-p/646724#M25610</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-02-21T10:03:23Z</dc:date>
    </item>
  </channel>
</rss>

