20 Temperature Detection Circuit (TEM)
S1C17F13 TeChniCal Manual
Seiko epson Corporation
20-3
(Rev. 1.0)
Temperature Detection
20.3.3
A temperature detection control procedure and operations of TEM are shown below.
Control procedure
1. Set the TEMCTL.MODEN bit to 1.
(Enable TEM/Activate temperature sensor)
2. Wait a time interval at least 10 ms required for the temperature sensor to stabilize the operation.
3. Write 1 to the TEMCTL.TEMTRG bit. (Start temperature conversion)
4. After a TEM interrupt has occurred, read the conversion results from the TEMRSLT.TEMP[7:0] bits.
Temperature detecting operations
Writing 1 to the TEMCTL.MODEN bit turns the temperature sensor on to start temperature detection.
The temperature conversion operation starts by writing 1 to the TEMCTL.TEMTRG bit after taking the tem-
perature sensor stabilization wait time.
The comparator converts the temperature sensor output voltage (analog value that varies according to tempera-
ture) into an 8-bit digital value and stores the results to the TEMRSLT.TEMP[7:0] bits. The following shows
the conversion time:
Conversion time = Comparison time (Eq. 20.1)
×
8
(Eq. 20.2)
Example: Conversion time = 1,200 µs when Comparison time = 150 µs.
The TEMINTF.TEMST bit is set to 1 during converting operation and reverts to 0 after the conversion has fin-
ished. Note, however, that a maximum one CLK_TEM cycle of delay occurs until the TEMINTF.TEMST bit is
set to 1 after 1 is written to the TEMCTL.TEMTRG bit.
When the conversion operation has finished, the interrupt flag (TEMINTF.TEMIF bit) is set to 1.
The temperature conversion being executed can be terminated by writing 0 to the TEMCTL.TEMTRG bit. The
conversion results become invalid in this case.
MODEN
Temperature
sensor output
TEMCTL.TEMTRG
Comparison voltage
TEMINTF.TEMST
TEMRSLT.TEMP[7:0]
TEMINTF.TEMIF
Invalid
Valid
Invalid
Conversion results
Invalid
Invalid
Conversion
completion interrupt
10 ms
150
µ
s 150
µ
s (min.)
Reset
interrupt flag
1,200
µ
s (min.)
3.3.1 Temperature Conversion Operation
Figure 20.
Correspondence between detection results and temperature
The table below lists the temperature (within the detection range) corresponding to the 8-bit value read from the
TEMRSLT.TEMP[7:0] bits.