Pulse Width Measurement Mode - Epson S1C17001 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

11 16-BIT TIMER (T16)

11.2.3 Pulse Width Measurement Mode

In pulse width measurement mode, when pulses with the specified polarity are input from the external clock port,
the internal clock is fed only while the signal is active, enabling counting. This enables interrupt generation and in-
put pulse width measurements for pulse inputs of the specified width or greater.
Pulse input port
The Input/output port used for external pulse input is the same as for external clock mode (see Table 11.2.2.1).
Input pulses using the input/output port corresponding to the timer channel in input mode.
Count clock selection
Counting uses the prescaler output clock selected by DF[3:0] (D[3:0]/T16_CLKx register) in the same way as
for internal clock mode. Select the clock to suit approximate input pulse widths and counting accuracy.
Signal polarity selection
CKACTV (D10/T16_CTLx register) is used to select the active level for the pulses counted. The High period is
measured when CKACTV is 1 (default) and the Low period is measured when CKACTV is set to 0.
Example 1: Pulse width measurement
Internal count clock
External input signal
Counter (CKACTV = 1)
Example 2: Detecting pulses over specified width
Internal count clock
External input signal
Counter (CKACTV = 1)
Figure 11.2.3.1: Pulse width measurement mode count operation
110
PRUN
0x0
PRUN
n
0xff 0xfe 0xfd
n-1 n-2 n-3
EPSON
n+3 n+2 n+1
n
0x2 0x1 0x0
n
Underflow interrupt
S1C17001 TECHNICAL MANUAL

Advertisement

Table of Contents
loading

Table of Contents