Epson S1C17704 Technical Manual page 307

Cmos 16-bit single chip microcomputer
Table of Contents

Advertisement

(3) Interrupt handling
When a rising edge or falling edge interrupt occurs, write 0xff to REMLEN[7:0] (D[7:0]/REMC_LCNT
register) to set it to the data length counter in the interrupt handler routine.
The data length counter starts counting with the selected prescaler output clock from the value written to it.
The received data can be read from REMDT (D0/REMC_ST register).
At the trailing edge of the data pulse, the next falling edge or rising edge interrupt occurs. Read the data length
counter at that point. The data length can be calculated from the difference between 0xff and the read value.
To continue data reception, set the data length counter to 0xff again and wait until the next interrupt.
If the data length counter reaches 0 without an interrupt generated after the counter is set to 0xff, either no
receive data remains or a receive error has occurred. A data length counter underflow interrupt occurs even in
data reception, use it for a terminate/error processing.
(4) Terminating data reception
After the last data transfer has finished, write 0 to the REMEN bit to terminate data reception.
S1C17704 TECHNICAL MANUAL
21 REMOTE CONTROLLER (REMC)
EPSON
21-7

Advertisement

Table of Contents
loading

Table of Contents