English
Language : 

M16C65 Datasheet, PDF (342/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
17. Timer A
17.3.3 Event Counter Mode (When Not Processing Two-Phase Pulse Signal)
In event counter mode, the timer counts pulses from an external device, or overflows/underflows of
other timers. Timers A2, A3, and A4 can count two-phase external signals (refer to 17.3.4 “Event
Counter Mode (When Processing Two-Phase Pulse Signal)”). Table 17.8 lists Specifications in Event
Counter Mode (When Not Processing Two-Phase Pulse Signal). Table 17.9 lists Registers and the
Setting in Event Counter Mode (When Not Processing Two-Phase Pulse Signal). Figure 17.6 shows
Operation Example in Event Counter Mode.
Table 17.8 Specifications in Event Counter Mode (When Not Processing Two-Phase Pulse Signal)
Item
Count source
Count operations
Number of counts
Count start condition
Count stop condition
Interrupt request
generation timing
TAiIN pin function
TAiOUT pin function
Read from timer
Write to timer
Selectable functions
i = 0 to 4
Specification
• External signals input to the TAiIN pin (active edge can be selected by a
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)
• Increment or decrement can be selected by a program.
• When the timer overflows or underflows, it reloads the reload register
contents and continues counting. When operating in free-running mode, the
timer continues counting without reloading.
• FFFFh - n + 1 for increment
• n + 1 for decrement
n: set value of the TAi register 0000h to FFFFh
Set the TAiS bit in the TABSR register to 1 (start counting).
Set the TAiS bit to 0 (stop counting).
Timer overflow or underflow
I/O port or count source input
I/O port or pulse output
Count value can be read by reading the TAi register.
• When not counting
Value written to the TAi register is written to both reload register and
counter.
• When counting
Value written to the TAi register is written to only reload register
(transferred to counter when reloaded next).
• Free-run count function
Even when the timer overflows or underflows, the reload register content is
not reloaded.
• Pulse output function
Whenever the timer underflows or underflows, the output polarity of the
TAiOUT pin is inverted. When the TAiS bit is set to 0 (stop counting), the pin
outputs a low-level signal.
• Output polarity control
While the output polarity of the TAiOUT pin is inverted (the TAiS bit is set to
0 (stop counting)), the pin outputs a high-level signal.
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 307 of 791