Count Mode Of The 8-Bit Timer - Epson S1C17704 Technical Manual

Cmos 16-bit single chip microcomputer
Table of Contents

Advertisement

12 8-BIT TIMER (T8F)

12.2 Count Mode of the 8-bit Timer

The 8-bit timer has two count modes: repeat mode and one-shot mode. It can be selected using the TRMD bit (D4/
T8F_CTL register).
∗ TRMD: Count Mode Select Bit in the 8-bit Timer Control (T8F_CTL) Register (D4/0x4206)
Repeat mode (TRMD = 0, default)
The 8-bit timer is set in repeat mode when TRMD is set to 0.
In this mode, the 8-bit timer does not stop after it starts counting until the application program stops the timer.
When the counter underflows, the timer presets the reload data register value to the counter and continues
counting. The timer outputs the underflow pulses periodically. Set the 8-bit timer in this mode when generating
periodical interrupts with a given interval or generating the serial transfer clock.
One-shot mode (TRMD = 1)
The 8-bit timer is set in one-shot mode when TRMD is set to 1.
In this mode, the 8-bit timer automatically stops counting when the counter underflows, so only one interrupt
can be generated after starting the timer. When an underflow occurs, the counter is preset with the reload data
register value before the timer operation stops. Set the 8-bit timer in this mode when a certain waiting time
must be generated.
Note: When setting the count mode, make sure the 8-bit timer counter is stopped.
12-2
EPSON
S1C17704 TECHNICAL MANUAL

Advertisement

Table of Contents
loading

Table of Contents