English
Language : 

M32C8A Datasheet, PDF (173/372 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M32C/80 Series
M32C/8A Group
15. Timers (Timer A)
15.1.2 Event Counter Mode
In event counter mode, the timer counts overflows/underflows of another timer, or the external pulse input.
Timers A2, A3, and A4 can count externally generated two-phase signals.
Table 15.4 lists specifications of event counter mode when not handling two-phase pulse signals.
Table 15.5 lists specifications of event counter mode when handling two-phase pulse signals with timers A2,
A3, and A4. Figure 15.15 shows a event counter mode operation when not handling two-phase pulse signals.
Figure 15.16 shows a event counter mode operation when handling two-phase pulse signals with timers A2, A3,
and A4.
Table 15.4 Specifications of Event Counter Mode When Not Handling Two-Phase Pulse Signals
Item
Specification
Count source
• External signal applied to the TAiIN pin (i = 0 to 4) (valid edge is selectable by
program)
• Timer B2 overflows or underflows
• Timer Aj overflows or underflows (j = i - 1, except j = 4 if i = 0)
• Timer Ak overflows or underflows (k = i + 1 except k = 0 if i = 4)
Count operation
• Count direction (increment or decrement) can be selected by external signal or
by program.
• Reload/Free-run type can be selected.
Reload function: The contents of the reload register are reloaded into the
counter and the count continues when the timer underflows or overflows.
Free-running function: The counter continues running without reloading when
the timer underflows or overflows.
Number of counting
(FFFFh - n + 1): when incrementing
n + 1: when decrementing
n: setting value of the TAi register, 0000h to FFFFh
Count start condition
The TAiS bit in the TABSR Register is set to 1 (count starts)
Count stop condition
The TAiS bit is set to 0 (count stops)
Interrupt request generation timing When the timer overflows or underflows
TAiIN pin function
Count source input
TAiOUT pin function
Pulse output, or input to select the count direction
Read from timer
A read from the TAi register returns a counter value
Write to timer
Selectable function
• A write to the TAi register while the count is stopped:
The value is written to both the reload register and the counter.
• A write to the TAi register while counting:
The value is written to the reload register (It is transferred to the counter at the
next reload timing).(1)
Pulse output function
The polarity of the TAiOUT pin is inverted whenever the timer overflows or
underflows. The TAiOUT pin outputs “L” signal while the TAiS bit is 0 (count
stops).
NOTE:
1. Wait for one count source cycle or more to write after the count starts.
Rev.1.00 Jul 15, 2007 Page 156 of 352
REJ09B0385-0100