CHAPTER 11 A/D CONVERTER
User’s Manual U18432EJ5V0UD
393
<Obtaining temperature TNOW>
<14> Calculate the temperature by using either of the following methods.
When obtaining a temperature through calculation
During measurement at reference temperatures, write ADT0 and ADT1 to the internal flash memory
by means such as self programming. During actual measurement, calculate the current temperature
TNOW by using the following expression, based on ADT0 and ADT1 at that time.
ADT1BASE2
× (ADT1BASE1 × ADT0NOW ADT0BASE1 × ADT1NOW) × (TBASE2 TBASE1)
TNOW
ADT1NOW
× (ADT1BASE1 × ADT0BASE2 ADT0BASE1 × ADT1BASE2)
+ TBASE1
When obtaining a temperature through table reference
Measure and calculate the temperature sensor detection values (ADT0/ADT1
× 256) based on ADT0
and ADT1 at each temperature interval. Set the temperature corresponding to that value as table
data, and write it to the internal flash memory by means such as self programming.
During actual measurement, calculate the temperature sensor detection value (ADT0/ADT1
× 256)
based on ADT0 and ADT1 at that time, compare it with the value of table data, and obtain the current
temperature TNOW.
<Finishing A/D conversion>
<15> Clear ADCS to 0.
<16> Clear ADCE to 0.
<17> Clear bit 5 (ADCEN) of peripheral enable register 0 (PER0) to 0.
Cautions 1. Make sure the period of <2> to <5> is 1
μs or more. If ADCS is set to 1 within 1 μs,
the result of the third and later conversion becomes valid on the sensor 0 side.
2. <2> can be done between <3> and <4>.
3. The period from <7> to <10> differs from the conversion time set using bits 5 to 1
(FR2 to FR0, LV1, LV0) of ADM. The period from <9> to <10> is the conversion time
set using FR2 to FR0, LV1, and LV0.
4. Do not change the AVREF0 voltage during <4> to <13>. Although the temperature
sensor detection value does not depend on the AVREF0 voltage and thus there is no
problem even if the AVREF0 voltage varies at every temperature measurement, it
must be stable during a measurement cycle (from <4> to <13>).