15 IR REMOTE CONTROLLER (REMC2)
15-2
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
If the port is shared with the REMC2 pin and other functions, the REMC2 output function must be assigned to the
port before activating the REMC2. For more information, refer to the “I/O Ports” chapter.
15.2.2 External Connections
Figure 15.2.2.1 shows a connection example between the REMC2 and an external infrared module.
S1C17 REMC2
REMO
V
DD2
TXD
V
CC
LEDA
IR transmitter module
Figure 15.2.2.1 Connection Example Between REMC2 and External Infrared Module
15.3 Clock Settings
15.3.1 REMC2 Operating Clock
When using the REMC2, the REMC2 operating clock CLK_REMC2 must be supplied to the REMC2 from the
clock generator. The CLK_REMC2 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 REMCLK register bits:
- REMCLK.CLKSRC[1:0] bits
(Clock source selection)
- REMCLK.CLKDIV[3:0] bits
(Clock division ratio selection = Clock frequency setting)
15.3.2 Clock Supply in SLEEP Mode
When using REMC2 during SLEEP mode, the REMC2 operating clock CLK_REMC2 must be configured so that
it will keep supplying by writing 0 to the CLGOSC.
xxxx
SLPC bit for the CLK_REMC2 clock source.
If the CLGOSC.
xxxx
SLPC bit for the CLK_REMC2 clock source is 1, the CLK_REMC2 clock source is deacti-
vated during SLEEP mode and REMC2 stops with the register settings maintained at those before entering SLEEP
mode. After the CPU returns to normal mode, CLK_REMC2 is supplied and the REMC2 operation resumes.
15.3.3 Clock Supply in DEBUG Mode
The CLK_REMC2 supply during DEBUG mode should be controlled using the REMCLK.DBRUN bit.
The CLK_REMC2 supply to the REMC2 is suspended when the CPU enters DEBUG mode if the REMCLK.
DBRUN bit = 0. After the CPU returns to normal mode, the CLK_REMC2 supply resumes. Although the REMC2
stops operating when the CLK_REMC2 supply is suspended, the output pin and registers retain the status before
DEBUG mode was entered. If the REMCLK.DBRUN bit = 1, the CLK_REMC2 supply is not suspended and the
REMC2 will keep operating in DEBUG mode.
15.4 Operations
15.4.1 Initialization
The REMC2 should be initialized with the procedure shown below.
1. Write 1 to the REMDBCTL.REMCRST bit.
(Reset REMC2)
2. Configure the REMCLK.CLKSRC[1:0] and REMCLK.CLKDIV[3:0] bits. (Configure operating clock)
3. Assign the REMC2 output function to the port. (Refer to the “I/O Ports” chapter.)