Epson S1C17001 Technical Manual page 284

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

(3) Interrupt processing
When a rising edge or falling edge interrupt occurs, 0xff is written to REMLEN[7:0] (D[7:0]/REMC_LCNT
register) as part of the interrupt processing routine and set as the value of the data length counter.
The data length counter begins counting down using the selected prescaler output clock from the value written.
The data received can be read out from REMDT (D0/REMC_ST register).
The subsequent trailing or rising edge interrupt is generated once the data pulse ends, at which point the data
length counter is read out. The data length can be calculated from the difference between 0xff and the value
read. To receive the subsequent data, set the data length counter to 0xff once again, then wait for the subsequent
interrupt.
If the data length counter becomes 0 after being set to 0xff without the occurrence of an edge interrupt, either
data receiving is complete or a receive error has occurred. Data length counter underflow interrupts are gener-
ated even when receiving data and should be used for end/error processing.
(4) Data receipt end
To end data receipt, write 0 to REMEN after the final data has been received.
S1C17001 TECHNICAL MANUAL
21 REMOTE CONTROLLER (REMC)
EPSON
275

Advertisement

Table of Contents
loading

Table of Contents