21 REMOTE CONTROLLER (REMC)
21-6
EPSON
S1C17704 TECHNICAL MANUAL
Use the following equation to determine the value to be set to the data length counter.
Set value = Data pulse width (second)
×
Prescaler output clock frequency (Hz)
The data length counter starts counting down from the written value using the selected prescaler output clock.
When the data counter value reaches 0, a cause of underflow interrupt occurs. The REMC module sends an
interrupt request to the interrupt controller (ITC) if the interrupt is enabled. The data length counter stops
counting at this point.
(5) Interrupt handling
To continue data transmission, set the next transmit data (3) and data pulse width (4) in the interrupt handler
routine executed because of a data length counter underflow.
(6) Terminating data transmission
After the last data transfer has finished (after an underflow interrupt occurs), write 0 to the REMEN bit to
terminate data transmission.
Data receive control
PCLK
PSC output clock
(Data length counter clock)
REMI 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
Figure 21.5.3 Data Reception
(1) Setting data receive mode
Write 1 to REMMD (D1/REMC_CFG register) to set the REMC in data receive mode.
(2) Enabling data reception
Set REMEN (D0/REMC_CFG register) to 1 to enable the REMC operation. This makes the REMC start the
data receive operation (input signal edge detection).
The REMC module samples the signal input to the REMI pin with the prescaler output clock selected for
the carrier generator to detect input transition (rising edge or falling edge of the signal). When a signal edge
is detected, a cause of rising edge or falling edge interrupt occurs and the REMC module sends an interrupt
request to the ITC if the interrupt is enabled. The rising edge and falling edge interrupts can be enabled
individually.
Note that a signal transition is regarded as noise if the signal level after the input changes is not sampled for two
or more sampling clock cycles. In this case no rising edge or falling edge interrupt occurs.
Содержание S1C17704
Страница 1: ...TECHNICAL MANUAL S1C17704 CMOS 16 BIT SINGLE CHIP MICROCOMPUTER ...
Страница 22: ...1 OVERVIEW 1 10 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 42: ...3 MEMORY MAP BUS CONTROL 3 12 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 82: ...6 INTERRUPT CONTROLLER ITC 6 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 108: ...8 CLOCK GENERATOR CLG 8 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 112: ...9 PRESCALER PSC 9 4 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 138: ...10 I O PORTS P 10 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 156: ...11 16 BIT TIMERS T16 11 18 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 208: ...14 8 BIT OSC1 TIMER T8OSC1 14 16 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 234: ...16 STOPWATCH TIMER SWT 16 14 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 242: ...17 WATCHDOG TIMER WDT 17 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 264: ...18 UART 18 22 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 300: ...20 I2C 20 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 320: ...21 REMOTE CONTROLLER REMC 21 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 360: ...24 ON CHIP DEBUGGER DBG 24 6 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 362: ...25 BASIC EXTERNAL WIRING DIAGRAM 25 2 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...