15 IR REMOTE CONTROLLER (REMC2)
S1C17M12/M13 TECHNICAL MANUAL
Seiko Epson Corporation
15-5
(Rev. 1.2)
Example) REMAPLEN.APLEN[15:0] bits = 0x0bd0, REMDBLEN.DBLEN[15:0] bits = 0x11b8,
REMDBCTL.TRMD bit = 0 (repeat mode), REMDBCTL.REMOINV bit = 0 (signal logic non-inverted)
REMDBCTL.PRUN
16-bit counter for
data signal generation
(DBCNT[15:0])
REMINTF.APIF
Compare AP interrupt
REMINTF.DBIF
Compare DB interrupt
Data signal
(Modulated data)
1 2 3 4
0
0x0bd1
0x0bd0
1
0
2 3 4
0x0bd1
0x0bd0
0x11b8
A: REMAPLEN.APLEN[15:0] bits + 1 [clock]
B: REMDBLEN.DBLEN[15:0] bits + 1 [clock]
A
B
Figure 15.4.3.3 Example of Data Signal Generated
The data length and duty ratio of the pulse-width-modulated data signal can be calculated with the equations
shown below.
DBLEN + 1
APLEN + 1
Data length = ————————
Duty ratio = ————————
(Eq. 15.2)
f
CLK_REMC2
DBLEN + 1
Where
f
CLK_REMC2
: CLK_REMC2 frequency [Hz]
DBLEN: REMDBLEN.DBLEN[15:0] bit-setting value (1–65,535)
APLEN: REMAPLEN.APLEN[15:0] bit-setting value (0–65,534)
*
REMAPLEN.APLEN[15:0] bits < REMDBLEN.DBLEN[15:0] bits
The 16-bit counter for data signal generation is reset by the REMDBCTL.PRESET bit and is started/stopped
by the REMDBCTL.PRUN bit. When the counter value is matched with the REMAPLEN.APLEN[15:0] bits
(compare AP), the data signal waveform is inverted. When the counter value is matched with the REMDBLEN.
DBLEN[15:0] bits (compare DB), the data signal waveform is inverted and the counter is reset to 0x0000.
A different interrupt can be generated when the counter value is matched with the REMDBLEN.DBLEN[15:0]
and REMAPLEN.APLEN[15:0] bits, respectively.
Repeat mode and one-shot mode
When the 16-bit counter for data signal generation is set to repeat mode (REMDBCTL.TRMD bit = 0), the
counter keeps operating until it is stopped using the REMDBCTL.PRUN bit. When the counter is set to one-
shot mode (REMDBCTL.TRMD bit = 1), the counter stops automatically when the counter value is matched
with the REMDBLEN.DBLEN[15:0] bit-setting value.
15.4.4 Continuous Data Transmission and Compare Buffers
Figure 15.4.4.1 shows an operation example of continuous data transmission with the compare buffer enabled.