Count Mode - Epson S1C17001 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

11.3 Count Mode

The 16-bit timer features two count modes: Repeat mode and One-shot mode. These modes are selected using the
TRMD (D4/T16_CTLx register).
∗ TRMD: Count Mode Select Bit in the 16-bit Timer Ch.x Control (T16_CTLx) Register (D4/0x4226/0x4246/
0x4266)
Repeat mode (TRMD = 0, default)
Setting TRMD to 0 sets the 16-bit timer to Repeat mode.
In this mode, once the count starts, the 16-bit timer continues running until stopped by the application program.
If the counter underflows, the timer presets the reload data register value into the counter and continues the
count. Thus, the timer periodically outputs an underflow pulse. The 16-bit timer should be set to this mode to
generate periodic interrupts at desired intervals or to generate a serial transfer clock.
One-shot mode (TRMD = 1)
Setting TRMD to 1 sets the 16-bit timer to One-shot mode.
In this mode, the 16-bit timer stops automatically as soon as the counter underflows. This means only one inter-
rupt can be generated after the timer starts. Note that the timer presets the reload data register value to the coun-
ter, then stops after an underflow has occurred. The 16-bit timer should be set to this mode to set a specific wait
time or for pulse width measurement.
S1C17001 TECHNICAL MANUAL
EPSON
11 16-BIT TIMER (T16)
111

Advertisement

Table of Contents
loading

Table of Contents