Epson S1C17F13 Technical Manual page 194

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

20 Temperature Detection Circuit (TEM)
20.2
Clock Settings
20.2.1
TEM Operating Clock
When using TEM, the TEM operating clock CLK_TEM must be supplied to TEM from the clock generator. The
CLK_TEM supply should be controlled as in the procedure shown below.
1. Enable the clock source in the clock generator if it is stopped (refer to "Clock Generator" in the "Power Supply,
Reset, and Clocks" chapter).
2. Set the following TEMCLK register bits:
- TEMCLK.CLKSRC[1:0] bits (Clock source selection)
- TEMCLK.CLKDIV[1:0] bits (Clock division ratio selection = Clock frequency setting)
20.2.2
Clock Supply in SLEEP Mode
When using TEM during SLEEP mode, the TEM operating clock CLK_TEM must be configured so that it will
keep supplying by writing 0 to the CLGOSC.xxxxSLPC bit for the CLK_TEM clock source.
20.2.3
Clock Supply in DEBUG Mode
The CLK_TEM supply during DEBUG mode should be controlled using the TEMCLK.DBRUN bit.
The CLK_TEM supply to TEM is suspended when the CPU enters DEBUG mode if the TEMCLK.DBRUN bit =
0. After the CPU returns to normal mode, the CLK_TEM supply resumes. Although TEM stops operating when the
CLK_TEM supply is suspended, the registers retain the status before DEBUG mode was entered. If the TEMCLK.
DBRUN bit = 1, the CLK_TEM supply is not suspended and TEM will keep operating in DEBUG mode.
20.3
Operations
20.3.1
Initialization
TEM should be initialized with the procedure shown below.
1. Set the TEMCLK.CLKSRC[1:0] and TEMCLK.CLKDIV[1:0] bits. (Configure operating clock)
2. Set the TEMTMG.CVTM[7:0] bits.
3. Set the following bits when using the interrupt:
- Write 1 to the TEMINTF.TEMIF bit.
- Set the TEMINTE.TEMIE bit to 1.
20.3.2
Comparison Time Setting
Set the time for comparing each comparison voltage by the comparator to the TEMTMG.CVTM[7:0] bits.
Be sure to set a 150 µs or more comparison time including clock frequency dispersion.
Comparison time = —————— ≥ 150 [µs]
CLK_TEM
Where
CVTM:
TEMTMG.CVTM[7:0] bit setting value (0 to 255)
CLK_TEM: CLK_TEM frequency [Hz]
20-2
CVTM + 1
Seiko epson Corporation
(Set comparison time)
(Clear interrupt flag)
(Enable interrupt)
(Eq. 20.1)
S1C17F13 TeChniCal Manual
(Rev. 1.0)

Advertisement

Table of Contents
loading

Table of Contents