R01UH0092EJ0110 Rev.1.10
Page 268 of 807
Jul 31, 2012
M16C/64C Group
17. Timer A
17.3
Operations
17.3.1
Common Operations
17.3.1.1
Operating Clock
The count source for each timer acts as a clock, controlling such timer operations as counting and
reloading.
If the conditions to start counting are met, the stopped counter starts counting at the count timing of the
first count source. For this reason, a delay exists between when the count start conditions are met and
the counter starts counting. Figure 17.4 shows Output Example of One-Shot Timer Mode.
Figure 17.4
Output Example of One-Shot Timer Mode
17.3.1.2
Counter Reload Timing
Timer Ai starts counting from the value set (n) in the TAi register. The TAi register consists of a counter
and a reload register. The counter starts decrementing the count source from n, reloads a value in the
reload register at the next count source after the value becomes 0000h, and continues decrementing.
When incrementing, the counter reloads a value in the reload register at the next count source after the
value becomes FFFFh.
The value written in the TAi register is reflected in the counter and the reload register at the following
timings:
•
When the count is stopped
•
Between when the count starts and when the first count source is input
A value written to the TAi register is immediately written to the counter and the reload register.
•
After the count starts and the first count source is input
A value written to the TAi register is immediately written to the reload register. The counter
continues counting and reloads the value in the reload register at the next count source after the
value becomes 0000h (or FFFFh).
Count source
TAiIN (trigger input)
TAiOUT
(one-shot pulse output)
Maximum 1.5 cycles of the count source
Trigger input
Count start
= output start
Summary of Contents for M16C Series
Page 846: ...M16C 64C Group R01UH0092EJ0110...