11 16-BIT TIMERS (T16)
11-4
EPSON
S1C17704 TECHNICAL MANUAL
11.2.3 Pulse Width Measurement Mode
In pulse width measurement mode, the internal clock is supplied to the counter only while an external pulse input
from the external clock port is at the active level specified. This makes it possible to generate an interrupt when a
pulse longer than a specified width is input or to measure the input pulse width.
Pulse input port
The I/O ports used to input external pulses are the same as the external clock mode (see Table 11.2.2.1).
Set the I/O port, which corresponds to the timer channel used, to input mode and input pulses to be measured
from the I/O pin.
Selecting the count clock
As in the case of the internal clock mode, the timer operates with the prescaler output clock selected using
DF[3:0] (D[3:0]/T16_CLK
x
register). Select an appropriate clock according to the approximate input pulse
width and measurement accuracy (see Table 11.2.1.1).
Selecting the signal polarity
Use CKACTV (D10/T16_CTL
x
register) to select the active level for the pulse to be measured. When
CKACTV is 1 (default), the high period of the input pulse will be measured; when it is set to 0, the low period
will be measured.
Internal count clock
PRUN
External input signal
Counter (CKACTV = 0)
n-1
n-2
n-3
0x2 0x1 0x0
n
n
Internal count clock
PRUN
External input signal
Counter (CKACTV = 1)
Underflow interrupt
0xff 0xfe 0xfd
n+3 n+2 n+1
n
0x0
Example 1) When measuring a pulse width
Example 2) When detecting a pulse that exceeds the specified width
Figure 11.2.3.1 Count Operation in Pulse Width Measurement Mode
Содержание 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 ...