21 REMOTE CONTROLLER (REMC)
S1C17704 TECHNICAL MANUAL
EPSON
21-9
Falling edge interrupt
This interrupt request occurs when the signal input to the REMI pin goes low from high status, and it sets the
interrupt flag REMFIF (D2/REMC_IFLG register) in the REMC module to 1.
During data reception, run the data length counter between this interrupt and the corresponding rising edge
interrupt. The receive data pulse width can be calculated from the count value.
∗
REMFIF
: Falling Edge Interrupt Flag in the REMC Interrupt Flag (REMC_IFLG) Register (D2/0x5347)
Set the REMFIE bit (D2/REMC_IMSK register) to 1 when using this interrupt. If REMFIE is set to 0 (default),
REMFIF will not be set to 1 and an interrupt request by this cause will not be sent to the ITC.
∗
REMFIE
: Falling Edge Interrupt Enable Bit in the REMC Interrupt Mask (REMC_IMSK) Register (D2/0x5346)
If REMFIF is set to 1, the REMC module outputs the interrupt request signal to the ITC. The interrupt request
signal sets the REMC interrupt flag in the ITC to 1 and an interrupt occurs if other interrupt conditions meet the
ITC and S1C17 Core settings.
The REMC interrupt handler routine should read the REMFIF flag to check if the interrupt has occurred due to
detection of a falling edge of the input signal or another cause.
Furthermore, the interrupt handler routine must reset (write 1 to) REMFIF in the REMC module as well as the
REMC interrupt flag in the ITC, to clear the cause of interrupt.
ITC registers for REMC interrupt
When a cause of interrupt that has been enabled occurs according to the interrupt condition settings shown
above, the REMC module asserts the interrupt signal sent to the ITC. To generate a REMC interrupt, set the
interrupt level and enable the interrupt using the ITC registers.
The following shows the control bits for the REMC interrupt in the ITC.
Interrupt flag in the ITC
∗
IIFT5
: Remote Controller Interrupt Flag in the Interrupt Flag (ITC_IFLG) Register (D13/0x4300)
Interrupt enable bit in the ITC
∗
IIEN5
: Remote Controller Interrupt Enable Bit in the Interrupt Enable (ITC_EN) Register (D13/0x4302)
Interrupt level setup bits in the ITC
∗
IILV5[2:0]
: REMC Interrupt Level Bits in the Internal Interrupt Level Setup (ITC_ILV2) Register 2 (D[10:8]/0x4312)
The interrupt signal sent from the REMC module sets IIFT5 to 1. If IIEN5 has been set to 1, the ITC sends an
interrupt request to the S1C17 Core. To disable the REMC interrupt, set IIEN5 to 0. IIFT5 is always set to 1 by the
interrupt signal sent from the REMC module, regardless of how IIEN5 is set (even when set to 0).
IILV5[2:0] sets the interrupt level (0 to 7) of the REMC interrupt.
An interrupt request to the S1C17 Core is accepted only when all the conditions described below are met.
• The interrupt enable bit is set to 1.
• The IE (Interrupt Enable) bit of the PSR (Processor Status Register) in the S1C17 Core is set to 1.
• The REMC interrupt has a higher interrupt level than the value that is set in the IL field of the PSR.
• No other cause of interrupt having higher priority, such as NMI, has occurred.
For details on these interrupt control registers, as well as the device operation when an interrupt has occurred,
see Chapter 6, “Interrupt Controller (ITC).”
Interrupt vector
The following shows the vector number and vector address for the REMC interrupt:
Vector number: 17 (0x11)
Vector
address:
0x8044
Summary of Contents for S1C17704
Page 1: ...TECHNICAL MANUAL S1C17704 CMOS 16 BIT SINGLE CHIP MICROCOMPUTER ...
Page 22: ...1 OVERVIEW 1 10 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 42: ...3 MEMORY MAP BUS CONTROL 3 12 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 82: ...6 INTERRUPT CONTROLLER ITC 6 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 108: ...8 CLOCK GENERATOR CLG 8 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 112: ...9 PRESCALER PSC 9 4 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 138: ...10 I O PORTS P 10 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 156: ...11 16 BIT TIMERS T16 11 18 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 208: ...14 8 BIT OSC1 TIMER T8OSC1 14 16 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 234: ...16 STOPWATCH TIMER SWT 16 14 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 242: ...17 WATCHDOG TIMER WDT 17 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 264: ...18 UART 18 22 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 300: ...20 I2C 20 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 320: ...21 REMOTE CONTROLLER REMC 21 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 360: ...24 ON CHIP DEBUGGER DBG 24 6 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 362: ...25 BASIC EXTERNAL WIRING DIAGRAM 25 2 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...