22 REMOTE CONTROLLER (REMC)
22-4
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
(4) Data pulse length setting
Set the value corresponding to the data pulse length (High or Low section) to REMLEN[7:0]/REMC_LCNT
register to set to the data length counter.
Given below is the value to which the data length counter is set:
Setting value = Data pulse length (seconds)
×
Prescaler output clock frequency (Hz)
The data length counter starts counting down from the value written using the prescaler output clock selected.
A cause of underflow interrupt occurs when the data length counter value reaches 0. If the interrupt is enabled,
an REMC interrupt request is output to the interrupt controller (ITC). The data length counter stops counting at
the same time with the counter value 0 maintained.
(5) Interrupt handling
To transmit the subsequent data, set the subsequent data (Step 3) and set the data pulse length (Step 4) in the
interrupt handler routine executed by the data length counter underflow.
(6) Terminating data transmission
To terminate data transmission, set REMEN to 0 after the final data transmission has completed (after an under-
flow interrupt has occurred).
Data reception control
PCLK2
PSC Ch.1 output clock
(Data length counter clock)
REMC_I input
REMDT
(Sampled waveform)
REMRIF
REMFIF
Interrupt signal
REMLEN[7:0]
Write 0xff
x+2
x+1
x
0xff
0xfe
0xfd
0xff
Write 0xff
Write 1
Write 1
5.3 Data Reception
Figure 22.
(1) Data receive mode setting
Set REMC to receive mode by writing 1 to REMMD/REMC_CFG register.
(2) Enabling data reception
Enable REMC operation by setting REMEN/REMC_CFG register to 1. This initiates REMC reception (input
edge detection).
REMC detects an input transition (signal rising or falling edges) by sampling the input signal from the REMC_
I pin using the prescaler output clock selected for carrier generation. If a signal edge is detected, a cause of
rising or falling edge interrupt is generated. An REMC interrupt request is output to the ITC if the interrupt is
enabled. Rising edge and falling edge interrupts can be individually enabled or disabled.
Note that if the signal level after the input has changed is not detected for at least two continuous sampling
clock cycles, the input signal transition is interpreted as noise, and no rising or falling edge interrupt is gener-
ated.
(3) Interrupt handling
When a rising edge or falling edge interrupt occurs, write 0xff to REMLEN[7:0]/REMC_LCNT register in the
interrupt handler routine to set the value to the data length counter.
The data length counter starts counting down using the selected prescaler output clock from the value written.