11 16-BIT TIMERS (T16)
S1C17704 TECHNICAL MANUAL
EPSON
11-3
11.2.2 External Clock Mode
In external clock mode, the timer uses the clock or pulses input from an I/O port as the count clock. Thus the timer
can be used as an event counter. The timer operation is the same as internal clock mode except the count clock
source.
External clock input ports
The table below lists the external clock/pulse input ports.
Table 11.2.2.1 External Clock Input Ports
Timer channel
Input signal name
I/O port pin
Ch.0
EXCL0
P16
Ch.1
EXCL1
P07
Ch.2
EXCL2
P06
Make sure that the I/O port used for an external clock/pulse input is set to input mode (default). It is not
necessary to select the pin function. Although the I/O port functions as a general-purpose input port, the input
signal is also sent to the 16-bit timer.
The P07 and P06 ports that are respectively used by the 16-bit timer Ch.1 and Ch.2 incorporate a chattering
filter and it is effective for the EXCL
x
input signal. For controlling the chattering filter, see Section 10.6,
“Chattering Filter for P0 Ports.”
Selecting the signal polarity
The external clock mode allows selection of a input signal edge to perform counting. Either falling edge or
rising edge can be selected using the CKACTV (D10/T16_CTL
x
register).
∗
CKACTV
: External Clock Active Level Select Bit in the 16-bit Timer Ch.
x
Control (T16_CTL
x
) Register
(D10/0x4226/0x4246/0x4266)
When CKACTV is 1 (default), the timer counts down at the rising edge of the input signal; when it is set to 0,
the timer counts down at the falling edge.
External input clock
PRUN
Counter (CKACTV = 1)
Counter (CKACTV = 0)
n-1
n-2
n-3
n-4
n-5
n-6
n-7
n-8
n-9 n-10
n
n-1
n-2
n-3
n-4
n-5
n-6
n-7
n-8
n-9 n-10
n
Figure 11.2.2.1 Count Timing in External Clock Mode
The 16-bit timer set in this mode does not use the prescaler. If the prescaler clocks are not used in other peripheral
modules, the prescaler can be stopped to reduce current consumption. (Note that the P0 port chattering filter uses a
prescaler clock.)
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 ...