English
Language : 

M32C80 Datasheet, PDF (157/352 Pages) Renesas Technology Corp – 16/32-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M32C/80 SERIES
M32C/80 Group
14. Timer (Timer A)
14.1.2 Event Counter Mode
In event counter mode, the timer counts how many external signals are applied or how many times
another timer counter overflows and underflows. The timers A2, A3 and A4 can count externally gener-
ated two-phase signals. Table 14.4 lists specifications in event counter mode (when not handling a two-
phase pulse signal). Table 14.5 lists specifications in event counter mode (when handling a two-phase
pulse signal with the timers A2, A3 and A4). Figure 14.9 shows the TAiMR register (i=0 to 4) in event
counter mode.
Table 14.4 Event Counter Mode Specifications (When Not Processing Two-phase Pulse Signal)
Item
Specification
Count Source
• External signal applied to the TAiIN pin (i = 0 to 4) (valid edge can be selected by program)
• Timer B2 overflow or underflow signal, timer Aj overflow or underflow signal (j=i-1,
except j=4 if i=0) and timer Ak overflow or underflow signal (k=i+1, except k=0 if i=4)
Counting Operation
• External signal and program can determine whether the timer increments or decre-
ments a counter value
• When the timer counter underflows or overflows, content of the reload register is
reloaded into the count register and counting resumes. When the free-running count
function is selected, the timer counter continues running without reloading.
Divide Ratio
• 1/(FFFF16 - n + 1) for counter increment
• 1/(n + 1) for counter decrement n : setting value of the TAi register 000016 to FFFF16
Counter Start Condition
The TAiS bit in the TABSR register is set to "1" (starts counting)
Counter Stop Condition
The TAiS bit is set to "0" (stops counting)
Interrupt Request Generation Timing The timer counter overflows or underflows
TAiIN Pin Function
Programmable I/O port or count source input
TAiOUT Pin Function
Programmable I/O port, pulse output or input selecting a counter increment or decrement
Read from Timer
The TAi register indicates counter value
Write to Timer
• When the timer counter stops, the value written to the TAi register is also written to
both reload register and counter
• While counting, the value written to the TAi register is written to the reload register
(It is transferred to the counter at the next reload timing)
Selectable Function
• Free-running count function
Content of the reload register is not reloaded even if the timer counter overflows or
underflows
• Pulse output function
The polarity of the TAiOUT pin is inversed whenever the timer counter overflows or
underflows
Rev. 1.00 Nov. 01, 2005 Page 138 of 330
REJ09B0271-0100