22 REMOTE CONTROLLER (REMC)
22-2
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
3.1 Carrier Generation Clock (PCLK2 Division Ratio) Selection
Table 22.
CGCLK[3:0]
Division ratio
CGCLK[3:0]
Division ratio
0xf
Reserved
0x7
1/128
0xe
1/16384
0x6
1/64
0xd
1/8192
0x5
1/32
0xc
1/4096
0x4
1/16
0xb
1/2048
0x3
1/8
0xa
1/1024
0x2
1/4
0x9
1/512
0x1
1/2
0x8
1/256
0x0
1/1
(Default: 0x0)
For more information on prescaler control, see the “Prescaler (PSC)” chapter.
Note: The prescaler must be run before the REMC module can operate.
The carrier H and L section lengths are set by REMCH[5:0]/REMC_CAR register and REMCL[5:0]/REMC_CAR
register, respectively. Set a value corresponding to the number of clock (selected as above) 1 to these regis-
ters.
The carrier H and L section lengths can be calculated as follows:
REMCH + 1
Carrier H section length = —————— [s]
clk_in
REMCL + 1
Carrier L section length = —————— [s]
clk_in
REMCH: Carrier H section length data value
REMCL: Carrier L section length data value
clk_in: Prescaler (PSC Ch.1) output clock frequency
The carrier signal is generated from these settings as shown in Figure 22.3.1.
Example: CGCLK[3:0] = 0x2 (PCLK2/4), REMCH[5:0] = 2, REMCL[5:0] = 1
PCLK2
PSC Ch.1 output clock
Count
Carrier
0
1
2
0
1
0
Carrier H section length
Carrier L section length
3.1 Carrier Signal Generation
Figure 22.
Data Length Counter Clock Settings
22.4
The data length counter is an 8-bit counter for setting data lengths when transmitting data.
When a value corresponding to the data pulse width is written during data transmission, the data length counter
begins counting down from that value and stops after generating an underflow interrupt cause when the counter
reaches 0. The subsequent transmit data is set using this interrupt.
This counter is also used for data receiving, enabling measurement of the received data length. Interrupts can be
generated at the input signal rising or falling edges when receiving data. The data pulse length can be obtained from
the difference between data pulse edges by setting the data length counter to 0xff using the interrupt when the input
changes and by reading out the count value when a subsequent interrupt occurs due to input changes.
This data length counter count clock also uses a prescaler output clock and can select one of 15 different types. The
prescaler output clock is selected by LCCLK[3:0]/REMC_CFG register provided separately to the carrier genera-
tion clock select bits.