<?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のトピックRe: LC60: Again On-Chip Temperature Calibration</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207159#M17536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;To continue the my previous post ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Since Vtemp and Vcal will be measured using the ADC, this will give ADC results of Ntemp and Ncal, where -&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Vtemp = Ntemp*Vdd/Nmax&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Vcal&amp;nbsp; = Ncal*Vdd/Nmax&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Nmax = 1024 for 10-bit resolution, or Nmax = 4096 for 12-bit resolution.&amp;nbsp; However, if a further reading of the bandgap reference is taken, the expression &lt;FONT face="Courier New"&gt;Vdd/Nmax&lt;/FONT&gt; may be substituted with &lt;FONT face="Courier New"&gt;Vref/Nref&lt;/FONT&gt;.&amp;nbsp; The temperature calculation would then become as follows -&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Temp = Tcal - (Ntemp - Ncal)*(k*Vref)/Nref&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This means that the calculation becomes independent of Vdd, and will work for any ADC resolution (provided the same resolution is used for all three measurement values).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The expression &lt;FONT face="Courier New"&gt;(k*Vref)&lt;/FONT&gt; will be a constant, with one of the following values ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Cold value&amp;nbsp;&amp;nbsp;&amp;nbsp; 720&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Nominal value 706&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Hot value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 683&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Mar 2008 23:50:49 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2008-03-29T23:50:49Z</dc:date>
    <item>
      <title>LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207141#M17518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I want to calibrate internal temperature sensor at single point by using floating-point math.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Temperature(in C)&amp;nbsp;= 25.0 - ((Vtemp - &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt;) / m);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;According to the formula above, I'm recalculating &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt; value at a known temperature(not always 25C) by using default hot or cold slope values. To do this, I'm calling &lt;STRONG&gt;CalcTempOffset&lt;/STRONG&gt; function below with a accurately measured ambient temperature value. After calculating &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt; value at calibration state, I'm always using this calculated value and default slope values to measure actual temperature with &lt;STRONG&gt;ReadInternalTemperature&lt;/STRONG&gt; function bottom.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;unsigned char &lt;STRONG&gt;CalcTempOffset&lt;/STRONG&gt;(signed char temperature){&amp;nbsp; unsigned int adc_temp, adc_ref;&amp;nbsp; signed int off;&amp;nbsp; double Vtemp, m;&amp;nbsp;&amp;nbsp; DisableInterrupts;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPMSC1_BGBE = 1; // Bandgap buffer enable.&amp;nbsp;&amp;nbsp;&amp;nbsp; adc_temp = ReadADCChannel12(26); // Vtemperature&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; adc_ref = ReadADCChannel12(27);&amp;nbsp; // Vref = 1.2V&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPMSC1_BGBE = 0; // Bandgap buffer disabled.&amp;nbsp; EnableInterrupts;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vtemp = (double)adc_temp*12000/adc_ref; //read temperature sensor voltage&amp;nbsp;&amp;nbsp;&amp;nbsp; m = 17.075;&amp;nbsp; if(temperature &amp;gt; 25) m = 17.69;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // hot slope&amp;nbsp;&amp;nbsp; else if(temperature &amp;lt; 25) m = 16.46;&amp;nbsp; // cold slope&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt; = (Vtemp + (m*(temperature-25)) + 0.5);}&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;void &lt;STRONG&gt;ReadInternalTemperature&lt;/STRONG&gt;(signed char* temperature){&amp;nbsp; unsigned int adc_temp, adc_ref;&amp;nbsp; double Vtemp, m;&amp;nbsp;&amp;nbsp;&amp;nbsp; *temperature = 25; // default value&amp;nbsp; if(!CheckTempOffsetValid()) return;&amp;nbsp;&amp;nbsp; DisableInterrupts;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPMSC1_BGBE = 1; // Bandgap buffer enable.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; adc_temp = ReadADCChannel12(26); // Vtemperature&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; adc_ref = ReadADCChannel12(27);&amp;nbsp; // Vref = 1.2V&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPMSC1_BGBE = 0; // Bandgap buffer disabled.&amp;nbsp; EnableInterrupts;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vtemp = (double)adc_temp*12000/adc_ref;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = 17.075;&amp;nbsp; if(Vtemp &amp;gt; &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt;) m = 16.46;&amp;nbsp; // cold slope&amp;nbsp;&amp;nbsp; else if(Vtemp &amp;lt; &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt;) m = 17.69; // hot slope *temperature = (double)25.0 - ((Vtemp - &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt;)/m) + 0.5; }&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;The MCU is&amp;nbsp;powered via battery, so the Vdd can vary (1.8V-3.5V) after my calibration.&lt;/DIV&gt;&lt;DIV&gt;For example, when ambient temperature is 19 C degree, Vdd is 3.2V, I'm calibrating the MCU by calling &lt;STRONG&gt;CalcTempOffset(19)&lt;/STRONG&gt; to determine &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt; value. After determining this value once, I'm always using &lt;STRONG&gt;ReadInternalTemperature&lt;/STRONG&gt; function to measure actual temperature at different Vdd.&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;I just expect 5 C degree accuracy over VDD and -40 / +85C. But the functions above can't qualify for this.&lt;/DIV&gt;&lt;DIV&gt;Do you have a better solution for single point calibration?&lt;/DIV&gt;&lt;DIV&gt;Do you think my implementation is applicable?&lt;/DIV&gt;&lt;DIV&gt;The datasheet says that 4.5Cdegree error is possible with single point calibration, but I couldn't realize it.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;10x,&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by BasePointer on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-03-27&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;03:33 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 20:30:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207141#M17518</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2008-03-27T20:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207142#M17519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello BP,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;By what percentage/ degrees is your 'temperature read' varying ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Which one of these indicate temperature "&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;temperature&lt;/FONT&gt;&lt;/STRONG&gt; " or " &lt;FONT size="4"&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;&lt;FONT size="4"&gt;*&lt;/FONT&gt;temperature&lt;/FONT&gt;&lt;/STRONG&gt; ".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I asked this because &lt;STRONG&gt;CalcTempOffset&lt;/STRONG&gt; function refers to &lt;FONT color="#ff0000"&gt;temperature&lt;/FONT&gt; while &lt;STRONG&gt;ReadInternalTemperature&lt;/STRONG&gt; refers to *&lt;FONT color="#ff0000"&gt;temperature.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Could you cross check&amp;nbsp;temperature&amp;nbsp;holding variable is &lt;STRONG&gt;signed&lt;/STRONG&gt; char/int/double.&lt;/DIV&gt;&lt;DIV&gt;Your code looks fine to me.&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Denn.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by Denn*** on &lt;SPAN class="date_text"&gt;2008-03-27&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:53 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 21:52:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207142#M17519</guid>
      <dc:creator>Denn</dc:creator>
      <dc:date>2008-03-27T21:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207143#M17520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;HR /&gt;Denn*** wrote:&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Which one of these indicate temperature "&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;temperature&lt;/FONT&gt;&lt;/STRONG&gt; " or " &lt;FONT size="4"&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;&lt;FONT size="4"&gt;*&lt;/FONT&gt;temperature&lt;/FONT&gt;&lt;/STRONG&gt; ".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I asked this because &lt;STRONG&gt;CalcTempOffset&lt;/STRONG&gt; function refers to &lt;FONT color="#ff0000"&gt;temperature&lt;/FONT&gt; while &lt;STRONG&gt;ReadInternalTemperature&lt;/STRONG&gt; refers to *&lt;FONT color="#ff0000"&gt;temperature.&lt;/FONT&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;My guess is that since CalcTempOffset does not change the value of the temperature he is passing it without a reference but since ReadInternalTemperature changes the value he is passing it by reference:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CalcTempOffset(temperature);&lt;/DIV&gt;&lt;DIV&gt;ReadInternalTemperature(&amp;amp;temperature);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BP can verify if this is true or not.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Brett&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 22:23:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207143#M17520</guid>
      <dc:creator>allawtterb</dc:creator>
      <dc:date>2008-03-27T22:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207144#M17521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The routine can have error amount of +-15 C degree !&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;-----------------------------------------------------------------------------------------------&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;For the calibration operation,&amp;nbsp;an external accurate temperature reference device&amp;nbsp;is using &lt;STRONG&gt;CalcTempOffset(&lt;/STRONG&gt;&lt;EM&gt;signed char temperature&lt;/EM&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; function. This function calculates global &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt;(signed int) value.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For example: If the external temperature reference device measures the ambient temperature as 19 C degree, I'm calling &lt;STRONG&gt;CalcTempOffset&lt;/STRONG&gt; function with the parameter 19 (that is &lt;EM&gt;signed char temperature&lt;/EM&gt;). And it calculates &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt; value necessary. So calibration operation&amp;nbsp;was done for it.&lt;/DIV&gt;&lt;DIV&gt;-----------------------------------------------------------------------------------------------&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When I want to measure temperature with pre-calculated (calibrated) &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt; value, I call &lt;STRONG&gt;ReadInternalTemperature(&lt;/STRONG&gt;&lt;EM&gt;signed char&lt;STRONG&gt;*&lt;/STRONG&gt; temperature&lt;/EM&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; function.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For example:&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;signed char&lt;/STRONG&gt; internal_temp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;ReadInternalTemperature(&lt;/STRONG&gt;&lt;EM&gt;&amp;amp;internal_temp&lt;/EM&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;lt;--&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;AdjustRTCClock(&lt;EM&gt;internal_temp&lt;/EM&gt;);&lt;/DIV&gt;&lt;DIV&gt;-----------------------------------------------------------------------------------------------&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;10x&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 22:55:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207144#M17521</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2008-03-27T22:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207145#M17522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;The Vtemp_offset calculation seems wrong.&amp;nbsp; When you calibrate you have a measured temperature and a known good tempature.&amp;nbsp; You want to take the difference between these 2, not add them together.&amp;nbsp; I would subtract the measured temperature from the good temperature to calculate the Offset.&amp;nbsp; Then when calculating temperatures add the offset to&amp;nbsp;the measured temperature.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Offset = Known_Temp - Measured_Temp&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Temp_With_Offset = Measured_Temp&amp;nbsp;+ Offset&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Also, you added a + 0.5 to your conversion between Vtemp units and ºC but you don't mention it in the formula you want to use to calculate ºC at the top of the post.&amp;nbsp; Can you clarify?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 23:43:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207145#M17522</guid>
      <dc:creator>allawtterb</dc:creator>
      <dc:date>2008-03-27T23:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207146#M17523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Also keep in mind that the internal temperature sensor is on the chip, and will be subject to any heat generated by the chip. Also, it is thermally isolated in the chip, and will not change as fast as an external sensor.&lt;BR /&gt;It is meant to monitor the chip temperature. If you need to measure ambient temperature, you really need and external sensor.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 01:54:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207146#M17523</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-03-28T01:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207147#M17524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello BP,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;As you may recall, the topic of single point calibration for the temperature sensor was addressed in the following thread -&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=6667" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=6667&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This thread assumed the use of integer arithmetic.&amp;nbsp; In view of the very poor accuracy of this sensor configuration, the use of floating point calculations would be serious overkill.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 09:07:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207147#M17524</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-03-28T09:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207148#M17525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello BP,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Equation from AN 3031 "Temperature Sensor for the HCS08 Microcontroller Family, Rev. 0"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Temperature(in C)&amp;nbsp;= 25.0 - ((Vtemp - &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;) / m));&lt;/DIV&gt;&lt;DIV&gt;where &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; is the ADC value of temp sensor at 25 deg C, normally a constant given in datasheet,but varies from part to part by a small margin.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And my guess is that for calibrating you ned to give a "known temperature" of 25 C rather than 19 C.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;But from your MC9S08LC60 datasheet the equation is different.Page 268&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;TempC = (Vtemp – 0.7013) ÷ (0.0017)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Comparing this equation with the above eqn with&amp;nbsp;generic eqn I can see&lt;/DIV&gt;&lt;DIV&gt;Vtemp25 =&amp;nbsp; 0.7013&lt;/DIV&gt;&lt;DIV&gt;m&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0.0017 (0.001769-Hot slope, 0.001646- Cold Slope)&amp;nbsp; from Page 336,LC datasheet&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In short &lt;STRONG&gt;" 25 - "&lt;/STRONG&gt; is missing in LC controller datasheet.Let me hope this is not print mistake from FSL. In that case I feel we should also try with the "new" equation.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Denn.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 12:44:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207148#M17525</guid>
      <dc:creator>Denn</dc:creator>
      <dc:date>2008-03-28T12:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207149#M17526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The equation indicated in LC60 datasheet&amp;nbsp;was misprinted.&lt;/DIV&gt;&lt;DIV&gt;It should be:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;TempC&lt;/STRONG&gt; = 25 - [(&lt;STRONG&gt;Vtemp&lt;/STRONG&gt; – &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;) ÷ &lt;STRONG&gt;M&lt;/STRONG&gt;]&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Vtemp&lt;/STRONG&gt;: Measured Internal Temperature Sensor Voltage&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;: Internal Temperature Sensor Voltage at 25ºC&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;M&lt;/STRONG&gt;: Slope values&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;TempC:&lt;/STRONG&gt; Calculated temperature in ºC&lt;/DIV&gt;&lt;DIV&gt;------------------------------------------------------------&lt;/DIV&gt;&lt;DIV&gt;The device datasheet also contains typical values for &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; and &lt;STRONG&gt;M&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;: 701.2mV&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Mcold&lt;/STRONG&gt;: 1.646&amp;nbsp;mV/°C (used if &lt;STRONG&gt;Vtemp&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;)&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Mhot&lt;/STRONG&gt;: 1.769&amp;nbsp;mV/°C (used if &lt;STRONG&gt;Vtemp&lt;/STRONG&gt;&amp;nbsp;&amp;lt; &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;)&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;------------------------------------------------------------&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For the calibration, I'm calculating &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; value&amp;nbsp;by using&amp;nbsp;typical slope values. For example, when ambient temperature is 19 ºC and the supply voltage is 3.3V, I calculate &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; with:&lt;/DIV&gt;&lt;DIV&gt;19&amp;nbsp;= 25 - [(&lt;STRONG&gt;Vtemp&lt;/STRONG&gt; – &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;) ÷ &lt;STRONG&gt;Mcold&lt;/STRONG&gt;]&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;After that calibration, I'm always using calculated &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; value&amp;nbsp;for my measurements.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;To &lt;A href="http://forums.freescale.com/freescale/view_profile?user.id=8738" target="_blank"&gt;&lt;SPAN&gt;allawtterb&lt;/SPAN&gt;&lt;/A&gt;:&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; value is my &lt;STRONG&gt;Vtemp_offset&lt;/STRONG&gt; value in my code at the top of the post.&lt;/DIV&gt;&lt;DIV&gt;I'm not calculating an &lt;STRONG&gt;Offset&lt;/STRONG&gt; like you mentioned. Just calculating &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;DIV&gt;"&lt;STRONG&gt;+0.5&lt;/STRONG&gt;" is for rounding up a double value to the integer value.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;To &lt;A href="http://forums.freescale.com/freescale/view_profile?user.id=1301" target="_blank"&gt;&lt;SPAN&gt;Mac&lt;/SPAN&gt;&lt;/A&gt;:&lt;/DIV&gt;&lt;DIV&gt;You suggested&amp;nbsp;to calculate &lt;STRONG&gt;Tcal&lt;/STRONG&gt; value instead of Vtemp25 value&amp;nbsp;at calibration. Am I right?&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;TempC&lt;/STRONG&gt; = 25 - [(&lt;STRONG&gt;Vtemp&lt;/STRONG&gt; – &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;) ÷ &lt;STRONG&gt;M&lt;/STRONG&gt;] + &lt;STRONG&gt;&lt;FONT color="#FF3333"&gt;Tcal&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;When I'm doing this, should I use typical &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; value?&lt;/DIV&gt;&lt;DIV&gt;The related application notes (AN3031 and AN3570) say &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; to recalculate for calibration at single point.&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;Using &lt;STRONG&gt;&lt;FONT color="#FF3300"&gt;Tcal&lt;/FONT&gt;&lt;/STRONG&gt; instead of &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; is more suitable?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you,&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 15:39:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207149#M17526</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2008-03-28T15:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207150#M17527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi BP,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;By how much is your calibrated &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; different from datasheet value of &lt;STRONG&gt;Vtemp25 (i.e.&lt;/STRONG&gt; 701.2mV).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And one more thing, &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; decided by FSL is done at 3.0 V and 25C. and you are doing is at&amp;nbsp;3.3V&amp;nbsp; and 19C right?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm not sure whether this deviation of 0.3 V will impact the calibration process to that level it will bring temperature calculated by +/-15 %.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can you calculate the temperature without this calibration process and see by what margin is temperature deviating?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Denn.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 16:25:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207150#M17527</guid>
      <dc:creator>Denn</dc:creator>
      <dc:date>2008-03-28T16:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207151#M17528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi Denn,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;DIV&gt;&lt;EM&gt;By how much is your calibrated &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; different from datasheet value of &lt;STRONG&gt;Vtemp25 (i.e.&lt;/STRONG&gt; 701.2mV).&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;As I see, &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; (&lt;EM&gt;Vtemp_offset in the code&lt;/EM&gt;) value varies between 7000 and 7500 that means 700.0mV and 750.0mV.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;DIV&gt;&lt;EM&gt;And one more thing, &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; decided by FSL is done at 3.0 V and 25C. and you are doing is at&amp;nbsp;3.3V&amp;nbsp; and 19C right?&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;Yes, you are right, I also make calibration at so different supply voltage other than 3.3V. It depends on the batery voltage 2.8V-3.6V and ambient temperature may change between 15ºC-35ºC. It is not always 19ºC.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Can you calculate the temperature without this calibration process and see by what margin is temperature deviating?&lt;/DIV&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;For example&lt;BR /&gt;Now the environment is 28 ºC for&amp;nbsp;5-6 hours.&lt;/DIV&gt;&lt;DIV&gt;And the calibrated product measures 28 ºC exactly at VDD=3.6V and 27 ºC at VDD=2.2V.&lt;/DIV&gt;&lt;DIV&gt;It uses 734.2mV precalculated value as &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If I used typical value&amp;nbsp;for Vtemp25:&lt;/DIV&gt;&lt;DIV&gt;Measured internal temperature voltage(&lt;EM&gt;Vtemp&lt;/EM&gt;) for 28ºC is &lt;STRONG&gt;729mV&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;DIV&gt;TempC = 25 - [729mV - 701.2mV] / 1.646 // cold slope because of Vtemp &amp;gt; Vtemp25 typical&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;TempC = 8ºC&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by BasePointer on &lt;SPAN class="date_text"&gt;2008-03-28&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;12:47 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 17:38:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207151#M17528</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2008-03-28T17:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207152#M17529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi BP,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;DIV&gt;BasePointer wrote:&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;If I used typical value&amp;nbsp;for Vtemp25:&lt;/DIV&gt;&lt;DIV&gt;Measured internal temperature voltage(&lt;EM&gt;Vtemp&lt;/EM&gt;) for 28ºC is &lt;STRONG&gt;729mV&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;DIV&gt;TempC = 25 - [729mV - 701.2mV] / 1.646 // cold slope because of Vtemp &amp;gt; Vtemp25 typical&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;TempC = 8ºC&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;DIV&gt;But if you manually calculate&amp;nbsp; temp comes around 24.9831 C not 8C.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;(for TempC = 25 - [729mV - 701.2mV] / 1.646)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;(28C - 24.9831)/28 = 10.77% deviation from actual reading !!!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I suspect some sort of programming error as a reason for 8 C value in "C code " maybe in typecasting or maybe ....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Denn&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 18:05:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207152#M17529</guid>
      <dc:creator>Denn</dc:creator>
      <dc:date>2008-03-28T18:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207153#M17530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;[729mV - 701.2mV] = &lt;STRONG&gt;27.8mV&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;27.8mV&lt;/STRONG&gt; ÷ 1.646 mV/°C = &lt;STRONG&gt;16.889&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;25 - &lt;STRONG&gt;16.889&lt;/STRONG&gt; = &lt;STRONG&gt;8.11 °C&lt;/STRONG&gt; ? Am I wrong?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 18:12:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207153#M17530</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2008-03-28T18:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207154#M17531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi BP,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Yes ..You are right .I calculated the slope as 1.646&amp;nbsp; and not 1.646 &lt;STRONG&gt;m&lt;/STRONG&gt;V/C and hence wrong in my calculations.Sorry for confusing atleast for few seconds.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Denn.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by Denn*** on &lt;SPAN class="date_text"&gt;2008-03-28&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;11:25 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 18:24:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207154#M17531</guid>
      <dc:creator>Denn</dc:creator>
      <dc:date>2008-03-28T18:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207155#M17532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My understanding is that the formula given in the datasheet uses a reference temperature of 0C (and not 25C).&amp;nbsp; Using the single point calibration method, it should be possible to calibrate for any known temperature, and this is what my post on the earlier thread attempted to do.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;i.e. Temp - Tcal = (Vtemp - Vcal) / m&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;where Vcal is the measured voltage at a known temperature Tcal, and m is the nominal slope in volts per degree C.&amp;nbsp; However, I do suggest that you multiply by the reciprocal slope (degrees C per volt), to give more manageable values,&amp;nbsp;and permit use of integer arithmetic.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Errors above and below Tcal will depend on variation of the actual slope from its nominal value.&amp;nbsp; The error at Tcal will be a minimum, but will still be significant because of the uncertainty associated with the limited ADC resolution.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For an unregulated supply, you will definitely need to make allowance for supply voltage variation,&amp;nbsp;using a measurement of the internal reference.&amp;nbsp; This was covered in the earlier post.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 18:57:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207155#M17532</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-03-28T18:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207156#M17533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Mac,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When temperature is rising, measured Vtemp voltage is decreasing (typical diode characteristic).&lt;/DIV&gt;&lt;DIV&gt;So the measured temperature should be proportional to "-Vtemp".&lt;/DIV&gt;&lt;DIV&gt;So the correct formule in datasheet&amp;nbsp;should be&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;TempC = 25.0 - [(Vtemp – 0.7013) ÷ 0.0017]&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If we calibrate it by adding an offset to it Tcal:&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;STRONG&gt;TempC&lt;/STRONG&gt; = 25.0 - [(&lt;STRONG&gt;Vtemp&lt;/STRONG&gt; – 0.7013) ÷ 0.0017] + &lt;STRONG&gt;Tcal&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;I can write it as&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;STRONG&gt;TempC&lt;/STRONG&gt; = 25.0 - [(&lt;STRONG&gt;Vtemp&lt;/STRONG&gt; – 0.7013+ (&lt;STRONG&gt;Tcal*0.0017&lt;/STRONG&gt;)) ÷ 0.0017]&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I call "&lt;STRONG&gt;0.7013 - Tcal*0.0017&lt;/STRONG&gt;" as &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; and 0.0017 as M&lt;/P&gt;&lt;P&gt;The formula becomes:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;STRONG&gt;TempC&lt;/STRONG&gt; = 25.0 - [(&lt;STRONG&gt;Vtemp&lt;/STRONG&gt; – Vtemp25) ÷ M]&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;The difference between your solution and mine&amp;nbsp;are non-constant slope values.&lt;/DIV&gt;&lt;DIV&gt;Your &lt;STRONG&gt;Vtemp25&lt;/STRONG&gt; value contains constant slope value "&lt;STRONG&gt;0.7013 - Tcal*0.0017&lt;/STRONG&gt;".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I mean with your way, I need to calculate two &lt;STRONG&gt;Tcal&lt;/STRONG&gt; value, for cold and hot such as M.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 20:03:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207156#M17533</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2008-03-28T20:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207157#M17534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello BP,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;"If I call "&lt;STRONG&gt;0.7013 - Tcal*0.0017&lt;/STRONG&gt;" as &lt;STRONG&gt;Vtemp25 "&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I think Vtemp25 = 0.7013 ==&amp;gt; 701.2mV&amp;nbsp;.see LC60 datasheet Page 336.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And moreover the reference voltage is for 25 C not 0 C.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Denny&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 20:29:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207157#M17534</guid>
      <dc:creator>Denn</dc:creator>
      <dc:date>2008-03-28T20:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207158#M17535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello BP,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I take your point.&amp;nbsp; I re-checked the datasheet, and the formula given there seems to be incorrect on two counts (assuming AN3031 is correct) -&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;The data sheet formula uses a positive slope (this is not an obvious error as some temperature sensors do provide a positive slope).&lt;/LI&gt;&lt;LI&gt;The data sheet implies a reference temperature of 0C, but then states that the 0.7013 volt is applicable to a termperature of 25C.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Slightly re-arranging formula 1 of AN3031 -&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Temp - 25 = -(Vtemp - Vtemp25)/m&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My previous point was that, if you use a single point calibration at a known temperature, the nominal value of Vtemp25 given in data sheet becomes irrelevant, and the formula would then become -&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Temp - Tcal = -(Vtemp - Vcal)/m&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the value of m is a very small, I would choose to make the substitution k = 1/m, to give the possibility of using integer arithmetic, rather than floating point -&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Temp - Tcal = -(Vtemp - Vcal)*k&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the values of m given in the application note, the following values of k would apply -&lt;/P&gt;&lt;P&gt;k(cold) = 600&amp;nbsp; degree C per volt&lt;/P&gt;&lt;P&gt;k(nom) = 588&lt;/P&gt;&lt;P&gt;k(hot) = 569&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You would apply the slope required, based on the value of Vtemp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2008-03-29&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;01:44 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2008 09:39:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207158#M17535</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-03-29T09:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207159#M17536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;To continue the my previous post ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Since Vtemp and Vcal will be measured using the ADC, this will give ADC results of Ntemp and Ncal, where -&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Vtemp = Ntemp*Vdd/Nmax&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Vcal&amp;nbsp; = Ncal*Vdd/Nmax&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Nmax = 1024 for 10-bit resolution, or Nmax = 4096 for 12-bit resolution.&amp;nbsp; However, if a further reading of the bandgap reference is taken, the expression &lt;FONT face="Courier New"&gt;Vdd/Nmax&lt;/FONT&gt; may be substituted with &lt;FONT face="Courier New"&gt;Vref/Nref&lt;/FONT&gt;.&amp;nbsp; The temperature calculation would then become as follows -&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Temp = Tcal - (Ntemp - Ncal)*(k*Vref)/Nref&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This means that the calculation becomes independent of Vdd, and will work for any ADC resolution (provided the same resolution is used for all three measurement values).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The expression &lt;FONT face="Courier New"&gt;(k*Vref)&lt;/FONT&gt; will be a constant, with one of the following values ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Cold value&amp;nbsp;&amp;nbsp;&amp;nbsp; 720&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Nominal value 706&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Hot value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 683&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2008 23:50:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207159#M17536</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-03-29T23:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: Again On-Chip Temperature Calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207160#M17537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Further to my previous post ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If the Vdd supply is from an unregulated (battery)&amp;nbsp;source, it is probable that the calibration process would have occurred at a different Vdd than the current reading.&amp;nbsp; This is easily compensated by simply measuring Vref at the time of calibration.&amp;nbsp; Therefore, the following calibration parameters would need to be stored:&lt;/DIV&gt;&lt;DIV&gt;Calibration temperature &lt;FONT face="Courier New"&gt;Tcal&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;ADC reading for the calibration &lt;FONT face="Courier New"&gt;Ncal&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;ADC reading for Vref measurement &lt;FONT face="Courier New"&gt;Nref(cal)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Using these parameters, the following can be calculated once, prior to commencement of temperature readings:&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Kcal = Ncal*(k*Vref)/Nref(cal) + Tcal&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Then for each new temperature reading, the&amp;nbsp;two ADC readings of &lt;FONT face="Courier New"&gt;Ntemp&lt;/FONT&gt; and &lt;FONT face="Courier New"&gt;Nref&lt;/FONT&gt; would be made.&amp;nbsp; The following calculation would then be used to derive the temperature value:&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;Temp = Kcal - Ntemp*(k*Vref)/Nref&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;These formulae will easily accommodate fixed point, integer calculations.&amp;nbsp; To improve the calculation precision (but not necessarily&amp;nbsp;the accuracy of the reading), it would be desireable for the temperature value integers to be expressed in tenths of a degree, i.e 20.0 degree C = 200.&amp;nbsp; This can be achieved by using the multiplier value &lt;FONT face="Courier New"&gt;(10*k*Vref)&lt;/FONT&gt;&lt;FONT face="Arial"&gt;.&amp;nbsp; In all cases, the multiplication must occur prior to the division.&amp;nbsp; The intermediate calculation, after the multiplication,&amp;nbsp;will need storage as a long (32-bit) value.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2008 22:19:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-Again-On-Chip-Temperature-Calibration/m-p/207160#M17537</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-03-30T22:19:02Z</dc:date>
    </item>
  </channel>
</rss>

