NEC 78K0R/KE3 User Manual page 324

16-bit single-chip microcontrollers
Table of Contents

Advertisement

<Obtaining temperature T
<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
T
by using the following expression, based on ADT0 and ADT1 at that time.
NOW
ADT1
T
NOW
• 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 T
<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
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
4. Do not change the AV
324
CHAPTER 10 A/D CONVERTER
>
NOW
× (ADT1
× ADT0
BASE2
BASE1
× (ADT1
ADT1
NOW
BASE1
.
NOW
the result of the third and later conversion becomes valid on the sensor 0 side.
(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.
REF
sensor detection value does not depend on the AV
problem even if the AV
must be stable during a measurement cycle (from <4> to <13>).
User's Manual U17854EJ9V0UD
− ADT0
× ADT1
NOW
BASE1
NOW
× ADT0
− ADT0
× ADT1
BASE2
BASE1
μ
s or more. If ADCS is set to 1 within 1
voltage during <4> to <13>. Although the temperature
voltage varies at every temperature measurement, it
REF
) × (T
− T
)
BASE2
BASE1
+ T
BASE1
)
BASE2
voltage and thus there is no
REF
μ
s,

Advertisement

Table of Contents
loading

Table of Contents