11 16-BIT TIMERS (T16)
11-2
EPSON
S1C17704 TECHNICAL MANUAL
11.2 16-bit Timer Operating Mode
The 16-bit timer has three operating modes.
1. Internal clock mode (general timer to count the internal clock)
2. External clock mode (functions as an event counter)
3. Pulse width measurement mode (measures external input pulse widths by counting the internal clock)
Use CKSL[1:0] (D[9:8]/T16_CTL
x
register) to select the operating mode.
∗
CKSL[1:0]
: Input Clock and Pulse Width Count Mode Select Bits in the 16-bit Timer Ch.
x
Control (T16_CTL
x
)
Register (D[9:8]/0x4226/0x4246/0x4266)
Table 11.2.1 Selecting Operating Mode
CKSL[1:0]
Operating mode
0x3
Reserved
0x2
Pulse width measurement mode
0x1
External clock mode
0x0
Internal clock mode
(Default: 0x0)
11.2.1 Internal Clock Mode
In internal clock mode, the timer uses the prescaler output clock as the count clock.
The timer starts counting down from the counter initial value set in the reload data register and outputs the
underflow signal when the counter underflows. The underflow signal is used to generate an interrupt and a clock
for the internal serial interface. The period until an underflow occurs can be programmed minutely according to the
prescaler clock and counter initial value selections, so this mode is useful for generating a serial transfer clock or a
one-shot time measurement.
Selecting the count clock
Use the DF[3:0] bits (D[3:0]/T16_CLK
x
register) to select the count clock from the 15 clocks, PCLK divided
by 1 to PCLK divided by 16K, generated by the prescaler.
∗
DF[3:0]
: Timer Input Clock Select Bits in the 16-bit Timer Ch.
x
Input Clock Select (T16_CLK
x
) Register
(D[3:0]/0x4220/0x4240/0x4260)
Table 11.2.1.1 Selecting the Count Clock
DF[3:0]
Prescaler output clock
DF[3:0]
Prescaler output clock
0xf
Reserved
0x7
PCLK•1/128
0xe
PCLK•1/16384
0x6
PCLK•1/64
0xd
PCLK•1/8192
0x5
PCLK•1/32
0xc
PCLK•1/4096
0x4
PCLK•1/16
0xb
PCLK•1/2048
0x3
PCLK•1/8
0xa
PCLK•1/1024
0x2
PCLK•1/4
0x9
PCLK•1/512
0x1
PCLK•1/2
0x8
PCLK•1/256
0x0
PCLK•1/1
(Default: 0x0)
Notes
: • Before the 16-bit timer can start counting in internal clock mode, the prescaler must be run.
• When setting the count clock, make sure the 16-bit timer counter is stopped.
For controlling the prescaler, see Chapter 9, “Prescaler (PSC).”
Содержание 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 ...